Remove certain ticks on y-axis when plotting?

조회 수: 1 (최근 30일)
cocopuffs
cocopuffs 2014년 8월 14일
댓글: Ben11 2014년 8월 14일
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일
You can set directly the XTick property as follows:
set(gca,'YTick',1:1:SomeNumber);
  댓글 수: 2
cocopuffs
cocopuffs 2014년 8월 14일
Awesome! Thank you
Ben11
Ben11 2014년 8월 14일
great you're welcome!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by