@@ -4758,12 +4758,6 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
4758
4758
4759
4759
"""
4760
4760
4761
- for input in [('x' , x ), ('y1' , y1 ), ('y2' , y2 )]:
4762
- if not (cbook .is_scalar (input [1 ]) or
4763
- cbook .is_scalar (cbook .safe_first_element (input [1 ]))):
4764
- raise ValueError ('Input passed into argument "' + input [0 ] +
4765
- '" is not 1-dimensional.' )
4766
-
4767
4761
if not rcParams ['_internal.classic_mode' ]:
4768
4762
color_aliases = mcoll ._color_aliases
4769
4763
kwargs = cbook .normalize_kwargs (kwargs , color_aliases )
@@ -4781,6 +4775,11 @@ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
4781
4775
y1 = ma .masked_invalid (self .convert_yunits (y1 ))
4782
4776
y2 = ma .masked_invalid (self .convert_yunits (y2 ))
4783
4777
4778
+ for name , array in [('x' , x ), ('y1' , y1 ), ('y2' , y2 )]:
4779
+ if array .ndim > 1 :
4780
+ raise ValueError ('Input passed into argument "' + name +
4781
+ '" is not 1-dimensional.' )
4782
+
4784
4783
if y1 .ndim == 0 :
4785
4784
y1 = np .ones_like (x ) * y1
4786
4785
if y2 .ndim == 0 :
@@ -4926,11 +4925,6 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
4926
4925
4927
4926
"""
4928
4927
4929
- for input in [('y' , y ), ('x1' , x1 ), ('x2' , x2 ), ('where' , where )]:
4930
- if not cbook .is_scalar (cbook .safe_first_element (input [1 ])):
4931
- raise ValueError ('Input passed into argument "' + input [0 ] +
4932
- '" is not 1-dimensional.' )
4933
-
4934
4928
if not rcParams ['_internal.classic_mode' ]:
4935
4929
color_aliases = mcoll ._color_aliases
4936
4930
kwargs = cbook .normalize_kwargs (kwargs , color_aliases )
@@ -4947,6 +4941,11 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
4947
4941
x1 = ma .masked_invalid (self .convert_xunits (x1 ))
4948
4942
x2 = ma .masked_invalid (self .convert_xunits (x2 ))
4949
4943
4944
+ for array in [('x' , x ), ('y1' , y1 ), ('y2' , y2 )]:
4945
+ if array [1 ].ndim > 1 :
4946
+ raise ValueError ('Input passed into argument "' + array [0 ] +
4947
+ '" is not 1-dimensional.' )
4948
+
4950
4949
if x1 .ndim == 0 :
4951
4950
x1 = np .ones_like (y ) * x1
4952
4951
if x2 .ndim == 0 :
0 commit comments