Hi, I'm working on a script where I calculate some variables and generate surface plots and save those plots in an array. Something like:
x = linspace(0,10); y = x;[X,Y] = meshgrid(x,y);for k = 1:10 Z = X+Y.^k; surface_plot = surf(X,Y,Z); plot_data(k) = copy(surface_plot);endclose all
Later on, to better organize my plots as subplots in custom windows I plot them again using the information in the plot_data array.
for k = 1:10 new_plot = plot_data(k) surf(new_plot.XData, new_plot.YData, new_plot.ZData)end
This however means that I am generating surface plots twice, which probably affects performance. Is there any way to re-open the closed figures from a stored handles in plot_data?
Best Answer