Skip to content

Commit

Permalink
Can't check only data_vars all corrds are no longer added by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Jul 4, 2024
1 parent 6d0b8bf commit e6922d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/plot/dataset_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ 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 ds.data_vars.get(key) is not None:
if key is not None:
coords[key] = ds[key]
for d in ds[key].dims:
dims[d] = None
Expand Down

0 comments on commit e6922d5

Please sign in to comment.