Keep the graphic's zoom
Ältere Kommentare anzeigen
Hi,
I would like to know how I can keep the zoom of graphic when I will go to change the variable that I'm watching at the moment.
thanks
regards
6 Kommentare
Andrew Newell
am 14 Mär. 2011
By "changing the variable", do you mean replotting with new values?
Mtlb Usr
am 14 Mär. 2011
Andrew Newell
am 14 Mär. 2011
I think so. Do you want to preserve the axes limits or the scale? (In other words, if your X axis limits are [3 5] after zooming, do you want to keep it at [3 5] or [Xlower Xlower+2]?)
Mtlb Usr
am 15 Mär. 2011
Mtlb Usr
am 16 Mär. 2011
Jan
am 16 Mär. 2011
Please anser my question. Keeping the limits and zooming is a contradiction. Therefore you cannot do both.
Akzeptierte Antwort
Weitere Antworten (1)
Andrew Newell
am 14 Mär. 2011
If I understand your question, you can do something like the following. Make your first plot, for example
plot(1:10)
Zoom in, and then save the values of axis:
v = axis;
Finally, make your next plot and set the axis values.
plot(3:5)
axis(v)
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!