| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The previous heuristic was wrong for "wide" fonts, and was also overly complicated, as the Text class already has the relevant functionality.
(locate_label has no division, print_label explicitly suppresses the division by zero warning.)
| Contour plots now default to using ScalarFormatter | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Pass ``fmt="%1.3f"`` to the countouring call to restore the old default label |
There was a problem hiding this comment.
| Pass ``fmt="%1.3f"`` to the countouring call to restore the old default label | |
| Pass ``fmt="%1.3f"`` to the contouring call to restore the old default label |
Sorry, something went wrong.
There was a problem hiding this comment.
yes
Sorry, something went wrong.
There was a problem hiding this comment.
It says coutouring now...
Sorry, something went wrong.
There was a problem hiding this comment.
second try...
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Closes #16153, and does some more.
Three fixes/improvements to contour labeling, grouped together to minimize baseline images changes. Code-wise I think this is ready for review, but marking as draft PR just so that I can still have a look at whether we can combine/delete some of the baseline images. I also took advantage of the baseline regen to merge two tests (test_contour_manual_labels and test_contour_label_size_color).
Commit 1: Improve estimation of label text width, as explained in #16153.
Commit 2: Remove
matplotlib/lib/matplotlib/contour.py
Lines 564 to 567 in 262c67f
Commit 3: Switch the default formatter to ScalarFormatter and use format_ticks to format all ticks at once, allowing the reuse of auto-precision choice by ScalarFormatter. Ultimately we could even use someting like #12473 (reusing colorbar logic to format values) but this shouldn't change any baseline images as none of them uses log scale (so they would still all use ScalarFormatter).
Commit 4: Update baseline images all at once. See the precision change and unicode minus sign in e.g. test_contour/contour_test_label_transforms.png and the tighter fit of labels in e.g. test_patheffects/collection.png.
I'm not sure why CI is failing even though I updated the baseline images locally, though. Figured out the test failure.
PR Checklist