Remove certain ticks on y-axis when plotting?

I have a plot that has the y axis: .5 1 1.5 2 2.5 3.5 etc... I want to remove the ticks that have .5 in them, so .5, 1.5, 2.5, and 3.5, etc. so that I am left with a y-axis of 1 2 3 4...
Thanks!

 채택된 답변

Ben11
Ben11 2014년 8월 14일

0 개 추천

You can set directly the XTick property as follows:
set(gca,'YTick',1:1:SomeNumber);

댓글 수: 2

Awesome! Thank you
Ben11
Ben11 2014년 8월 14일
great you're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

질문:

2014년 8월 14일

댓글:

2014년 8월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by