set number of values on axis?, XTickLabel
显示 更早的评论
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
2011-10-2
0 个投票
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.
类别
在 帮助中心 和 File 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!