Adjust to the Text Rendering Change in Matplotlib 3.11.0#1075
Merged
Conversation
A scalar (int, float or str) passed to factor() within an aes() expression is now wrapped in a list before creating the Categorical.
Also raise the numpy and scipy minimums to 1.25 and 1.15, and add the Python 3.14 classifier.
Using RcParams instead of a plain dict gets key and value validation at assignment time and better typing (RcKeyType). This also removes the obsoletes tk.pythoninspect workaround when copying rcParams in theme_matplotlib.
Matplotlib 3.11 changed numeric linespacing semantics: it now fixes every line's box to a multiple of the font's typographic height, affecting single-line text too. Adopt the new "normal" default, which derives spacing from the font's own metrics, and drop the strip_text overrides.
Size secondary text (axis, legend, caption, footer, strip) relative to base_size at 0.8x and the title at 1.2x, derive legend_key_size from the text size, lighten the strip background, and align base text margins with the other themes.
The text rendering overhaul in matplotlib 3.11 (hinting factor dropped, line height derived from the font) changes text metrics in rendered plots. Remove the now-deprecated text.hinting_factor rcParam pin and regenerate the affected baseline images.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: https://matplotlib.org/stable/release/prev_whats_new/whats_new_3.11.0.html#fonts-and-text