-
Notifications
You must be signed in to change notification settings - Fork 42
Add CRS accessor for cartopy #577
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Also, +1 to automatic use in the plotting function, that was my initial intent! |
Can we set the bounds on the cartopy crs since we have all the info? |
func.__name__ == "wrapper" | ||
and (kwargs.get("hue") or self._obj.ndim == 1) | ||
) | ||
is_grid_plot = (func.__name__ in ["contour", "countourf", "pcolormsh"]) or ( |
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_grid_plot = (func.__name__ in ["contour", "countourf", "pcolormsh"]) or ( | |
is_grid_plot = (func.__name__ in ["contour", "countourf", "pcolormesh"]) or ( |
kwargs = self._process_x_or_y(kwargs, "x", skip=kwargs.get("y")) | ||
kwargs = self._process_x_or_y(kwargs, "y", skip=kwargs.get("x")) | ||
if is_grid_plot and pyproj is not None: | ||
from cartopy.mpl.geoaxes import GeoAxes |
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.
let's check if cartopy is present with importlib.util.find_spec
This fixes #395.
crs
accessor to both the Dataset and DataArray accessors.