Save graphics object hierarchy to file
the current figure to a file named
the objects identified by the array of handles
a file named
filename. If you do not specify an
filename, then the extension .
h is a vector, none of the handles
h may be ancestors or descendents of any other
the FIG-file in a format that can be loaded by versions prior to MATLAB® 7.
hgsave(...,'-v7.3') saves the FIG-file
in a format that can be loaded only by MATLAB versions 7.3 and
above. This format, based on HDF5 files, is intended for saving FIG-files
larger than 2 GB.
When creating a figure you want to save and use in a MATLAB version
prior to MATLAB 7, use the
'v6' option with
the plotting function and the
'-v6' option for
Check the reference page for the plotting function you are using for
In MATLAB release R2014b or later, you cannot open a save
FIG-file in earlier versions of MATLAB. Use
savefig to save figures that are compatible
with earlier versions of MATLAB.
Use the File > Export Setup dialog. Use Edit > Copy Figure to copy the figure's content to the system clipboard. For details, see Customize Figure Interactively Before Saving and Copy Figure to Clipboard From Edit Menu.