Range selection in matlab plots
조회 수: 20 (최근 30일)
이전 댓글 표시
hello all,
I need some help with plotting. I have am plotting a set of data points as shown in figure. There are no 0 value data points in the set that I am plotting, but I want to have zero point on the plot. I want the x and y axis scales starting from 0. I am looking forward to hear from you guys.
Thanks.![1.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/269271/1.jpeg)
![1.jpg](https://www.mathworks.com/matlabcentral/answers/uploaded_files/269271/1.jpeg)
댓글 수: 0
답변 (1개)
Star Strider
2020년 1월 31일
x = 0:19;
y = randi([5 9], 1, 20);
figure
plot(x, y, 'p')
ylim([0 max(ylim)]) % Change The Lower ‘ylim’ Limit To Zero
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!