-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: contourf hatches use multiple edgecolors #28993
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
Conversation
lib/matplotlib/contour.py
Outdated
@@ -1259,12 +1259,16 @@ def draw(self, renderer): | |||
super().draw(renderer) | |||
return | |||
# In presence of hatching, draw contours one at a time. | |||
all_edgecolors = self.get_edgecolors() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all_edgecolors = self.get_edgecolors() | |
edgecolors = self.get_edgecolors() |
Slight preference for leaving out the all_
prefix. It does not convey information.
cde45c4
to
08e6552
Compare
If possible, let's also backport to 3.9 to have a version that supports both the old and new syntax and thus have a smoother transition. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…3.9.x Backport PR #28993 on branch v3.9.x (FIX: contourf hatches use multiple edgecolors)
PR summary
Fixes #28990. I think it would be good to get this minor fix in for v3.10 since the example from the issue will otherwise not be possible to plot (and it is possible at v3.9 using the deprecated
collections
attribute).I note that passing edgecolors to
contourf
results in a warning that the parameter is ignored. This seems inconsistent with being able to set them afterContourSet
instantiation. However, I propose to ignore the inconsistency for now and think about it later when a release is not imminent.PR checklist