필터 지우기
필터 지우기

Problems in copying figure with MATLAB 2014b

조회 수: 1 (최근 30일)
EunSoo Jung
EunSoo Jung 2015년 9월 9일
답변: Gautham Ram 2017년 8월 15일
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
Tim Jackman
Tim Jackman 2015년 9월 14일
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?

댓글을 달려면 로그인하십시오.

답변 (1개)

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

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by