How to make a plot with specific scale (Max, Min, and difference)
1 次查看(过去 30 天)
显示 更早的评论
I would like to ask a help, I need my plot have y-axis with difference 0.2, for example,
the plot result shows y(x) are 0 to 1, and it's difference is about 0.1 (0, 0.1, 0.2, 0.3, .... 1), but I need to make it 0.2 (0, 0.2, 0,4,....1).
What should I write to overcome it? Thank you.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1116370/image.jpeg)
0 个评论
采纳的回答
Chunru
2022-9-4
x = 0:90;
y = rand(size(x));
plot(x, y);
grid on
yticks(0:.2:1) % Change the yticks interval
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!