copygraphics
Copy plot to clipboard.
📝Syntax
copygraphics(fig)
📥Input Arguments
Parameter Description
fig figure object.
📄Description

copygraphics copy figure to clipboard.

On the desktop, the rendered RGBA image is sent to the native clipboard by the optional desktop adapter. In web mode, the same rendering is encoded as an RGBA PNG and sent through clipboard.image to the browser. Browser clipboard access requires a secure context and may require permission or a user gesture. When the automatic request is rejected, a visible Copy image action is displayed so the operation can be retried.

💡Examples
x = -2:0.25:2;
y = x;
[X,Y] = meshgrid(x);
F = X.*exp(-X.^2-Y.^2);
surf(X,Y,F);
copygraphics(gcf());
🔗See Also
gcfsaveas
🕔Version History
Version Description
1.0.0 initial version
2.0.0 browser image clipboard support added
Edit this page on GitHub