MATLAB Answers

0

write a range on the y-axis

Asked by Michel tawil on 15 Sep 2019
Latest activity Commented on by Michel tawil on 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

  0 Comments

Sign in to comment.

1 Answer

Rik
Answer by Rik
on 15 Sep 2019
Edited by Rik
on 15 Sep 2019
 Accepted Answer

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 Comment

Thank you !

Sign in to comment.