In short, use export_fig like everyone else.
How to callback and save a plot, as image in guide?
조회 수: 4 (최근 30일)
이전 댓글 표시
I have created a GUI with radio buttons which plots two graphs at a time in the interface. There is also a write results push button which when pushed stores data in excel sheet, along with this I also want to save the plots in the .jpeg format to the same folder. Since this has to be done once the button is pushed , I want a similar command like setappdata to set the plot with some specific name and later in the push button function I can getappdata and store using Imwrite. Please suggest a function to store the plot and then call back in another function.
Attached is the image of GUI
댓글 수: 0
답변 (2개)
Yudi
2018년 10월 20일
댓글 수: 1
Image Analyst
2018년 10월 20일
It could be that your using "path" as the name of your variable is causing problems. path is a built-in reserved variable that you should never overwrite/destroy. Call it "folder" and try again.
I also don't see any need for pause(1).
Also, you can use the more convenient OOP method of setting properties instead of using the old fashioned get() and set():
handles.result.String = 'Results Saved';
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!