You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come across two use-cases where this scaling behavior is undesirable:
I'm plotting a line with a single special point (eg, a ray, and I'm ok with the backwards portion of the line). If I plot (origin, origin + direction), then my axis bounds scale to meet origin + direction, even though that point is arbitrary. I can work around that with a hack like (origin, origin + eps*direction), but it forces me to trade off axis scaling against precision.
I'm plotting a true infinite line, with no special points. Perhaps ideally I'd get axis scaling that shows the "nearest" part of the line, but I'd be ok with just passing autoscale=False to axline to have it skip this step.
I explicitly considered that in #15330 (see Note). I'm basically hoping to get #15595 in (I suggested that functionality during a hackathon) which should provide this behavior for all artists at once, rather that having to implement it in a piecemean fashion for each of them. (Yes, I promised to do the final push to get #15595 in, but it fell a bit off my priority list...)
I chose to make the default (behave as) in_autoscale=True for axline() because that's basically consistent with all other plotting methods.
Ok but this is pretty inconsistent. First we are told that it’s easy to turn slope intercept into two points, but then we are told to be careful which two points we choose because it will change the autoscaling.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
anntzer commentedon Jan 19, 2020
I explicitly considered that in #15330 (see Note). I'm basically hoping to get #15595 in (I suggested that functionality during a hackathon) which should provide this behavior for all artists at once, rather that having to implement it in a piecemean fashion for each of them. (Yes, I promised to do the final push to get #15595 in, but it fell a bit off my priority list...)
I chose to make the default (behave as)
in_autoscale=Truefor axline() because that's basically consistent with all other plotting methods.jklymak commentedon Jan 19, 2020
Ok but this is pretty inconsistent. First we are told that it’s easy to turn slope intercept into two points, but then we are told to be careful which two points we choose because it will change the autoscaling.
anntzer commentedon Jan 20, 2020
But hopefully you won't need to be careful about that as soon as #15595 gets in... which is really quite close.
QuLogic commentedon Mar 2, 2023
You can now specify
axlinewith a slope #16337, so the first point is handled.github-actions commentedon Apr 27, 2026
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!