write a range on the y-axis

조회 수: 3 (최근 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]',''})

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Grid Lines, Tick Values, and Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by