-
Notifications
You must be signed in to change notification settings - Fork 281
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: fix set_zlim method with symlog norm #3538
BUG: fix set_zlim method with symlog norm #3538
Conversation
requesting @chummels for review on this one :) |
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.
Thank you! I tested this out both with your example as well as my example from Issue #3229 , and they both behave correctly now. I just included some suggestions to remove extra debug print statements.
The only thing that I'll note is that the zmax doesn't appear to show up in as a tickmark/ticklabel in either of the examples. I imagine it could be fixed by slightly bumping the zmax by some epsilon value upward (zmax * 1.01). But other than that this is a great fix.
60c3800
to
41ce5f5
Compare
that sounds like a reasonable request, however, I anticipate that it'd be very hard to implement this in a way that would work consistently with every matplotlib versions we want to support, as they have been changing the way colorbars work a couple times between 3.0 and 3.5 |
But won't my option of just slightly increasing the zmax work regardless of the version? It seems like we just want to have the tick label, so making zmax exceed the tick marker value should work for any MPL version. |
Maybe bumping down zmin by a similar amount would be wise too? Just to ensure it always has a tick label as well. |
I've seen similar tricks turn into maintenance puzzles with every recent matplotlib release. Matplotlib itself may be the place where this needs fixing. In any case I am very uncomfortable with introducing colorbar tricks in Yt when matplotlib 3.5 is coming up with a complete colorbar overhaul. |
I'm a little uncertain about removing the nanmax's in favor of straight max's, but I think it looks good. |
I... don't think that's what I'm doing here. I'm actually keeping nanmaxes everywhere, aren't I ? |
I've marked this for merging once the conflicts are done. |
I agree with @neutrinoceros that there are no removed nanmaxes, as it's just defaulting to either nanmax or the value provided by the user (which will not be a nan). |
I don't see what conflicts exist or need to be addressed before this gets merged. |
|
41ce5f5
to
bc667bb
Compare
fixed ! |
@yt-fido test this please |
@meeseeksdev backport to yt-4.0.x |
This comment was marked as outdated.
This comment was marked as outdated.
@meeseeksdev backport to yt-4.0.x |
This comment was marked as outdated.
This comment was marked as outdated.
Let's try this one last time now that a lot of other PRs went in. If it fails we'll resort to manual backport |
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. Congratulation you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove If these instruction are inaccurate, feel free to suggest an improvement. |
…symlog BUG: fix set_zlim method with symlog norm
PR Summary
fix #3229
on main
This plot is identical before/after calling the
set_zlim
method.this branch
PR Checklist