Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Problem
annotate() currently supports (in particular) specifying the position of the text in "offset points" and "offset pixels" relative to the position of the point being annotated.
It would be nice to also support "offset font" (perhaps spelt "offset fontsize", but I'm not sure the extra verbosity helps), which would be a offset but in units of the fontsize (of the annotation text). This is useful e.g. when using annotate() to generate subplot labels (#25905), where it makes sense to say "I want to put the label at the top right of the axes, offset from the corner by half-a-fontsize rightwards and downwards" (xytext=(.5, -.5), xycoords="offset font"
).
Proposed solution
No response
As noted below this is actually already present (and has now been documented as such), but adding tests would be nice.