how to specify y axis?
Show older comments
Accepted Answer
More Answers (1)
the cyclist
on 21 Jun 2020
set(gca,'YTick',[0 500 1000],'YTickLabel',[0 500 1000])
5 Comments
Ibrahim AlZoubi
on 21 Jun 2020
the cyclist
on 21 Jun 2020
Edited: the cyclist
on 21 Jun 2020
Here is a simple example that shows that this syntax works:
figure
plot(1000*rand(7))
set(gca,'YTick',[0 500 1000],'YTickLabel',[0 500 1000])

Perhaps you are doing something afterward that changes it? Maybe you could post the code that creates your figure.
Ibrahim AlZoubi
on 21 Jun 2020
Ibrahim AlZoubi
on 21 Jun 2020
the cyclist
on 21 Jun 2020
rand(7)
was just me generating some random numbers to plot, to illustrate that my code suggestion worked in that case.
Categories
Find more on Graphics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
