copygraphics
matlab_compat · scripts/matlab_compat/copygraphics.m
COPYGRAPHICS Copy a figure or axes to the system clipboard.
GitLab #1951 / plot2-002
copygraphics (obj)
copygraphics (obj, Name, Value)
OBJ is a figure, axes, or other exportable container. Name-Value
options match MATLAB R2026a: ContentType ("auto"|"image"|"vector"),
Resolution (dpi, default 150), BackgroundColor (default "current"),
Colorspace, Padding, Width, Height, Units, PreserveAspectRatio.
Raster content is copied as PNG. Vector content is copied as PDF
(EMF is not available from this M-layer path on Windows yet).
When there is no display (or Nexus is in headless helper mode), the
clipboard write is skipped. Set NEXUS_COPYGRAPHICS_OUT to a path to
dump the generated bytes for headless tests.