Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
[WIP] Add Axes method for drawing infinite lines.#7506
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
QuLogic commentedNov 24, 2016
dstansby commentedJan 31, 2017
This is pretty neat! Given |
dstansby left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
This also needs a what's new entry, at least an image test, and some edge case tests too. (slope zero, negative slope, very large slope are the ones that come to my mind right now). Otherwise looks good!
| @docstring.dedent_interpd | ||
| defaxline(self,slope=1,intercept=0,**kwargs): | ||
| """ |
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.
'across an axis'?
| Add an infinite line across the axes. | ||
| Parameters | ||
| ---------- |
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.
Is there a reason this and intercept are optional? I would say the user should be forced to give them.
| See Also | ||
| -------- | ||
| axhline : for strictly horizontal lines |
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.
Do these get automatically linked? If not would be nice to have some sphinx markup to link to relevant methods.
syrte commentedApr 21, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
A tentative suggestion on arguments, how about following forms: Accept following combinations:
This may cover most forms as suggeted by#5253 . Surely, we may assign default value to |
dstansby commentedAug 25, 2017
@QuLogic do you have any plans to work on this? If not let me know and I'm happy to pick it up. I think it would be a cool and useful feature to add. |
QuLogic commentedAug 26, 2017
I don't really have time at the moment, so feel free to prepare something based on it. |
dstansby commentedJan 10, 2018
Closing in favour of#9321 |

This is an implementation of an infinite line artist following the transforms I outlined in#5253. However, I did need to change from
ax.dataLimtoax.viewLimbecause the former is infinite when nothing else is on the plot. I'm not sure if that will cause problems (maybe in log-scaled plots?), though it seems to work:Unlike
axhlineandaxvline, there is no[xy]{min,max}or autoscaling based on these artists because I don't think it makes sense for infinite lines.I've only implemented
slope/interceptand not any of the alternates in#5253; not sure which ones we want to support. Also needs some tests, wrapper inpyplot, etc., so it's still WIP.