-
Notifications
You must be signed in to change notification settings - Fork 33
Add support for plotting subclasses of cftime.datetime #42
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
@lbdreyer when you get a chance please let me know if you would be interested in this. Thanks! If this seems like something you would rather wait to think about, we'll probably go forward with using |
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.
Thanks for this @spencerkclark !
This looks like a nice clean addition that's ready for merging.
There is one more thing we need from you before I can merge this. Could you fill in this CLA form https://scitools.org.uk/cla/v4/form?
Once that's done we can merge this in and then we can cut a new release of nc-time-axis so that you are unblocked!
Awesome, @lbdreyer, thank you! I just signed the CLA. I really appreciate your work on this package. |
Thank you! |
We would love to use nc-time-axis in xarray. There was some discussion over the summer about possibly adding support for plotting subclasses of
cftime.datetime
(e.g.cftime.DatetimeNoLeap
) directly. This would make using it in xarray somewhat easier. This PR is an attempt to add that. In so doing, I've retained support for plottingnc_time_axis.CalendarDateTime
objects, so this should be backwards-compatible.Let me know if there is still interest in this. I'm happy to iterate on it if desired.
For example, with this PR one can now do something like this: