-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Warn when a SymLogScale receives values that are all in the linear regime #24550
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
Comments
@timhoffm this looks like a fun issue to work on. Can I take it up? |
Sure. Go for it! |
@timhoffm I have created a pull request with the baseline solution and a unit test. Looking forward to your feedback/change request. In the meantime, I am looking into optional further improvements and will circle back with my findings/questions 🙂 |
Closed by #24555 |
@timhoffm circling back on the optional further improvements. I wanted to bounce a proposal off of you:
Looking forward to hearing your thoughts/suggestions on this. Happy to dig deeper and get back with some plots/numbers. |
The previously merged implementation caused other problems. This may be better warned in |
can i try to solve this issue? |
@saikarna913 you are welcome to dig into this if you like. However, I've adjusted the labelling. This is not a good first issue and likely difficult. The straight forward approach outlined in the first comment above and implemented in #24555 lead to false-positives, see #26118, and was thus reverted in #26126. It's not clear how to properly detect that all values are in the linear regime. To solve this and find a suitable place to warn, one needs deeper understanding of scales, the transforms system and how they are used within Matplotlib. |
Problem
Inspired by #24549. When all values are below linthresh, the SymLogScale looks like a linear scale. This is most certainly not intended by the user.
Proposed solution
Add a warning. This is possibly as simple as adding
at
matplotlib/lib/matplotlib/scale.py
Line 392 in 4e059bc
Marking as good first issue. A pull request should contain a test that the warning is actually triggered.
Optional further improvements:
The text was updated successfully, but these errors were encountered: