New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc]: Garbled menu widget example output #27358
Comments
This does not show up poorly when I run it locally, so not totally sure why it is going wrong on the docs... |
Right: |
Ah... this is likely because the position, sizing, and padding values are specified in pixels in these examples, and not updated when the DPI changes... I know @QuLogic has had some thoughts towards similar problems in the past, so I will tag him in here. |
I suspect the "easy" fix would be to reuse the trick of https://matplotlib.org/devdocs/gallery/text_labels_and_annotations/rainbow_text.html to position texts relative to one another. |
While this solves the alignement issue I couldn't find a way to set all the text boxes to the same length without using |
I guess I could imagine ways to fix that with custom Annotation subclasses that override get_window_extent, but I agree it's probably not really worth the complexity. |
The bbox could be converted to physical units and then all placement done in inches (or points) instead of pixels.
should be in inches. Then place things using |
Thanks @jklymak, will update the PR. |
Documentation Link
https://matplotlib.org/devdocs/gallery/widgets/menu.html
Problem
Suggested improvement
Should be as in version 3.4 and before:
The text was updated successfully, but these errors were encountered: