set number of values on axis?, XTickLabel

4 ビュー (過去 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 Center および File ExchangeGrid 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