@@ -725,6 +725,42 @@ def test_polycollection_joinstyle():
725
725
ax .set_ybound (0 , 3 )
726
726
727
727
728
+ @raises (ValueError )
729
+ def test_fill_between_2d_x_input ():
730
+ x = np .zeros ((2 , 2 ))
731
+ y1 = 3
732
+ y2 = 3
733
+
734
+ fig = plt .figure ()
735
+ ax = fig .add_subplot (211 )
736
+ ax .plot (x , y1 , x , y2 , color = 'black' )
737
+ ax .fill_between (x , y1 , y2 )
738
+
739
+
740
+ @raises (ValueError )
741
+ def test_fill_between_2d_y1_input ():
742
+ x = np .arange (0.0 , 2 , 0.02 )
743
+ y1 = np .zeros ((2 , 2 ))
744
+ y2 = 3
745
+
746
+ fig = plt .figure ()
747
+ ax = fig .add_subplot (211 )
748
+ ax .plot (x , y1 , x , y2 , color = 'black' )
749
+ ax .fill_between (x , y1 , y2 )
750
+
751
+
752
+ @raises (ValueError )
753
+ def test_fill_between_2d_y2_input ():
754
+ x = np .arange (0.0 , 2 , 0.02 )
755
+ y1 = 3
756
+ y2 = np .zeros ((2 , 2 ))
757
+
758
+ fig = plt .figure ()
759
+ ax = fig .add_subplot (211 )
760
+ ax .plot (x , y1 , x , y2 , color = 'black' )
761
+ ax .fill_between (x , y1 , y2 )
762
+
763
+
728
764
@image_comparison (baseline_images = ['fill_between_interpolate' ],
729
765
remove_text = True )
730
766
def test_fill_between_interpolate ():
@@ -4801,6 +4837,42 @@ def test_tick_param_label_rotation():
4801
4837
assert text .get_rotation () == 90
4802
4838
4803
4839
4840
+ @raises (ValueError )
4841
+ def test_fill_betweenx_2d_y_input ():
4842
+ y = np .zeros ((2 , 2 ))
4843
+ x1 = 3
4844
+ x2 = 3
4845
+
4846
+ fig = plt .figure ()
4847
+ ax = fig .add_subplot (211 )
4848
+ ax .plot (y , x1 , y , x2 , color = 'black' )
4849
+ ax .fill_betweenx (y , x1 , x2 )
4850
+
4851
+
4852
+ @raises (ValueError )
4853
+ def test_fill_betweenx_2d_x1_input ():
4854
+ y = np .arange (0.0 , 2 , 0.02 )
4855
+ x1 = np .zeros ((2 , 2 ))
4856
+ x2 = 3
4857
+
4858
+ fig = plt .figure ()
4859
+ ax = fig .add_subplot (211 )
4860
+ ax .plot (y , x1 , y , x2 , color = 'black' )
4861
+ ax .fill_betweenx (y , x1 , x2 )
4862
+
4863
+
4864
+ @raises (ValueError )
4865
+ def test_fill_betweenx_2d_x2_input ():
4866
+ y = np .arange (0.0 , 2 , 0.02 )
4867
+ x1 = 3
4868
+ x2 = np .zeros ((2 , 2 ))
4869
+
4870
+ fig = plt .figure ()
4871
+ ax = fig .add_subplot (211 )
4872
+ ax .plot (y , x1 , y , x2 , color = 'black' )
4873
+ ax .fill_betweenx (y , x1 , x2 )
4874
+
4875
+
4804
4876
@cleanup (style = 'default' )
4805
4877
def test_fillbetween_cycle ():
4806
4878
fig , ax = plt .subplots ()
0 commit comments