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

Walter Roberson
Walter Roberson 2011년 11월 1일
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 2011년 11월 1일
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.
Walter Roberson
Walter Roberson 2011년 11월 1일
Are any values in x1 or y1 negative or equal to 0 ?
Zhiting
Zhiting 2011년 11월 2일
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.
Walter Roberson
Walter Roberson 2011년 11월 2일
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.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

태그

질문:

2011년 11월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by