Export_fig in a multi-tap figure

Hi,
I want to export an image from my multi-tap GUI code using "export_fig".
My code is
export_file(handles.axes1, 'test.png');
However the output image becomes:
actually I want only the plot in the middle without the tab "VCO noise"
Just like this one:
Can anyone tell me how to do this?
thanks a lot.

답변 (2개)

Geoff Hayes
Geoff Hayes 2016년 12월 21일

0 개 추천

YCY - try using getframe to capture the axes as a frame and then save it to file as an image (converting it to an image with https://www.mathworks.com/help/matlab/ref/frame2im.html). Perhaps something like
myFrame = getframe(handles.axes1);
myImage = frame2im(myFrame);

댓글 수: 1

YCY
YCY 2017년 1월 4일
편집: YCY 2017년 1월 4일
Hi Geoff,
I tried this one, but the axis labels and title are gone. Do you know how to fix this?
thanks

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

Walter Roberson
Walter Roberson 2016년 12월 21일

0 개 추천

Sometimes it is easiest to create a new figure, copyobj the existing information to the new figure, and then export_fig() against the new location.

태그

질문:

YCY
2016년 12월 16일

편집:

YCY
2017년 1월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by