I would like to copy a matlab figure to my clipboard so I can paste it in Powerpoint as a vector graphic
75 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to copy a matlab figure to my clipboard so I can paste it in Powerpoint as a vector graphic. This is usually very simple, I just choose "metafile" in the cop options. More recently I tried the same thing getting this error message:
Error using print (line 82)
Unable to copy the figure to the clipboard. Increasing the Java Heap Size setting in the MATLAB preferences may
help; otherwise try saving to a file or choose a different clipboard format.
Error in matlab.graphics.internal.copyFigureHelper (line 158)
print(argsToPrint{:});
Error in editmenufcn (line 69)
matlab.graphics.internal.copyFigureHelper(hfig)
Error while evaluating Menu Callback.
I followed the suggestion and increased the Java thingy, up to 4 GB, still same problem. The weird thing is, it's actually a rather simple image of only 7 MB. I'd be happy to upload the .fig file here if possible.
I also met this problem in MATLAB 2021b.
But the problem is gone when I copy the same figure in MATLAB 2018b. But I want to know how to solve this problem in MATLAB 2021b.
Any hints what the problem might be?
Thanks,
Toby
6 commentaires
Anton Kogios
le 21 Fév 2023
I think there may be issues with importing svg formats in PPT 2016, but I guess if it works with other less complex figures then maybe not (see https://stackoverflow.com/questions/44098870/microsoft-office-2016-how-to-import-svg and https://answers.microsoft.com/en-us/msoffice/forum/all/powerpoint-2016-svg-fails-to-import-correctly/20d2dd54-e15e-4b80-bbf0-ce5dda8f8636). Either way, I would suggest trying to update PPT if possible.
If you want vector graphics in PPT, you can also try saving as an .eps file and then importing to PPT. This works for me. To save as .eps, you can go to Save As like before, or use this command:
exportgraphics(gcf,'poor.eps','ContentType','vector')
Réponses (2)
Ravi
le 21 Fév 2023
I understand that you are trying to export your plots in svg format and add that image to your ppt.
Below steps may help you save your plots as svg.
- Click on save button from your plot.
2. Select svg from the drop down menu in save-as pane.
3. Drag and drop this file to your ppt file.
Voir également
Catégories
En savoir plus sur Printing and Saving dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!