Is it possible to label (the last) minor tick?

1 view (last 30 days)
Sina on 19 Dec 2015
Edited: Sina on 19 Dec 2015
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.

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.
  1 Comment
Sina on 19 Dec 2015
I am not a native speaker but I corrected it. Thanks.
That is the answer I thought I would get but I hoped not to get...

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!