lyse.figure_to_clipboard¶
- lyse.figure_to_clipboard(figure=None, **kwargs)[source]¶
Copy a matplotlib figure to the clipboard as a png.
If figure is None, the current figure will be copied. Copying the figure is implemented by calling figure.savefig() and then copying the image data from the resulting file. If bbox_inches keyword arg is not provided, bbox_inches=’tight’ will be used.
- Parameters
figure (
matplotlib.figure
, optional) – Figure to copy to the clipboard. IfNone
, copies the current figure.**kwargs – Passed to
figure.savefig()
as kwargs.