@@ -194,7 +194,8 @@ def plotSlice(
194194 pcolorOpts = None ,
195195 streamOpts = None ,
196196 gridOpts = None ,
197- range_x = None , range_y = None
197+ range_x = None , range_y = None ,
198+ stream_threshold = None
198199 ):
199200
200201 """
@@ -228,7 +229,14 @@ def plotSlice(
228229 fig , axs = plt .subplots (1 , len (vType ))
229230 out = []
230231 for vTypeI , ax in zip (vType , axs ):
231- out += [self .plotSlice (v , vType = vTypeI , normal = normal , ind = ind , grid = grid , view = view , ax = ax , clim = clim , showIt = False , pcolorOpts = pcolorOpts , streamOpts = streamOpts , gridOpts = gridOpts )]
232+ out += [
233+ self .plotSlice (
234+ v , vType = vTypeI , normal = normal , ind = ind , grid = grid ,
235+ view = view , ax = ax , clim = clim , showIt = False ,
236+ pcolorOpts = pcolorOpts , streamOpts = streamOpts ,
237+ gridOpts = gridOpts , stream_threshold = stream_threshold
238+ )
239+ ]
232240 return out
233241 viewOpts = ['real' , 'imag' , 'abs' , 'vec' ]
234242 normalOpts = ['X' , 'Y' , 'Z' ]
@@ -307,7 +315,7 @@ def doSlice(v):
307315 grid = grid , view = view ,
308316 ax = ax , clim = clim , showIt = showIt ,
309317 pcolorOpts = pcolorOpts , streamOpts = streamOpts ,
310- gridOpts = gridOpts
318+ gridOpts = gridOpts , stream_threshold = stream_threshold
311319 )
312320
313321 ax .set_xlabel ('y' if normal == 'X' else 'x' )
@@ -431,7 +439,7 @@ def _plotImage2D(
431439 V = Vi
432440
433441 if stream_threshold is not None :
434- mask_me = np .sqrt (U ** 2 + V ** 2 ) <= stream_threshold
442+ mask_me = np .sqrt (Ui ** 2 + Vi ** 2 ) <= stream_threshold
435443 Ui = np .ma .masked_where (mask_me , Ui )
436444 Vi = np .ma .masked_where (mask_me , Vi )
437445
0 commit comments