Repository navigation
Use annotate coordinate systems to simplify label_subplots. - #25905
Conversation
fda95f2 to
6a6b401
Compare
|
Reordered the parameters; also switched to using "offset fontsize" in one of the two examples (thanks @saranti for pointing this out in #25907 (comment)) as that's the more natural unit here. |
| # Put the label | ||
| # - at the top left corner (axes fraction (0, 1)), | ||
| # - offset half-a-fontsize right and half-a-fontsize down | ||
| # (offset fontsize (+0.5, -0.5)), | ||
| # i.e. just inside the axes. |
There was a problem hiding this comment.
I'm not sure if this would be better in the text above instead of a comment, but unfortunately, the CI-built docs have been garbage-collected now.
There was a problem hiding this comment.
Re-triggered a CI run.
|
Should still be good to go. |
|
I'm fine with this, and feel free to ping for a merge when docs finish. But, did you consider keeping both in the example? ScaledTranslation is useful for other things, so an intuitive application has some value, even if there is a nicer way to do that application? |
|
Fair point; I restored the use of ScaledTranslation for the second example (I don't think we need to have both versions for both examples, they are really the same). |
jklymak
left a comment
There was a problem hiding this comment.
For some reason pre-commit needs to be appeased.
The ability of annotate to specify various coordinates systems simplifies label_subplots, by avoiding the need to explicitly construct a ScaledTranslation (while maintaining exact functionality parity).
|
Oops, sorry misclicked :/ and accidentally merged just after pushing the pre-commit fix. @jklymak let me know if there's anything else you think should be fixed. |
The ability of annotate to specify various coordinates systems simplifies label_subplots, by avoiding the need to explicitly construct a ScaledTranslation (while maintaining exact functionality parity).
PR summary
PR checklist