Changing the scale of Y-Axis!

392 views (last 30 days)
M G on 6 Oct 2011
Commented: Stewart Smith on 5 Dec 2019
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

Answers (1)

Grzegorz Knor
Grzegorz Knor on 6 Oct 2011
ylim([1 20])
Stewart Smith
Stewart Smith on 5 Dec 2019
that doesn't scale the axis it just increases the range

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!