Why do I get double axes when I use MOVIE to play the frames captured using GETFRAME in MATLAB 7.8 (R2009a)?

6 views (last 30 days)
I have trouble in correctly capturing movie frames from plots which include the title and axes.
In the attached MATLAB file "reprocode.m", I use GETFRAME with the gcf argument because the title gets omitted otherwise. When I add gcf argument to GETFRAME, I get double axes that skew things. I would like to eliminate these double axes.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 14 Aug 2009
When MOVIE command is used to animate the captured frames, two axes appear instead of one axes because of the following reason:
By default, MOVIE uses the current axes as the target for playing the movie. Due to this, if the captured frames contain an axes, they are displayed at an offset from the current axes. This results in the appearance of two axes; the axes seen at the left-bottom is the current axes of the figure, and the axes seen to its right is the axes captured from the frames.
This issue is resolved by playing the movie in the figure instead of the axes, by specifying the figure handle (or gcf) as the first argument. For example if "Frames" contains the captured frames, the MOVIE command must be executed as follows:
movie(gcf, Frames);
The above code eliminates the appearance of double axes.
More details about this can be found in the documentation page for MOVIE in the link below:
<http://www.mathworks.com/access/helpdesk/help/techdoc/ref/movie.html>

More Answers (0)

Products


Release

R2009a

Community Treasure Hunt

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

Start Hunting!