"Copy Figure" not working in MATLAB 2014a with Mac OSX 10.9

조회 수: 12 (최근 30일)
San
San 2014년 8월 1일
편집: Theo Olsthoorn 2014년 11월 30일
When I first install MATLAB 2014a, using the menu item function 'Copy Figure' worked fine to produce PDF figure for the clipboard. Currently it is not working. I am not sure what went wrong to cause 'Copy Figure' not to work any more. Please direct me to a solution to fix this problem. I really enjoy copying PDF of figure to clipboard. Please help me to a solution as soon as possible. Thank you.
  댓글 수: 4
Chad Greene
Chad Greene 2014년 8월 16일
Here is a function that lets you toggle renderers by typing rend.
JL
JL 2014년 10월 1일
There seem to be some bugs with rendering and copy/paste on the mac (OS x 10.9.5) with 2014a.
For example,
If you run the following:
close all;
colordef black;
figure(1);
hold on;
xlabel('x');
ylabel('y');
numPts=20000;
x=(1:numPts);
colors='rbgcmwyrbgcmwy';
hnd=[];
for ind=1:5
hnd(ind)=plot(x,sin(2*pi*ind*x/numPts),[colors(ind),'.']);
end
set(hnd,'linewidth',4)
set(gca,'fontsize',14);
set(gca,'box','on');
title('Example');
grid on
axis([0,numPts,-1.1,1.1]);
set(gcf,'inverthardcopy','off');
get(gcf,'renderer')
you'll find that the renderer is reported already as zbuffer. If you copy and paste it into PowerPoint on the mac, it has a transparent background. It also seems to take a long time to paste. Yet, if you then do:
set(gcf,'renderer','zbuffer');
which should not be any different. When you repeat the copy-paste, the pasted version has an opaque background and the paste happens more quickly.
I'd be really surprised if this was the intended behavior.
Perhaps tracking down this apparently buggy behavior could help solve the problem?

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

답변 (1개)

Theo Olsthoorn
Theo Olsthoorn 2014년 11월 30일
편집: Theo Olsthoorn 2014년 11월 30일
Copy figure stopped working with Lyx on OSX 10.8 (Mavericks) and 10.9 (Yosemite) in at least R2014a and R2014b. Copy figure has alway worked fine with Lyx at least to R2011b. Just copy figure in Matlab and then Edit>Past Special in Lyx in insert the figure in Lyx and make a copy on disk at the same time. Any Idea how to get this to work again? Copy figure seems to work in Word and Powerpoint though. Copy paste of pictures form Powerpoint to Lyx also works just fine. It seems that at least something was broken by the Mathworks in their new release. Does anyone have a solution to this?

카테고리

Help CenterFile Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by