필터 지우기
필터 지우기

How to save GUI axes ?

조회 수: 2 (최근 30일)
han han
han han 2020년 8월 8일
I want to save the axes on the GUI, but he will save the entire window.
I want the axes part, what should I do?
code
function pushbutton1_Callback(hObject, eventdata, handles)
[FileName, PathName, ~] = uiputfile( ...
{'*.png'},...
'Save as');
ax1 = handles.axes1;
x = rand(10,1);
y = rand(10,1);
scatter(x,y,'^')
new=FileName(1:end-4);
saveas(ax1, new,'png')
The saved .png like the following, but I want the axes part, and I don’t want the pushbutton, panel, table... etc. on the GUI.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by