Is it possible to label (the last) minor tick?
1 view (last 30 days)
Show older comments
Hey,
I have a plot with major ticks that I have labelled myself. I added minor ticks. On the x-axis I have at the and a major tick followed by minor ticks. I would like to label the last minor tick as I don't like it having a tick at the end not labelled, especially if it is close to mayor tick... I also would like to have it automatically labelled: Get the label of the last major tick and from there figure out what the label of the minor tick has to be... I guess it is kind of complicated but is it possible? I am using R2015b.
Thanks.
0 Comments
Accepted Answer
dpb
on 19 Dec 2015
Just an editorial aside -- they're 'major', not 'mayor' ticks...
But, the answer to the question is "no can do" -- there's no addressable property even in later versions for the minor ticks except on|off; spacing is totally determined internally based on spacing between the major ticks. You can't control the number nor the spacing nor query the internal properties programmatically to determine what was done, either. All you can do is to use text at a given location but what that location should be will have to be derived heuristically based on what you can infer from the behavior observed.
More Answers (0)
See Also
Categories
Find more on Axis 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!