integer increment on a plot axis

135 views (last 30 days)
Villanova
Villanova on 19 Aug 2011
Hi, I am trying to plot wind speed vs Beaufort number (which is integers from 0 to 10). How can I make my y-axis in a way to only show integer increments 0 1 ... 10. Thanks in advance.

Accepted Answer

Friedrich
Friedrich on 19 Aug 2011
Hi,
you can try
set(gca,'ytick',0:10)
To limit the y-axis to 0 to 10 do
set(gca,'ylim',[0,10])
  1 Comment
Villanova
Villanova on 19 Aug 2011
Thank you so much Friedrich.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!