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

[Bug]: ContourSet.antialiased attribute not present #26343

Closed
rcomer opened this issue Jul 18, 2023 · 1 comment · Fixed by #26399
Closed

[Bug]: ContourSet.antialiased attribute not present #26343

rcomer opened this issue Jul 18, 2023 · 1 comment · Fixed by #26399
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: contour
Milestone

Comments

@rcomer
Copy link
Member

rcomer commented Jul 18, 2023

Bug summary

The new ContourSet does not have an antialiased attribute. This causes failures in Iris, which checks the attribute.

Code for reproduction

import matplotlib.pyplot as plt

cs = plt.contour([[0, 1], [1, 2]], antialiased=True)
cs.antialiased

Actual outcome

Traceback (most recent call last):
  File "/contour_antialiased.py", line 4, in <module>
    cs.antialiased
AttributeError: 'QuadContourSet' object has no attribute 'antialiased'. Did you mean: '_antialiaseds'?

Expected outcome

With v3.7.1, I can access this attribute.

Additional information

Marking as release critical, as this is a regression.

Operating system

RHEL7

Matplotlib Version

main

Matplotlib Backend

QtAgg

Python version

3.11.4

Jupyter version

N/A

Installation

git checkout

@rcomer rcomer added Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: contour labels Jul 18, 2023
@rcomer rcomer added this to the v3.8.0 milestone Jul 18, 2023
@rcomer
Copy link
Member Author

rcomer commented Jul 19, 2023

I'm pretty sure Iris could do without this attribute, as it could just use the return value of setdefault here. I have verified locally that Iris's tests pass with that change. But a deprecation period on the attribute would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: contour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant