2727
2828 from ._step import Step
2929 from .datatypes import Varf
30+ from .stagyydata import _StepsView
3031
3132
3233# The location is off for vertical velocities: they have an extra
@@ -335,11 +336,11 @@ def plot_vec(
335336
336337
337338def _findminmax (
338- sdat : StagyyData , sovs : Iterable [str ]
339+ view : _StepsView , sovs : Iterable [str ]
339340) -> Dict [str , Tuple [float , float ]]:
340341 """Find min and max values of several fields."""
341342 minmax : Dict [str , Tuple [float , float ]] = {}
342- for step in sdat . walk .filter (snap = True ):
343+ for step in view .filter (snap = True ):
343344 for var in sovs :
344345 if var in step .fields :
345346 vals = step .fields [var ].values
@@ -363,15 +364,16 @@ def cmd() -> None:
363364 from . import conf
364365
365366 sdat = StagyyData (conf .core .path )
367+ view = _helpers .walk (sdat , conf )
366368 # no more than two fields in a subplot
367369 lovs = [[slov [:2 ] for slov in plov ] for plov in conf .field .plot ]
368370 minmax = {}
369371 if conf .plot .cminmax :
370372 conf .plot .vmin = None
371373 conf .plot .vmax = None
372374 sovs = set (slov [0 ] for plov in lovs for slov in plov )
373- minmax = _findminmax (sdat , sovs )
374- for step in sdat . walk .filter (snap = True ):
375+ minmax = _findminmax (view , sovs )
376+ for step in view .filter (snap = True ):
375377 for vfig in lovs :
376378 fig , axes = plt .subplots (
377379 ncols = len (vfig ), squeeze = False , figsize = (6 * len (vfig ), 6 )
0 commit comments