set number of values on axis?, XTickLabel
Show older comments
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
Answers (2)
Walter Roberson
on 2 Oct 2011
0 votes
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
on 2 Oct 2011
0 votes
Categories
Find more on Grid Lines, Tick Values, and Labels in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!