How to save GUI axes ?

8 ビュー (過去 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?
function pushbutton1_Callback(hObject, eventdata, handles)
[FileName, PathName, ~] = uiputfile( ...
'Save as');
ax1 = handles.axes1;
x = rand(10,1);
y = rand(10,1);
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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索


Community Treasure Hunt

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

Start Hunting!

Translated by