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 in MATLAB Online™ or in Web 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.For more control over the resolution of the image data, use the
print
function instead. Thecdata
output argument with print returns the image data. Theresolution
input argument controls the resolution of the image.To ensure that colorbars and legends displayed next to 3-D plots are captured, specify the
fig
argument when you callgetframe
.