"Copy Figure" not working in MATLAB 2014a with Mac OSX 10.9
Mostrar comentarios más antiguos
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 comentarios
Dasharath Gulvady
el 4 de Ag. de 2014
It would be great if you could give some details on the issue.
1.What exactly is your workflow? 2.When you say “ Copy Figure not working”, what exactly is not working? 3. Do you get an error after clicking ‘Copy Figure’? If yes, what is the complete error message? 4.What are the components of your figure? What functions have you used to come up with the figure? 5.Do “print” and save as” options work correctly?
6.Have you tried changing the MATLAB renderer. Here is how you can set/change the renderer:
set(gcf, 'Renderer', 'zbuffer');
Also try with the renderer value 'painters' instead of 'zbuffer'.
Logan
el 5 de Ag. de 2014
I am having a similar problem. I recently switched from a PC to a Mac (OS 10.9) and am not able to copy and paste decent looking figures from Matlab into Powerpoint. I looked into changing the renderer and found the 'zbuffer' and 'opengl' both work when using 'Copy Figure', but both produce very poor quality images when they are pasted into Powerpoint. Bad enough that I wouldn't want to show anybody those figures, which I'm pretty sure is the purpose of a Powerpoint presentation. The 'painters' renderer does not work at all. It does not give an error, but it seems like its not copying anything to the clipboard at all either.
For example:
plot(1:.1:10,sin(1:.1:10))
set(gcf, 'Renderer', 'zbuffer'); % Figure copies but poor quality.
set(gcf, 'Renderer', 'opengl'); % Figure copies but poor quality.
% at this point copy some text to the clipboard (cmd-C) to clear the last % image from it
set(gcf, 'Renderer', 'painters'); % Does not copy anything to the clipboard.
I can easily export the figure to a jpeg, and then import that into Powerpoint, but 1.) this is now a raster image and 2.) its much less convenient than using 'Copy Figure' which is what I was using on my PC (with good results).
It seems incredible to me that there isn't a way to export decent quality figures using 'Copy Figure' from a Mac. I'm not looking for publication quality figures, just ones that look decent (at least as good as the Matlab figure window). Looking around on other forums it seems like there are additional options for the PC version of Matlab for 'Copy Figure' which might make it a little more functional.
Am I missing something? Or is Matlab not as functional for Mac users?
Chad Greene
el 16 de Ag. de 2014
JL
el 1 de Oct. de 2014
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?
Respuestas (1)
Theo Olsthoorn
el 30 de Nov. de 2014
Editada: Theo Olsthoorn
el 30 de Nov. de 2014
0 votos
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?
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!