Skip to content

Commit

Permalink
fix multi-time coord issue
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjwilson committed Jun 3, 2024
1 parent 266b2c3 commit 2b466b8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ncplot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,11 @@ def view(x, vars=None, autoscale=True, out=None, **kwargs):

coord_list = list(ds.coords)

#if vars is None:
#vars = [x for x in list(ds.data_vars) if x not in coord_list]



for cc in coord_list:
new_coords = list(ds.coords)
if cc not in new_coords:
continue
if len(ds[cc].values.ravel()) <= 1:
if cc in list(ds.dims):
ds = ds.squeeze(cc, drop=True)
Expand Down

0 comments on commit 2b466b8

Please sign in to comment.