-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Why is smart_bounds() being deprecated? #15417
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
What effect are you trying to achieve. This was relatively robustly discussed in the PR. You can look up the issue using the search function |
I read the PR, but was not clear to me why the functionality was not deemed important. What I want is for the axis to span only the region where the datapoints are. |
|
No, that is not what I meant. What I mean is e.g. if I set the limits of the y-axis to span [0-100] but my data spans [20-100], then the left spine would by drawn starting from 20 up to 100. But there will be an empty space from 0 to 20 (no line would be drawn). |
I think the feature was deemed a bit strange to merit the amount of code and maintenance involved. But if you can make a strong case for it being useful folks may change their minds. (ping @efiring) |
xref #11004 |
Well, I don't have strong sentiments attached to the function (although I have used it a lot in the past couple of years), but I think the functionality is nice. I read in Tufte's book [1] about the concept of "double-functioning labels", where the idea is to mark the range of your data with the spine. In the details it is not exactly as what [1] Tufte, Edward R. (1986). "The Visual Display of Quantitative Information", Graphics Press, Cheshire, CT, USA |
Sure, but why wouldn't you just set the xlim to |
In the case where it is relevant to have the zero as well. If I am showing some ratios it helps to have the full range from zero, so that the magnitude is correctly interpreted. |
How does the viewer know zero is there somewhere? Maybe you could show an example? |
One of the hardest things for us to know is what parts of the library are actually used. It is good to know this feature actually has users :) I think the question is how are you using it and how onerous the alternatives are? |
Here are some examples: The first one is what I described above, where I have some ratios and it is important to know where zero is (so that large variations actually mean large variations and not just that we are in a different scale). I think is nice sometimes to just mark the range this way. The other way I use it is in normal plots, where I just like the effect of the spines to be separated, like this: Maybe in the first example (as pointed out by @jklymak) it would be better to also mark the zero in the y-axis. But those are my main uses for the function. |
Seems those would both work w/ |
Yes, it would. The |
Given that |
I am getting the following warning when running my code that uses
smart_bounds
:What should we use to get the same effect in the future then?
The text was updated successfully, but these errors were encountered: