Skip to content

Add error when plotting cftime #289

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cvanelteren
Copy link
Contributor

@cvanelteren cvanelteren commented Jun 26, 2025

Plotting on non-gregorian time scales raises an error. Matplotlib by default does not allow for this. Luckily there is a fix. By installing nc-time-axis some formatters are registered that allows for this. We can either implement this natively or add an install requirement

Currently I just implemented an error when one is plotting in a non-gregorian calendar (issue raised in #288).

@cvanelteren
Copy link
Contributor Author

I am open for bundling the package directly. The source is just a simple formatters that are registered.

Copy link

codecov bot commented Jun 26, 2025

Codecov Report

Attention: Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/internals/inputs.py 45.45% 5 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package seems well maintained, so let's depend on it. This PR needs a test.

@cvanelteren
Copy link
Contributor Author

Will add some integration. As @pgf pointed out in #288 we need to format the formatters to make them behave similarly to the default datetime for proper styling. Hopefully this is straightfoward.

@cvanelteren cvanelteren marked this pull request as draft June 28, 2025 20:23
@cvanelteren cvanelteren added this to the v1.58 milestone Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants