Clear Filters
Clear Filters

how to make a movie of multiple figures simultaneously using getframe

8 views (last 30 days)
I have four 2d histograms, I have turned each into a time sequence of 1d histograms and made four movies using getframe, movie, and movie2avi. Is there a way to merge them so I can see all four histograms in one movie? I have never seen a way to merge multiple figures into a single layout the way you can do in other programs e.g. Igor Pro (Wavemetrics). I would rather not export my figures, merge elsewhere, and then import them back. I imagine there might be a sneaky way to merge the cdata and colormap matrices before calling movie(M), but I would definitely prefer a general method of merging figures together.
thanks in advance
  1 Comment
Rory
Rory on 25 Aug 2011
I guess I should emphasize that I want to keep the axes, titles, and annotations of each figure separate, i.e. I am not trying to plot all the histograms on top of each other. I want to create a figure object that has multiple sets of axes.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 25 Aug 2011
Are the colormaps compatible? If so then you should be able to use subplot(), but I would suspect that embedding each within a uipanel() would be less work (all the uipanel would then parent to the single figure.)
If the colormaps are not compatible then it gets trickier.
Are you producing your histograms using hist() [specifically] ? If so then if I recall correctly they get produced a bit differently than otherwise.
If you are producing your histogram by using one of the bar() calls, then you end up with a hggroup object underneath which there is one patch object per column of original data. For example if you have 5 groups of 3 bars each, then that would reflect a 5 x 3 data matrix, and there would be 3 patches produced. The coding to go in and zap the patch color from pseudocolor to RGB is relatively short. You would do that because objects that are in RGB color have no colormap clash, so you can have several such objects on the same "figure" (which might have been subdivided in to uipanel)
  1 Comment
Rory
Rory on 29 Aug 2011
Thanks Walter
I had never seen the subplot function anywhere! I am really glad it exists and from now on I will be putting it to use. That's all I needed.

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Object Properties in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!