@@ -4603,31 +4603,29 @@ def test_hist_stacked_bar():
4603
4603
ax .legend (loc = 'upper right' , bbox_to_anchor = (1.0 , 1.0 ), ncols = 1 )
4604
4604
4605
4605
4606
- @pytest .mark .parametrize ('histtype, fill' , [('bar' , False ), ('bar' , True ),
4607
- ('step' , False ), ('step' , True )])
4608
- @image_comparison (['hist_vectorized_params1' , 'hist_vectorized_params2' ,
4609
- 'hist_vectorized_params3' , 'hist_vectorized_params4' ],
4606
+ @image_comparison (['hist_vectorized_params_bar' , 'hist_vectorized_params_step' ],
4610
4607
extensions = ["png" ], remove_text = True )
4611
- def test_hist_vectorized_params (histtype , fill ):
4612
- fig , axs = plt .subplots (2 , 3 , figsize = (8 , 6 ))
4613
- fig .delaxes (axs [1 , 1 ])
4614
- ax1 , ax2 , ax3 , ax4 , _ , ax6 = axs .flatten ()
4615
-
4608
+ def test_hist_vectorized_params ():
4616
4609
np .random .seed (19680801 )
4617
4610
x = [np .random .randn (n ) for n in [2000 , 5000 , 10000 ]]
4618
4611
4619
- # Only linestyle
4620
- ax1 .hist (x , bins = 10 , histtype = histtype , fill = fill , linestyle = ["-" , "--" , ":" ])
4621
- # Only edgecolor
4622
- ax2 .hist (x , bins = 10 , histtype = histtype , fill = fill ,
4623
- edgecolor = ["red" , "black" , "blue" ])
4624
- # Only facecolor
4625
- ax3 .hist (x , bins = 10 , histtype = histtype , fill = fill ,
4626
- facecolor = ["blue" , "yellow" , "brown" ])
4627
- # Only linewidth
4628
- ax4 .hist (x , bins = 10 , histtype = histtype , fill = fill , linewidth = [1 , 1.5 , 2 ])
4629
- # Only hatch
4630
- ax6 .hist (x , bins = 10 , histtype = histtype , fill = fill , hatch = ["/" , "\\ " , "." ])
4612
+ for histtype in ['bar' , 'step' ]:
4613
+ fig , axs = plt .subplots (2 , 3 , figsize = (8 , 6 ))
4614
+ fig .delaxes (axs [1 , 1 ])
4615
+ ax1 , ax2 , ax3 , ax4 , _ , ax6 = axs .flatten ()
4616
+
4617
+ # Only linestyle
4618
+ ax1 .hist (x , bins = 10 , histtype = histtype , linestyle = ["-" , "--" , ":" ])
4619
+ # Only edgecolor
4620
+ ax2 .hist (x , bins = 10 , histtype = histtype ,
4621
+ edgecolor = ["red" , "black" , "blue" ])
4622
+ # Only facecolor
4623
+ ax3 .hist (x , bins = 10 , histtype = histtype ,
4624
+ facecolor = ["blue" , "yellow" , "brown" ])
4625
+ # Only linewidth
4626
+ ax4 .hist (x , bins = 10 , histtype = histtype , linewidth = [1 , 1.5 , 2 ])
4627
+ # Only hatch
4628
+ ax6 .hist (x , bins = 10 , histtype = histtype , hatch = ["/" , "\\ " , "." ])
4631
4629
4632
4630
4633
4631
def test_hist_barstacked_bottom_unchanged ():
0 commit comments