write a range on the y-axis

4 ビュー (過去 30 日間)
Michel tawil
Michel tawil 2019 年 9 月 15 日
コメント済み: Michel tawil 2019 年 9 月 15 日
hello,
does anyone know ow to write a range on the y-axis ?
for example if i want to group data between 20 and 30 and instead write [20 30] for y-axis equal to 25
thanks

採用された回答

Rik
Rik 2019 年 9 月 15 日
編集済み: Rik 2019 年 9 月 15 日
You can modify the XTickLabels property to display any char array.
figure(1),clf(1)%only use clf during debugging
ax=axes;
plot(15:2:36,rand(11,1),'Parent',ax)
set(ax,'XTick',[20 25 30])
set(ax,'XTickLabels',{'','[20 30]',''})
  1 件のコメント
Michel tawil
Michel tawil 2019 年 9 月 15 日
Thank you !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by