Azzera filtri
Azzera filtri

Problems in copying figure with MATLAB 2014b

3 visualizzazioni (ultimi 30 giorni)
EunSoo Jung
EunSoo Jung il 9 Set 2015
Risposto: Gautham Ram il 15 Ago 2017
I want to copy figure with transparent background. When the clipboard format is 'Metafile or Bitmap', it never gives the transparent background (of course 'Transparent background' is selected for Figure background color). When the format is switched to 'Preserve information (metafile if possible)', it gives transparent-background figure, but usually the labels, titles, and legends are all in wrong position (the example figure is attached). Functions such as 'print' give the same results. Also, when I had more than 30 subplots in a figure, the figure copying cause errors and copying does not work.
Those problems have never appeared in MATLAB 2014a. I guess MATLAB 2015b has some trivial functions improved with figures, but those problems above are very annoying for users.
  1 Commento
Tim Jackman
Tim Jackman il 14 Set 2015
This is what I tried and it seemed to work ok:
y = [2 2 3; 2 5 6; 2 8 9; 2 11 12];
bar(y)
legend('blue','green','yellow')
set(gcf,'color','none');
set(gca,'color','none')
Then in the figure window I went to Edit --> Copy Options and selected "Preserve Information", "Transparent background" and left the "Match figure screen size" box checked. Then Edit --> Copy Figure and pasting into a Word doc. The result had both transparent figure and axes background.
Additionally, when I select "Metafile" the transparency is still there. Only when I select "bitmap" does the transparency disappear.
So far I can't reproduce what you have in the figure above. What operating system are you using? Could you post the code used to create and print the figure?

Accedi per commentare.

Risposte (1)

Gautham Ram
Gautham Ram il 15 Ago 2017
This could be a solution to your problem: https://nl.mathworks.com/matlabcentral/answers/167031-problem-in-copying-figure-in-matlab-2014b

Community Treasure Hunt

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

Start Hunting!

Translated by