-
Notifications
You must be signed in to change notification settings - Fork 274
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
MNT: matplotlib 3.5 compat #3670
Conversation
…d produce new images with matpltolib 3.5
Updates for the answer store are here: regarding Jenkins, I'll wait for allowance to bump images everywhere needed. From what I've seen, every difference we're getting is equally insignificant so it shouldn't be controversial. |
adding "bug" label to satisfy the Mergeable bot. I note that the prediction I gave in #3558 came true: symlog colorbars suddenly have minor ticks again, hurray ! |
Added a minimal patch to fix #3673 while I'm at it |
@@ -337,8 +336,7 @@ def _init_image(self, data, cbnorm, cblinthresh, cmap, extent, aspect): | |||
self.cb.set_ticks(yticks) | |||
else: | |||
self.cb = self.figure.colorbar(self.image, self.cax) | |||
for which in ["major", "minor"]: | |||
self.cax.tick_params(which=which, axis="y", direction="in") | |||
self.cax.tick_params(which="both", axis="y", direction="in") |
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.
I guess the explicit loop was necessary with old versions of matplotlib but it's not needed for the current oldest supported version (2.2.0)
see https://matplotlib.org/2.2.0/api/_as_gen/matplotlib.axes.Axes.tick_params.html?highlight=tick_params#matplotlib.axes.Axes.tick_params
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.
OK, makes sense.
- force inwards ticks for colorbar in PhasePlot - simplify calls to tick_params using modern matplotlib api
89e0de9
to
c8fb880
Compare
So if I'm reading it right, now our answer tests mandate matplotlib 3.5, right? |
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.
I don't see any reason this can't go in other than the minor comments about CI.
@@ -337,8 +336,7 @@ def _init_image(self, data, cbnorm, cblinthresh, cmap, extent, aspect): | |||
self.cb.set_ticks(yticks) | |||
else: | |||
self.cb = self.figure.colorbar(self.image, self.cax) | |||
for which in ["major", "minor"]: | |||
self.cax.tick_params(which=which, axis="y", direction="in") | |||
self.cax.tick_params(which="both", axis="y", direction="in") |
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.
OK, makes sense.
not explicitly, but answer testing is always run against the latest available version of matplotlib, so it's ran against 3.5 since it came out yesterday |
Once we get the new answers in and respawn testing this should go in. |
Cool, I'm bumping baselines for Jenkins then. |
We need to merge yt-project/answer-store#27 as well so I can update here |
68c719f
to
f55bcd9
Compare
I forgot to bump one of the references, forced pushed. Now I expect images tests on Jenkins to pass |
removing the "backport" label since its purpose is now covered by having the PR triaged in the 4.0.2 milestone already. |
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. |
Ah, turns out this can't be back ported (not automatically OR manually) unless we backport #3441 as well. This is because
After writing this I don't think there's a way around it so I'll just manually backport #3441 + this, hopefully this is acceptable. |
MNT: matplotlib 3.5 compat
PR Summary
I'm fixing a couple error messages here as an excuse to trigger CI so that I can update the answer store.
This PR will be a blocker unless it turns out that no update is needed.
goal ? fix #3558
why now ? matplotlib 3.5.0 just came out. I'm hoping that my work with the release candidate was enough to make this update pretty transparent
but I still expect we're going to see some small changes in our test images, at a level that will bother CI but not humans 🤞🏻