-
Notifications
You must be signed in to change notification settings - Fork 43
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
2904 graph is not getting the correct axis #2967
2904 graph is not getting the correct axis #2967
Conversation
We had something like this in the past, where the plots were scaled to the data, but this can create significant issues when a single outlying data point is loaded in. I don't think moving away from built-in MPL functionality is the right answer in this case. Instead, we need to investigate why the data set used by @XaelShan is being plotted the way it is. I have the file that triggered this and will add it to the original issue. |
I think that the reason is that there is a minimum range, and the data is very flat, matplotlib matplotlib centres on the range, but then its logged, pushing it to the top. I did look at the data before doing this. I don't see what the issue is with using this scaling method (I do remember people discussing before), I don't see how it would be problem with a single point, or with outliers - there are potential problems I can see with doing it naively, but scaling the range endpoints ensures that the range isn't zero, and that none of MPLs weird edge-of-plot cropping happens. |
I believe I have another dataset that also triggers this graphing problem. I will test it again and add it to the issue. |
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.
Code looks good. Minor stylistic comment only.
Plots now get their default scaling from the data given to them. Hope this is the right solution and I've not missed anything.
Fixes #2904