I have a script that creates a plot and then sets 9 different properties on that plot:
heat = heatmap( ...
heat.ColorMethod = ...
heat.MissingDataColor = ...
heat.MissingDataLabel = ...
heat.YLabel = ...
heat.XLabel = ...
heat.Title = ...
heat.CellLabelColor = ...
heat.Colormap = ...
It seems that what MATLAB is doing is rendering the original plot, then setting the first property and rendering the whole thing again, then setting the second property and rendering the whole thing again, and so on until all of the properties are set.
Rendering the same figure nine times when I only need the final render seems ridiculous. Is this indeed what's happening? If so, is it possible to tell MATLAB to wait until all of the properties are set until rendering the heatmap? I saw the drawnow function in the documentation which seems to imply that there is some kind of buffering of graphics updates going on, but is there any way to control it beyond flushing the buffer with drawnow?
0 Comments
Sign in to comment.