Skip to content

Commit 2b466b8

Browse files
committed
fix multi-time coord issue
1 parent 266b2c3 commit 2b466b8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ncplot/plot.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,11 @@ def view(x, vars=None, autoscale=True, out=None, **kwargs):
247247

248248
coord_list = list(ds.coords)
249249

250-
#if vars is None:
251-
#vars = [x for x in list(ds.data_vars) if x not in coord_list]
252-
253-
254250

255251
for cc in coord_list:
252+
new_coords = list(ds.coords)
253+
if cc not in new_coords:
254+
continue
256255
if len(ds[cc].values.ravel()) <= 1:
257256
if cc in list(ds.dims):
258257
ds = ds.squeeze(cc, drop=True)

0 commit comments

Comments
 (0)