Skip to content
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

New xarray release breaks xugrid due to changes in xarray plot utils #162

Closed
Huite opened this issue Sep 27, 2023 · 1 comment · Fixed by #163
Closed

New xarray release breaks xugrid due to changes in xarray plot utils #162

Huite opened this issue Sep 27, 2023 · 1 comment · Fixed by #163

Comments

@Huite
Copy link
Collaborator

Huite commented Sep 27, 2023

Importing xugrid with the latest xarray results in:

ImportError: cannot import name 'import_matplotlib_pyplot' from 'xarray.plot.utils

Likely a namespace or something in xarray has changed. Since these are internal methods really, we should arguably just copy them into xugrid.

@veenstrajelmer
Copy link
Collaborator

up to xarray 2023.8.0 they had the following function: https://github.com/pydata/xarray/blob/83c2919b27b4b2d8a01bfa380226134c71321aa0/xarray/plot/utils.py#L50-L55

This can easily be replaced by the contents: import matplotlib.pyplot as plt

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 a pull request may close this issue.

2 participants