필터 지우기
필터 지우기

How to set x-axis labels under certain tick marks?

조회 수: 6 (최근 30일)
Tom Ruopp
Tom Ruopp 2016년 3월 2일
댓글: Tom Ruopp 2016년 3월 3일
Is there a simple way to define tick mark labels? For example I have attached a plot which I would like to change. Instead of having the default tick labels, I would like to programmatically put tick labels under the positions of 20,60,100,and 120 (and get rid of the numerical tick labels). At this point those positions would be consistent but in the future they may change.

채택된 답변

Image Analyst
Image Analyst 2016년 3월 2일
Try this:
ax = gca; % Get handle
ax.XTicks = [20,60,100,120]
ax.XTickLabel = {'','','',''} % Labels are null.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by