Changing the scale of Y-Axis!

12 visualizzazioni (ultimi 30 giorni)
M G
M G il 6 Ott 2011
Commentato: Stewart Smith il 5 Dic 2019
Hello,
If x = [1 2 3]; and y = [6 7 9]; and I get bar(x,y) the y-axis contains the number between 1 to 9.
Now I wanna change the scale for y-axis in a way that it should be 1 to 20. How can I do that?
Thank you very much :) Mehdi

Risposte (1)

Grzegorz Knor
Grzegorz Knor il 6 Ott 2011
ylim([1 20])
  2 Commenti
Jan
Jan il 6 Ott 2011
+1: One of the shortest but complete answers.
Stewart Smith
Stewart Smith il 5 Dic 2019
that doesn't scale the axis it just increases the range

Accedi per commentare.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by