Skip to content

Commit

Permalink
Update dataset_plot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Jul 4, 2024
1 parent e6922d5 commit f2d7145
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xarray/plot/dataset_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,10 @@ def _temp_dataarray(ds: Dataset, y: Hashable, locals_: dict[str, Any]) -> DataAr
coord_kwargs = locals_.keys() & valid_coord_kwargs
for k in coord_kwargs:
key = locals_[k]
if key is not None:
coords[key] = ds[key]
for d in ds[key].dims:
darray = ds.get(key)
if darray is not None:
coords[key] = darray
for d in darray.dims:
dims[d] = None

# Trim dataset from unneccessary dims:
Expand Down

0 comments on commit f2d7145

Please sign in to comment.