how to specify y axis?
显示 更早的评论
how to spesify left y axis as follow:
(0 500 1000)

采纳的回答
更多回答(1 个)
the cyclist
2020-6-21
set(gca,'YTick',[0 500 1000],'YTickLabel',[0 500 1000])
5 个评论
Ibrahim AlZoubi
2020-6-21
the cyclist
2020-6-21
编辑:the cyclist
2020-6-21
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
2020-6-21
Ibrahim AlZoubi
2020-6-21
the cyclist
2020-6-21
rand(7)
was just me generating some random numbers to plot, to illustrate that my code suggestion worked in that case.
类别
在 帮助中心 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
