Capture axes or figure as movie frame
captures
the current axes as it appears on the screen as a movie frame. F
= getframeF
is
a structure containing the image data. getframe
captures
the axes at the same size that it appears on the screen. It does not
capture tick labels or other content outside the axes outline.
getfame
does not support the following functionality in
MATLAB
Online™ or in Web Apps (MATLAB Compiler):
Capturing the contents of a figure created with the
uifgure
function or any axes in the
figure.
Capturing the contents of an app created with App Designer or any axes in the app.
getfame
does not capture UI components created with the
uihtml
function.
For the fastest performance when using getframe
,
make sure that the figure is visible on the screen. If the figure
is not visible, getframe
can still capture the
figure, but performance can be slower.
For more control over the resolution of the image
data, use the print
function
instead. The cdata
output argument with print returns
the image data. The resolution
input argument controls
the resolution of the image.