Create a "stick-inside" mode for ticks labels
See original GitHub issueContext
Say we have a first quadrant chart:
One can notice that ticks’ labels are horizontally/vertically centred (compared to the ticks themselves) on the horizontal/vertical axis, respectively.
This makes that first and last ticks value “stick out” from the graph; what can be a bit ungainly — especially if one shows one axis only:
This is also inconvenient when you want to precisely align you axes with elements surrounding your picture (e.g., in the example above, if you want the 0%
tick mark to be the most-left point of the picture).
Question
➥ Could it be possible to have a “stick inside” mode for ticks values?
The idea is to change the vertical/horizontal alignment of the first and last ticks values:
-
left and right aligned, respectively, for the horizontal axis:
-
bottom and top aligned, respectively, for the vertical axis:
Our first example would then look like this:
Variant
An even more super-duper mode would enable us to choose which end on the axis to “stick inside”, so that one could make such graph:
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
any update on this?
that could be a solution.
My initial thoughts were to be able to:
tickalign
as a single [0,1] float, and apply this value to all ticks,tickalign
as a list of [0,1] floats (list with a length equal to the number of ticks displayed) and apply eachtickalign
respectively. (This might not be the best way to go, though, as it might be difficult to know in advance the number of ticks. Plus it’s not efficient if you want to customise the last tick only… A workaround — yet limiting the “customisability” — would be to provide a list of length 3 only, for [first, middles, last]…)