Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cf_xarray/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
xr.core.rolling.Rolling,
xr.core.rolling.Coarsen,
xr.core.weighted.Weighted,
xr.plot.facetgrid.FacetGrid,
)

#: `axis` names understood by cf_xarray
Expand Down Expand Up @@ -447,7 +448,7 @@ def _getattr(
attr: str,
accessor: "CFAccessor",
key_mappers: Mapping[str, Mapper],
wrap_classes: bool = False,
wrap_classes: bool = True,
extra_decorator: Callable = None,
):
"""
Expand Down
4 changes: 1 addition & 3 deletions cf_xarray/tests/test_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,10 @@ def test_dataarray_plot():
plt.close()

rv = obj.cf.plot(x="X", y="Y", col="T")
assert isinstance(rv, xr.plot.FacetGrid)
rv.map_dataarray(xr.plot.contourf, x="X", y="Y", col="T")
plt.close()

rv = obj.cf.plot.contourf(x="X", y="Y", col="T")
assert isinstance(rv, xr.plot.FacetGrid)
plt.close()

rv = obj.isel(lat=[0, 1], lon=1).cf.plot.line(x="T", hue="Y")
Expand Down Expand Up @@ -488,7 +487,6 @@ def test_dataarray_plot():
obj = obj.copy(deep=True)
obj.time.attrs.clear()
rv = obj.cf.plot(x="X", y="Y", col="time")
assert isinstance(rv, xr.plot.FacetGrid)
plt.close()


Expand Down