write a range on the y-axis

3 vues (au cours des 30 derniers jours)
Michel tawil
Michel tawil le 15 Sep 2019
Commenté : Michel tawil le 15 Sep 2019
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

Réponse acceptée

Rik
Rik le 15 Sep 2019
Modifié(e) : Rik le 15 Sep 2019
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 commentaire
Michel tawil
Michel tawil le 15 Sep 2019
Thank you !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by