Keep subnormal plot ranges finite#3539
Open
Kkkakania wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
For a nonzero range near
1e-310, dividing a normal pixel width or height by that range overflows to infinity. The resulting Qt transform containsinf/nan, and AxisItem generates non-finite tick endpoints. This can cause platform-dependent rendering failures or crashes.A fixed epsilon would change the visible scale of legitimate small-valued data. This change instead preserves the requested range and clamps only an already-overflowed ratio, retaining its sign. Ordinary scales and zero-range handling are unchanged.
Tests
QT_QPA_PLATFORM=offscreen python -m pytest tests -q: 1094 passed, 723 skipped, 8 xfailedfix-encoding-pragmahook was skippedFixes #2370