-
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 for matplotlib 3.5 + symlog + linthresh value outside data range #3565
Conversation
9822b08
to
98d30b8
Compare
switching to draft while we're stabilising the auto backport system |
yt/visualization/base_plot_types.py
Outdated
elif zmin * zmax > 0 and cblinthresh < min_abs_val: | ||
warnings.warn( | ||
f"Symlog linear threshold value {cblinthresh} is outside " | ||
f"the data range ({zmin}, {zmax}). Switching to log norm." |
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.
Note: the warning will be slightly erroneous if both zmin
and zmax
are negative. Maybe change it for something like
f"the data range ({zmin}, {zmax}). Switching to log norm." | |
f"the absolute data range ({abs(zmin)}, {abs(zmax)}). Switching to log norm." |
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.
Ah, you have a point, but your suggestion has a drawback too when values are both negatives because their absolute values are now in reversed order. I'll try to improve over it.
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.
better now ? (sorry, I forced pushed again, but only the warning message was changed)
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.
Yup, I clicked the auto-merge button ;)
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 !
…side the actual data range would produce artifacts in colorbars
98d30b8
to
f29d363
Compare
@meeseeksdev backport to yt-4.0.x |
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. |
BUG: fix for matplotlib 3.5 + symlog + linthresh value outside data range
PR Summary
fix #3564
Here's the results from #3564's script with this branch with matplotlib 3.4 or 3.5
![mpl_3 5 0rc1__Slice_z_my_fake_density](https://user-images.githubusercontent.com/14075922/137218717-bdd56876-7308-4009-bdbf-22739a4e2919.png)
So we even gained minor ticks for matplotlib 3.4, which alleviate most of the problem I reported in #3537 🎉
opening as a draft for now, will open for review if CI stays green