How to Alternate Between Two Different Graphs
26 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Krish Desai
am 16 Feb. 2016
Kommentiert: Image Analyst
am 16 Feb. 2016
So I'm plotting a graph and the direction field. Is there any way I can press a button and switch between the two graphs, also changing the title and axis labels?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 16 Feb. 2016
I don't know what "switch between the two graphs" means. Does it mean that you have two graphs and you want to swap them - left graph goes to the right and right graph goes to the left? Or you just want to make the current axes whatever it isn't now?
Anyway, to switch to a particular axes, use the axes() function
axes(handles.axes1);
title('Now on axes1');
xlabel('x1');
ylabel('y1');
axes(handles.axes2);
title('Now on axes2');
xlabel('x2');
ylabel('y2');
4 Kommentare
Image Analyst
am 16 Feb. 2016
What does dirfield() do? Does it popup another figure automatically, or does it plot something to the current axes, or does it do something else? Does it put a quiver-like array of vectors over an existing image? If it pops up a new figure, replace "hold on" with "figure".
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Objects 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!