This is an "after the fact" way to use SUBPLOT. For example:
This puts three plots into a vertical orientation in a new figure.
Toby Driscoll (2021). combplot (https://www.mathworks.com/matlabcentral/fileexchange/3147-combplot), MATLAB Central File Exchange. Retrieved .
Because of having legends I get this error
Error using matlab.graphics.illustration.Legend/connectCopyToTree
A legend must be copied with its associated axes. Use a vector input with COPYOBJ in order
to copy the legend and axes together.
Error in combplot (line 38)
h = copyobj(c(1),onefig);
just what I was looking for!!!
Using the command "legend" after a plot forces combplot to copy the legend object only for that figure. Hence the output of combplot is the specified matrix of legends, not the figures
Easy to use!
Simple tool to post-analyze multiple plots...
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!