i have 2 axes in a gui that my 2 graphs are plotted. how can i plot the 2 graphs in a new window and then save them?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abbxucy11
am 20 Jan. 2017
Kommentiert: Walter Roberson
am 23 Jan. 2017
i use the following code in a function:
axes(handles.axesrosediagram)
handles.alf=transpose(handles.table)
scatter(handles.alf,handles.final_table);
axes(handles.axes11)
rose(handles.final_table);
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 20 Jan. 2017
newfig = figure();
newax1 = subplot(2, 1, 1, 'Parent', newfig);
scatter(newax1, handles.alf,handles.final_table);
newax2 = subplot(2, 1, 2, 'Parent', newfig);
rose(newax2, handles.final_table);
saveas(newfig, 'OutputFileNameHere.png', 'png') %save it as PNG
delete(newfig)
2 Kommentare
Walter Roberson
am 23 Jan. 2017
newfig1 = figure();
newax1 = axes('Parent', newfig1);
scatter(newax1, handles.alf,handles.final_table);
newfig2 = figure();
newax2 = axes('Parent', newfig2);
rose(newax2, handles.final_table);
Then you would save newfig1 and newfig2 to appropriate files.
Afterwards,
delete([newfig1, newfig2])
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots 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!