set number of values on axis?, XTickLabel

조회 수: 9 (최근 30일)
Olli
Olli 2011년 10월 2일
Hi all, I have another question:
Ist there any possibiliy to set the number of labels on an axis?
My problem is: Originally the values on my x-axis are from 1:5, but I replace them with XTickLabel. Now, depending on how I zoom, I see the values (1, 2, 3, 4, 5) or (0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5) an my x-axis. This is a big problem for XTickLabel as I only want to replace (1, 2, 3, 4, 5).
Is there any possibility to set the number of values on an axis? In theory, I could also set the size of my figures, but that's not possible as my values an the x-axis with XTick very.
Thanks a lot for any help! oli

답변 (2개)

Walter Roberson
Walter Roberson 2011년 10월 2일
It is not possible to set the number of tick values on an axes. It is possible, though, to set the tick values to be at specific positions, by setting the XTick property.

Olli
Olli 2011년 10월 2일
Thanks a lot, it works with using XTick property!

카테고리

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