Copy Multiple figures to the clipboard

16 views (last 30 days)
Larz
Larz on 8 Nov 2017
Commented: Jan on 11 Jun 2021
My code outputs multiple figures that I would like to copy to the clipboard. Currently, I use the "Edit -> copy figure" for each individual figure, which is tedious. I would like to use:
>> print -clipboard -dbitmap
But this only copies the most recent figure to the clipboard. I feel like there should be some type of "all" command to copy ALL of the figures open in matlab, much like the "close all" function closes all figures. Perhaps something like this:
>> print -clipboard -dbitmap -all
Is there a way to copy all open figures to the clipboard for a quick "paste" into powerpoint? Or does the clipboard not work like that? (using windows 10)
Thanks!
  2 Comments
noMathWiz
noMathWiz on 15 Jul 2020
Edited: noMathWiz on 15 Jul 2020
I have this question too! (using MATLAB 2020a on MacOS)

Sign in to comment.

Answers (1)

Jan
Jan on 10 Jun 2021
The OS has a single clipboard only. There are some 3rd party apps, which offer more bins in the clipboard, but it is not easy to feed them fromwithin Matlab. You can try if http://www.clipmenu.com/ works for you.
  2 Comments
Xingwang Yong
Xingwang Yong on 11 Jun 2021
Since I use Windows, clipmenu would not help.
Although system has only one clipboard, maybe we can put multiple contents into it simultaneously? For example, in Powerpoint, you can select a textbox and a picture, then copy them together. From this stack-overflow thread, it is possible to put multiple contents into clipboard.
I looked into Yair Altman's export_fig. The way he implements -clipboard option is different from the stackoverflow answer.
Jan
Jan on 11 Jun 2021
Oh, sorry. I was confused by:
"I have this question too! (using MATLAB 2020a on MacOS)"
"I have the same question."

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!