Skip to content
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

Deprecate ContourLabeler.add_label_clabeltext. #26917

Merged
merged 1 commit into from
Oct 3, 2023
Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Sep 25, 2023

We can just dispatch add_label based on the value of the internal _use_clabeltext flag. This change is also preparing for a possible future change where we always have use_clabeltext=True (which is needed for contour labels to be properly rotated after changes of axes aspect ratio, and should have no drawback except for a tiny(?) performance cost).

PR summary

PR checklist

Comment on lines 3 to 5
... is deprecated. `.ContourLabeler.add_label` now sets
`.Text.set_transform_rotates_text` based on the value of *use_clabeltext*
passed to the `.ContourLabeler` constructor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latter part of this note belongs in a behaviour change note, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

We can just dispatch add_label based on the value of the internal
_use_clabeltext flag.  This change is also preparing for a possible
future change where we always have use_clabeltext=True (which is needed
for contour labels to be properly rotated after changes of axes aspect
ratio, and should have no drawback except for a tiny(?) performance
cost).
@QuLogic QuLogic added this to the v3.9.0 milestone Oct 3, 2023
@QuLogic QuLogic merged commit f263edf into matplotlib:main Oct 3, 2023
40 checks passed
@anntzer anntzer deleted the ct branch October 3, 2023 10:08
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.

None yet

3 participants