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

3 views (last 30 days)
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 Comments
Chad Greene
Chad Greene on 16 Aug 2014
Here is a function that lets you toggle renderers by typing rend.
JL
JL on 1 Oct 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?

Sign in to comment.

Answers (1)

Theo Olsthoorn
Theo Olsthoorn on 30 Nov 2014
Edited: Theo Olsthoorn on 30 Nov 2014
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?

Categories

Find more on Printing and Saving in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!