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!