Skip to content

Let FormatStrFormatter respect axes.unicode_minus.#27602

Merged
ksunden merged 1 commit intomatplotlib:mainfrom
anntzer:smfum
Jan 8, 2024
Merged

Let FormatStrFormatter respect axes.unicode_minus.#27602
ksunden merged 1 commit intomatplotlib:mainfrom
anntzer:smfum

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Jan 5, 2024

This is better than the workaround of wrapping the expression in
mathtext (as suggested for the old-style FormatStrFormatter) because it
also works for the hover tooltip in the toolbar (which cannot display
mathtext).

Note that it is not as easy to do so for FormatStrFormatter
(%-formatting) as that would require manually parsing the format string;
I would not bother as that formatter seems to be mostly present for
backcompat.

Goes on top of #27601.

PR summary

PR checklist

@story645 story645 added this to the v3.9.0 milestone Jan 5, 2024
This is better than the workaround of wrapping the expression in
mathtext (as suggested for the old-style FormatStrFormatter) because it
also works for the hover tooltip in the toolbar (which cannot display
mathtext).

Note that it is not as easy to do so for FormatStrFormatter
(%-formatting) as that would require manually parsing the format string;
I would not bother as that formatter seems to be mostly present for
backcompat.
@ksunden ksunden merged commit b0f015c into matplotlib:main Jan 8, 2024
@anntzer anntzer deleted the smfum branch January 8, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants