cannot copy figure

I use MATLAB to plot figures very often. This is the very first time that I could not copy figure to clipboard. If I go back and open my old figures, I could copy it. But all today's figures cannot be copied. Sometimes I even got error message though not always:
??? Error using ==> print at 325
Invalid handle object.
Error in ==> editmenufcn at 76
uimenufcn(hfig, 'EditCopyFigure')
I double-checked many times and it seemed that once I loaded a specific file (frequency_lifetime_PbTe.dat) then the figure could not be copied. So strange to me.
I copy one of my simple m-files here:
v1=load('frequency_lifetime_PbTe.dat');
x1=v1(:,1);
y1=v1(:,2); %ps
loglog(x1,y1,'bx','LineWidth',1);
Could anyone help me with this? Thanks a lot.

5 Comments

One thing I would check would be class(v1) . When you use that syntax for load, v1 would be prone to becoming a structure array. I personally do not recommend using load() for anything other than .mat files.
Zhiting
Zhiting on 1 Nov 2011
Thanks for your suggestion. I actually use load for other same format files as well and they all work. Even for this file, the figure can be plotted out, only encountered problems while copying figure.
Are any values in x1 or y1 negative or equal to 0 ?
Zhiting
Zhiting on 2 Nov 2011
No. Actually the figure was plotted out correctly. I guess just because the amount of data is too large. I have over 161994 rows in v1.
Hmmm, possibly. You could test by plotting subsets of the data to see if there is a particular maximum limit. And once you had found that limit, I would try changing the data for the next item and trying to plot including that data -- to see whether it is truly the number of items or if it is data dependent.

Sign in to comment.

Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Asked:

on 1 Nov 2011

Community Treasure Hunt

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

Start Hunting!