Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Description
Problem
I have a subplot where the y axis labels need to be on the right side, however doing so results in left alignment of the labels. Setting them to right aligned puts them on top of the axis (as they are right aligned from the left edge of where they were left aligned). Of course setting a pad is an option, but that isn't dynamic to the labels. If I make a dozen graphs, they have a different number of digits, so the pad would need to be dynamic to that (and without using a monospaced font and counting the number of digits).
Proposed solution
I have made a way to make the dynamic padding, but it would likely need refinement before implementing.Here is a stack overflow question where I posted my method for right aligning and padding based on the width of the widest label. Even though I do have this current method, I'm submitting as a feature request since I haven't contributed to matplotlib before, and to allow for another solution that may be more refined.
Additional context and prior art
No response