getframe
Capture axes or figure as movie frame
Description
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.
Examples
Input Arguments
Output Arguments
Limitations
getframe
does not support the following functionality inMATLAB Online™or inWeb Apps(MATLAB Compiler):Capturing the contents of a figure created with the
uifigure
function or any axes in the figure.Capturing the contents of an app created with App Designer or any axes in the app.
More About
Tips
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.控制图像的分辨率data, use the
print
function instead. Thecdata
output argument with print returns the image data. Theresolution
input argument controls the resolution of the image.