Prevent axis related plot crash when plot is resized too small#848
Merged
Conversation
Contributor
|
Do we know which data range/mapper is giving the bad values? I'm worried that there may be other places which are relying on the datalow <= datahigh invariant and so this may just push the error elsewhere. In any case additional logging of the case datalow > datahigh (equal is OK) may be worthwhile. |
corranwebster
approved these changes
Jan 20, 2023
Contributor
|
Failure is unrelated - the same changes are needed as in upstream pacakages for |
corranwebster
pushed a commit
that referenced
this pull request
Jan 24, 2023
* dont raise if datalow > datahigh * additional NaN checking in auto_ticks * add some logging about the bad range coming from the mappper * better warning message
corranwebster
pushed a commit
that referenced
this pull request
Jan 24, 2023
* dont raise if datalow > datahigh * additional NaN checking in auto_ticks * add some logging about the bad range coming from the mappper * better warning message
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.
This PR includes a defensive programming "fix" to #824 to prevent plot crashing. The real fix would be to track down where the bad inputs are coming from. However, regardless I think it makes sense for auto_ticks to be more robust to bad inputs as was discussed on the issue.
Also, in the same downstream project, when an application is resized to be very small and an inspector pane visibility is toggled, the plot some how ends up in a situation where
datalow > datahighinchaco.axis.pyand we are hitting theRunTimeError. I believe it makes sense to handle this case the same that we do for wheredatalow == datahigh(namely there is no plot we could show so we have no ticks).I am unable to cause the downstream project's plots to crash when working off of this branch.