Filter löschen
Filter löschen

How to let figure adjust its 'y' axis' tick range by itself?

3 Ansichten (letzte 30 Tage)
vx2008
vx2008 am 12 Jan. 2016
Kommentiert: vx2008 am 12 Jan. 2016
for example:
x=[50 12 32 54 23 54 75 76 24 545 56 878 876 435 456 54 454 56 6 87 6 67 8 ];
Then plot(x),get below figure:
Then I click 'zoom in' to just show x(1:5); and x(1:5) is [50 12 32 54 23]; max(x(1:5)) is 54, and min(x(1:5)) is 12. Now I want this figure auto just show tick from 12 to 54 on 'y' axis when I click 'zoom in' to select x(1:5) on 'x' axis. So shall I? and How?

Antworten (1)

Walter Roberson
Walter Roberson am 12 Jan. 2016
tick marks are automatically adjusted during zoom, unless the axes YTickMode is set to 'manual'. YTickMode would usually only be set to manual if you had set() YTick yourself. Which might have been done in the plot that is displayed, as normally there would be only 4 to 5 tick labels.
  1 Kommentar
vx2008
vx2008 am 12 Jan. 2016
I mean when I click zoom in, I get a part of this figure, for example, the whole figure is 'A', when zoom in, only 'a'( is one part of A) area is show on the figure window; XTick of 'a' is shown all, but YTick of 'a' is not shown all.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Data Exploration 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