Filter löschen
Filter löschen

How to save GUI axes ?

2 Ansichten (letzte 30 Tage)
han han
han han am 8 Aug. 2020
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.

Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by