@@ -1534,7 +1534,8 @@ def pad_arrays(*v, padval=np.nan):
1534
1534
1535
1535
if len (set ([k .shape [0 ] for k in v ])) == 1 :
1536
1536
return v
1537
- return np .array (list (itertools .zip_longest (* v , fillvalue = padval )), dtype = float ).T
1537
+ padded_v = list (itertools .zip_longest (* v , fillvalue = padval ))
1538
+ return np .array (padded_v , dtype = float ).T
1538
1539
1539
1540
1540
1541
def pts_to_prestep (x , * args ):
@@ -1603,7 +1604,7 @@ def pts_to_betweenstep(x, *args):
1603
1604
step_length = max (2 * max (len (x ), len (args [0 ])) - 2 , 0 )
1604
1605
steps = np .zeros ((1 + len (args ), step_length ))
1605
1606
1606
- def __between__ (steps , sl0 , sl1 , _x , _args ):
1607
+ def __between__ (steps , sl0 , sl1 , _x , _args ):
1607
1608
# Be agnostic whether xlike or ylike
1608
1609
if _x .flatten ().shape != x .shape :
1609
1610
if _x .flatten ().shape [- 1 ] == _x .shape [- 1 ]:
@@ -1612,7 +1613,7 @@ def __between__(steps, sl0, sl1, _x, _args):
1612
1613
steps [sl0 , 2 ::2 ] = _x [1 :- 1 ]
1613
1614
steps [sl0 , 1 :- 1 :2 ] = _x [1 :- 1 ]
1614
1615
steps [sl1 , 0 ::2 ] = _args
1615
- steps [sl1 , 1 ::2 ] = _args
1616
+ steps [sl1 , 1 ::2 ] = _args
1616
1617
return steps
1617
1618
1618
1619
if len (x ) == len (args [0 ]) + 1 :
@@ -1665,15 +1666,13 @@ def pts_to_betweenstep_edges(x, *args):
1665
1666
1666
1667
"""
1667
1668
steps = pts_to_betweenstep (x , * args )
1668
- print ("XXX" )
1669
1669
# Extra steps to plot edges where values are missing (Nan).
1670
1670
nan_cols = np .nonzero (np .isnan (np .sum (steps , axis = 0 )))[0 ]
1671
1671
nan_cols [1 ::2 ] = nan_cols [1 ::2 ]+ 1
1672
1672
pad_steps = []
1673
1673
1674
1674
xlike = len (x ) == len (args [0 ]) + 1
1675
1675
ylike = len (x ) + 1 == len (args [0 ])
1676
- print (x ,args )
1677
1676
if not (xlike or ylike ):
1678
1677
# Fall back to steps-post (legend drawing)
1679
1678
edge_steps = pts_to_poststep (x , * args )
0 commit comments