Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: combining plots without using hold
Posted:
May 10, 2014 4:34 PM


On Saturday, May 10, 2014 11:23:08 PM UTC+12, David Epstein wrote: > I have just written a fairly long program which produces many plots. There are several subsets of these plots, and for each subset I want to combine the plots. So, if I started with 10 plots, there would be a possible 2^10 different plots I could create from these. Fortunately, I only want to use 5 or so subsets of my 10 original plots. > > Is there a nice way to do this using the handles of the plots? Or using handles of the axes? Or something. > > > > I can't find what I want using Matlab Help, and the usual recourse of using Google doesn't help me either. Everyone wants me to use hold, but there doesn't seem a convenient way of doing so without reproducing some of my original plots over and over again. This approach also has the disadvantage of filling up the space in my computer's memory. I would rather clear the variables. > > > > Another approach would be to save on disk a .fig file for each plot. But I still would need to know how to combine the figures, and, at the moment, I don't know how to do this. I suppose I could save the variables I need for each plot in a .mat file. Surely there is something easier to do using handles.
What do you mean by "combine the plots"? Do you mean: 1. I want to overplot on the same axes; 2. I want to paste my plot into a separate panel in the figure; 3. Something else?



