Range selection in matlab plots
19 ビュー (過去 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.

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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!