hgexport
Export contents of figure
Description
Note
exportgraphics
and copygraphics
are recommended over hgexport
because
they enable you to capture the contents of a figure or an axes object. Both functions
have several options for customizing the output and specifying whether to capture vector
graphics or an image. (since R2020a)
For more information about the different ways to export graphics, see Compare Ways to Export Graphics from Figures.
hgexport(
exports the contents of the figure fig
,filename
)fig
to an EPS file with the specified
file name.
hgexport(
copies the contents
of the figure to the clipboard. This syntax is supported on Windows® systems only.fig
,"-clipboard")
The content is copied either as vector graphics or as an image, depending on the
renderer. If the renderer is Painters, then the content is copied as a Windows metafile. If the renderer is OpenGL®, then the content is copied as an image. Use the rendererinfo
function to determine the renderer. Changing the renderer will not be possible in a future
release.