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
2016-12-21
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);
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!