How can i set middle tick?

조회 수: 2 (최근 30일)
Gabriel Maia
Gabriel Maia 2018년 8월 17일
편집: Gabriel Maia 2018년 8월 17일
I want to set a graph with middle tics without number, like the picture. Also i need to enable sides ticks. How can i do it?

채택된 답변

Adam Danz
Adam Danz 2018년 8월 17일
편집: Adam Danz 2018년 8월 17일
To turn on 'minor' ticks:
set(gca,'XMinorTick','on')
What's a side tick? Check out all the properties of ticks you can set:
  댓글 수: 6
Gabriel Maia
Gabriel Maia 2018년 8월 17일
편집: Gabriel Maia 2018년 8월 17일
I got it now.
ax = gca;
ax.XAxis.MinorTick = 'on';
ax.XAxis.MinorTickValues = -7.5:1:7.5;
Adam Danz
Adam Danz 2018년 8월 17일
I see the problem. You don't need to create another axis. You only need the axis handle of your current axis.
replace
hA = axes
with
hA = gca;
unless you already have your current axis handle available.
Also your minor ticks should be
-7.5 : 2 : 7.5

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by