-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Correctly handle units in ax{v,h}line #10143
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
Conversation
This does not seem right as it is attaching units to the user input. It does not currently work if you pass in xmin/ymin with units (ex dates)?
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.
In the case of axhline
the xmin/xmax should be in axis fraction which I do not understand why this should have units attached to it.
I suspect this bug should be fixed a different way.
@dstansby can you give us a non-astropy example that doesn't work? Maybe w/ dates as that is a readilly usable units for the rest of us...
Yeah, sorry, I've had my head buried in astropy units recently, so this approach doesn't work generally.
This makes
axvline
andaxhline
work with units. I have checked this with astropy units (needs astropy/astropy#7037), but I'm not sure how to check it with other unit systems.