+
    xȇi/                     .   R t ^ RIt^ RIt^ RIt^ RIHtHtHtH	t	H
t
 ^ RIHt ^ RIHtHtHtHtHtHtHtHtHtHt ]P2                  ! R4      t]P2                  ! R4      t^ RIHt ]P<                  R 4       t ! R R	4      t  ! R
 R4      t! ! R R4      t"R# )zTest cases for .hist methodN)	DataFrameIndexSeries
date_rangeto_datetime)
_check_ax_scales_check_axes_shape_check_colors_check_legend_labels_check_patches_all_filled_check_plot_works_check_text_labels_check_ticks_props
get_x_axis
get_y_axis
matplotlibzmatplotlib.pyplot)_grouped_histc            	      ~    \        \        P                  ! ^\        P                  R7      \	        R^RR7      RR7      # )   dtypez
2020-01-01B)periodsfreqtsindexname)r   nparangefloat64r        v/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/plotting/test_hist_method.pyr   r   #   s0    
		"BJJ'r< r"   c                   *  a  ] tR t^,t o ]P
                  P                  R/ RR/RR)/.4      R 4       t]P
                  P                  R/ R^/.4      R 4       tR t	R	 t
R
 tR tR tR tR t]P
                  P                   ]P
                  P                  R. R*O. R+O. R,O. R-O. R.O. R/O. R0O.4      R 4       4       tR tR tR tR t]P
                  P                  R. R1O4      R 4       t]P
                  P                  RR2R3.4      R 4       t]P
                  P                  RRR.4      R 4       tR tR tR t]P
                  P9                  R R!7      R" 4       tR# tR$ t]P
                  P9                  R R!7      R% 4       t R& t!R' t"R(t#V t$R# )4TestSeriesPlotskwargsgridFfigsizec                2    \        VP                  3/ VB  R # N)r   histselfr   r&   s   &&&r#   test_hist_legacy_kwargs'TestSeriesPlots.test_hist_legacy_kwargs-   s    "'',V,r"   binsc                    \         P                  ! \        R R7      ;_uu_ 4        \        VP                  3RVP
                  P                  /VB  RRR4       R#   + '       g   i     R# ; i)Fcheck_stacklevelbyN)tmassert_produces_warningUserWarningr   r+   r   monthr,   s   &&&r#   test_hist_legacy_kwargs_warning/TestSeriesPlots.test_hist_legacy_kwargs_warning1   sE     ''eLLbggC"((..CFC MLLLs   -AA-	c                z    \         P                  P                  ^^4      w  r#\        VP                  VRR7       R# )   T)axdefault_axesNmplpyplotsubplotsr   r+   r-   r   figr=   s   &&  r#   test_hist_legacy_ax#TestSeriesPlots.test_hist_legacy_ax7   s*    **%%a+"''bt<r"   c                z    \         P                  P                  ^^4      w  r#\        VP                  W2RR7       R# )r<   T)r=   figurer>   Nr?   rC   s   &&  r#   test_hist_legacy_ax_and_fig+TestSeriesPlots.test_hist_legacy_ax_and_fig;   s*    **%%a+"''b4Hr"   c                z    \         P                  P                  ^^4      w  r#\        VP                  VRR7       R# )r<   T)rH   r>   Nr?   )r-   r   rD   _s   &&  r#   test_hist_legacy_fig$TestSeriesPlots.test_hist_legacy_fig?   s*    $$Q*"''#DAr"   c                    \         P                  P                  ^^4      w  pw  r4\        VP                  W#RR7       \        VP                  W$RR7       R# )r<   T)rH   r=   r>   Nr?   )r-   r   rD   ax1ax2s   &&   r#   test_hist_legacy_multi_ax)TestSeriesPlots.test_hist_legacy_multi_axC   s>    **--a3Zc"''#DI"''#DIr"   c                
   \         P                  P                  ^^4      w  r#Rp\        P                  ! \
        VR7      ;_uu_ 4        VP                  VP                  VR7       RRR4       R#   + '       g   i     R# ; i)r<   z`Cannot pass 'figure' when using the 'by' argument, since a new 'Figure' instance will be createdmatch)r4   rH   N)r@   rA   rB   pytestraises
ValueErrorr+   r   )r-   r   rD   rL   msgs   &&   r#   test_hist_legacy_by_fig_error-TestSeriesPlots.test_hist_legacy_by_fig_errorH   sZ    $$Q*' 	 ]]:S11GGrxxG, 2111s   	A11B	c                    \        \        P                  P                  ^4      P	                  R4      4      pVP                  ^R7      ^ ,          ^ ,          p\        VP                  4      ^8X  g   Q hR# )   )r0   N
   r^   )r   r   randomdefault_rngstandard_normalr+   lenpatches)r-   dfr=   s   &  r#   test_hist_bins_legacy%TestSeriesPlots.test_hist_bins_legacyQ   sU    ryy,,Q/??HIWW!W_Q"2::!###r"   c                   TpR p\         P                  ! \        VR7      ;_uu_ 4        VP                  P	                  RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        VP                  P	                  ^^.R7       RRR4       R#   + '       g   i     L]; i  + '       g   i     R# ; i)z7The 'layout' keyword is not supported when 'by' is NonerU   layoutNr<   r<   )rW   rX   rY   heightr+   )r-   hist_dfrf   rZ   s   &&  r#   test_hist_layout TestSeriesPlots.test_hist_layoutV   sz    G]]:S11IINN&N) 2 ]]:S11IINN1a&N) 21 21 211s   B2B.B+	.B?	z by, layout, axes_num, res_layoutc           	         Tp\         P                  ! \        R R7      ;_uu_ 4        \        VP                  P
                  \        Wb4      VR7      pRRR4       \        XWER7       R#   + '       g   i     L; i)Fr2   )r4   rk   Naxes_numrk   )r5   r6   r7   r   rm   r+   getattrr   )r-   rn   r4   rk   rs   
res_layoutrf   axess   &&&&&&  r#   test_hist_layout_with_by(TestSeriesPlots.test_hist_layout_with_by_   sS     
 ''eLL$RYY^^PVWD M$E MLs   ,A**A:	c                x    TpVP                   P                  VP                  RRR7      p\        V^RRR7       R# )   )r4   rk   r(   rs   rk   r(   Nrz   r^   )      )rm   r+   categoryr   r-   rn   rf   rv   s   &&  r#   test_hist_layout_with_by_shape.TestSeriesPlots.test_hist_layout_with_by_shapev   s1    yy~~VW~M$67Kr"   c                   \        \        P                  P                  ^4      P	                  ^4      4      p\        \        P                  P                  ^4      P	                  ^4      4      p\
        P                  ^y4       VP                  4        \
        P                  ^z4       VP                  4        \
        P                  4       pVP                  p\        V4      ^8X  g   Q hR# )r^   N)r   r   ra   rb   rc   pltsubplotr+   gcfrv   rd   )r-   xyrD   rv   s   &    r#   test_hist_no_overlap$TestSeriesPlots.test_hist_no_overlap|   s    299((+;;A>?299((+;;A>?C	C	ggixx4yA~~r"   c                    TpVP                   P                  VP                  R 7       \        \        P
                  P                  4       4      ^8X  g   Q hR# )r4   N)rm   r+   genderrd   r@   rA   get_fignums)r-   rn   rf   s   && r#   test_hist_by_no_extra_plots+TestSeriesPlots.test_hist_by_no_extra_plots   s=    
		"))$3::))+,111r"   c                &   \         P                  ^4      p\         P                  ^4      pVP                  ^o4      pRp\        P                  ! \
        VR7      ;_uu_ 4        VP                  WCR7       RRR4       R#   + '       g   i     R# ; i)r<   z&passed axis not bound to passed figurerU   )r=   rH   N)r   rH   add_subplotrW   rX   AssertionErrorr+   )r-   r   fig1fig2rP   rZ   s   &&    r#   +test_plot_fails_when_ax_differs_from_figure;TestSeriesPlots.test_plot_fails_when_ax_differs_from_figure   s_    zz!}zz!}s#6]]>55GGsG( 6555s   "A??B	histtype, expectedc                    \        \        P                  P                  ^4      P	                  ^^
4      4      pVP                  VR7      p\        WBR7       R# )r^   histtypefilledN)r   r   ra   rb   integersr+   r   )r-   r   expectedserr=   s   &&&  r#   test_histtype_argument&TestSeriesPlots.test_histtype_argument   sB     RYY**1-66q"=>XXxX(!"6r"   z&by, expected_axes_num, expected_layoutNbc                2   ^R.,          ^R.,          ,           p\        \        P                  P                  ^4      P	                  ^
4      VRR7      pRVP
                  n        \        VP                  RRVR7      p\        WbVR7       \        VR4       R	# )
   12ar   r   T)r>   legendr4   rr   N)r   r   ra   rb   rc   r   r   r   r+   r   r
   )r-   r4   expected_axes_numexpected_layoutr   srv   s   &&&&   r#   test_hist_with_legend%TestSeriesPlots.test_hist_with_legend   sx    
 SE	AI%299((+;;B?uSVW !d4BO$?ST3'r"   r4   c                x   ^R.,          ^R.,          ,           p\        \        P                  P                  ^4      P	                  ^
4      VRR7      pRVP
                  n        \        P                  ! \        RR7      ;_uu_ 4        VP                  RVR	R
7       RRR4       R#   + '       g   i     R# ; i)r   r   r   r   r   r    Cannot use both legend and labelrU   Tc)r   r4   labelN)r   r   ra   rb   rc   r   r   rW   rX   rY   r+   )r-   r4   r   r   s   &&  r#   test_hist_with_legend_raises,TestSeriesPlots.test_hist_with_legend_raises   s     SE	AI%299((+;;B?uSVW]]:-OPPFF$2SF1 QPPPs   	B((B9	c                    \         P                  P                  4       w  r#VP                  P	                  ^VR7      p\        VP                  4      ^8X  g   Q h\        VP                  P                  4       R4       R# )r   r0   r=   	FrequencyN)
r@   rA   rB   plotr+   rd   re   r   yaxis	get_labelr-   r   rL   r=   s   &&  r#   test_hist_kwargs TestSeriesPlots.test_hist_kwargs   sY    

##%WW\\qR\(2::!###288--/=r"   c                   \         P                  P                  4       w  r#VP                  P	                  ^VR7      pVP                  P	                  RVR7      p\        VP                  P                  4       R4       R# )r   r   
horizontal)orientationr=   r   N)r@   rA   rB   r   r+   r   xaxisr   r   s   &&  r#   test_hist_kwargs_horizontal+TestSeriesPlots.test_hist_kwargs_horizontal   sY    

##%WW\\qR\(WW\\lr\:288--/=r"   c                    \         P                  P                  4       w  r#VP                  P	                  ^VR7      pVP                  P	                  RRVR7      pR# )r   r   leftT)alignstackedr=   N)r@   rA   rB   r   r+   r   s   &&  r#   test_hist_kwargs_align&TestSeriesPlots.test_hist_kwargs_align   sD    

##%WW\\qR\(WW\\\<r"   zApi changed in 3.6.0)reasonc                z   \         P                  ! R 4       \        P                  P	                  4       w  r#VP
                  P                  RVR7      p\        VRR7       VP                  4       p\        VR.\        V4      ,          4       VP                  4       p\        VR.\        V4      ,          4       R# scipyT)logyr=   logr    N)rW   importorskipr@   rA   rB   r   r+   r   get_xticklabelsr   rd   get_yticklabelsr-   r   rL   r=   xlabelsylabelss   &&    r#   test_hist_kdeTestSeriesPlots.test_hist_kde   s    G$

##%WW\\t\+5)$$&7RD3w<$78$$&7RD3w<$78r"   c                p    \         P                  ! R 4       \        VP                  P                  4       R# r   N)rW   r   r   r   kder-   r   s   &&r#   test_hist_kde_plot_works(TestSeriesPlots.test_hist_kde_plot_works   s     G$"''++&r"   c                p    \         P                  ! R 4       \        VP                  P                  4       R# r   )rW   r   r   r   densityr   s   &&r#   test_hist_kde_density_works+TestSeriesPlots.test_hist_kde_density_works   s     G$"''//*r"   c                z   \         P                  ! R 4       \        P                  P	                  4       w  r#VP
                  P                  RVR7      p\        VRR7       VP                  4       p\        VR.\        V4      ,          4       VP                  4       p\        VR.\        V4      ,          4       R# r   )rW   r   r@   rA   rB   r   r   r   r   r   rd   r   r   s   &&    r#   test_hist_kde_logy"TestSeriesPlots.test_hist_kde_logy   s    G$

##%WW[[dr[*5)$$&7RD3w<$78$$&7RD3w<$78r"   c                @   \         P                  ! R 4       \        P                  P	                  4       w  r#VP
                  P                  R^
RVR7      p\        VRR7       \        VP                  4      ^
8X  g   Q h\        VP                  R.^
,          R7       R# )r   Tr   )r   r0   colorr=   r   r   )
facecolorsN)rW   r   r@   rA   rB   r   r+   r   rd   re   r	   r   s   &&  r#   test_hist_kde_color_bins(TestSeriesPlots.test_hist_kde_color_bins   sr    G$

##%WW\\t"CB\?5)2::"$$$bjjcURZ8r"   c                &   \         P                  ! R 4       \        P                  P	                  4       w  r#VP
                  P                  RRVR7      p\        VRR7       VP                  4       p\        V4      ^8X  g   Q h\        VR.4       R# )r   Tr)r   r   r=   r   r   N)rW   r   r@   rA   rB   r   r   r   	get_linesrd   r	   )r-   r   rL   r=   liness   &&   r#   test_hist_kde_color#TestSeriesPlots.test_hist_kde_color   sm    G$

##%WW[[d#"[55)5zQecU#r"   r!      r`   )r   r^   r<   r^   r   )r      r^   )r   r<   )r   rz   r<   rz   r   )r   r^   r   rz   r^   r^   )r   r   rz   )r   r^   )r   r   rz   rz   r<   rz   )	classroomr   r   r   )barT)
barstackedT)stepF)
stepfilledT)Nr<   rl   )r   r^   )r<   r^   )%__name__
__module____qualname____firstlineno__rW   markparametrizer.   r9   rE   rI   rM   rR   r[   rg   ro   slowrw   r   r   r   r   r   r   r   r   r   r   xfailr   r   r   r   r   r   __static_attributes____classdictcell____classdict__s   @r#   r%   r%   ,   s    [[XVUOi=Q'RS- T- [[XVQK'89D :D
=IBJ
-$
* [[[[*)*+,,,,	
F FL	2
) [[	
77 [[03DFV2W	(	( [[TD#;/2 02>>=
 [[45	9 6	9'+ [[459 699$ $r"   r%   c                     a  ] tR t^t o ]P
                  P                  R 4       t]P
                  P                  R 4       t]P
                  P                  R 4       t	]P
                  P                  R 4       t
]P
                  P                  ]P
                  P                  RRRRR/R	R+/R
^/.4      R 4       4       t]P
                  P                  R 4       t]P
                  P                  R 4       t]P
                  P                  R 4       t]P
                  P                  R 4       tR t]P
                  P                  RRRRR,/RR,RR,/RR-RR-/RR.RR./RR/RR//RR0RR./RR1RR-/RR2RR,/RR3RR,/3	4      R 4       tR tR tR t]P
                  P                  RR. R4O3. R5O. R5O3.4      R 4       t]P
                  P                  R. R6O4      R 4       t]P
                  P                  RRR.4      ]P
                  P                  RRR .4      R! 4       4       t]P
                  P                  RRR.4      ]P
                  P                  RRR .4      R" 4       4       tR# tR$ tR% tR& tR' tR( tR) t R*t!V t"R# )7TestDataFramePlotsc                    \         P                  ! \        R R7      ;_uu_ 4        \        VP                  4       RRR4       R#   + '       g   i     R# ; i)Fr2   N)r5   r6   r7   r   r+   )r-   rn   s   &&r#   test_hist_df_legacy&TestDataFramePlots.test_hist_df_legacy   s1    ''eLLgll+ MLLLs   AA	c           	     N   \        \        P                  P                  ^4      P	                  R	4      4      p\        \        P                  P                  ^4      P                  RR^
\        P                  R7      4      V^&   \        P                  ! \        RR7      ;_uu_ 4        \        VP                  RR7      pRRR4       \        X^R
R7       VR,          P                  4       '       d   Q h\        V^.,          P                  4       R#   + '       g   i     L\; i)r^        j+2Z     ReZsizer   Fr2   )r'   Nrr   r_   r   rl   )r   r   ra   rb   rc   r   r   int64r5   r6   r7   r   r+   r   get_visibler-   rf   rv   s   &  r#   test_hist_df_legacy_layout-TestDataFramePlots.test_hist_df_legacy_layout  s     ryy,,Q/??HIII!!!$--""hh	 . 
1 ''eLL$RWW59D M$6::))++++"aS',,' MLs   (DD$	c                    \        \        P                  P                  ^4      P	                  R4      4      p\        VP                  4       R# )r^   Nr`   r<   )r   r   ra   rb   rc   r   r+   r-   rf   s   & r#   test_hist_df_legacy_layout2.TestDataFramePlots.test_hist_df_legacy_layout2  s2    ryy,,Q/??HI"''"r"   c           	        \        \        P                  P                  ^4      P	                  R	4      4      p\        \        P                  P                  ^4      P                  RR^
\        P                  R7      4      V^&   \        P                  ! \        RR7      ;_uu_ 4        \        VP                  R
R7      pRRR4       \        X^R
R7       R#   + '       g   i     L ; i)r^   r  r  r  Fr2   rj   Nrr   r`   r   r|   )r   r   ra   rb   rc   r   r   r  r5   r6   r7   r   r+   r   r  s   &  r#   test_hist_df_legacy_layout3.TestDataFramePlots.test_hist_df_legacy_layout3  s     ryy,,Q/??HIII!!!$--""hh	 . 
1 ''eLL$RWWV<D M$6: MLs   (CC(	r&   sharexTshareyr(   r0   c           	        \        \        P                  P                  ^4      P	                  R4      4      p\        \        P                  P                  ^4      P                  RR^
\        P                  R7      4      V^&   \        P                  ! \        RR7      ;_uu_ 4        \        VP                  3/ VB  RRR4       R#   + '       g   i     R# ; i)r^   r  r  r  Fr2   Nr$  )r   r   ra   rb   rc   r   r   r  r5   r6   r7   r   r+   )r-   r&   rf   s   && r#   !test_hist_df_legacy_layout_kwargs4TestDataFramePlots.test_hist_df_legacy_layout_kwargs+  s    
 ryy,,Q/??HIII!!!$--""hh	 . 
1 ''eLLbgg00 MLLLs   (C		C	c                v    V! \        ^
4      4      p^^rC^^(reVP                  W5WFR7      p\        WsWTVR7       R# )r`   
xlabelsizexrot
ylabelsizeyrotN)ranger+   r   )r-   frame_or_seriesobjxfyfr/  r1  rv   s   &&      r#   (test_hist_df_legacy_layout_labelsize_rot;TestDataFramePlots.test_hist_df_legacy_layout_labelsize_rot?  s>     eBi(RBdxx2RxK4TtTr"   c                N   \        \        ^
4      4      pVP                  R^RR7      pVP                  4        Uu. uF1  p\	        V\
        P                  P                  4      '       g   K/  VNK3  	  pp\        P                  ! VR,          P                  4       R4       R# u upi )r`   T)
cumulativer0   r         ?Nr   )r   r2  r+   get_children
isinstancer@   re   	Rectangler5   assert_almost_equal
get_height)r-   r   r=   r   rectss   &    r#   test_hist_df_legacy_rectangles1TestDataFramePlots.test_hist_df_legacy_rectanglesH  sy    U2YXXAtX<OO-V-qAs{{?T?T1U-V
uRy335s; Ws   ,B",B"c                l    \        \        ^
4      4      pVP                  RR7      p\        VRR7       R# )r`   T)r   r   r   N)r   r2  r+   r   )r-   r   r=   s   &  r#   test_hist_df_legacy_scale,TestDataFramePlots.test_hist_df_legacy_scaleP  s*    U2YXX$X5)r"   c                    \        \        ^
4      4      p\        P                  ! \        4      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     R# ; i)r`   r   )fooN)r   r2  r5   external_error_raisedAttributeErrorr+   )r-   r   s   & r#   "test_hist_df_legacy_external_error5TestDataFramePlots.test_hist_df_legacy_external_errorW  s>    U2Y%%n55HHH 6555s   AA%	c                   \        R \        P                  P                  ^4      P                  ^
4      R\        P                  P                  ^4      P	                  ^ ^
^
4      R\        \        P                  P                  ^4      P	                  RR^
\        P                  R7      4      R\        \        P                  P                  ^4      P	                  RR^
\        P                  R7      RR7      /4      pVP                  \        4      pR	p\        P                  ! \        VR
7      ;_uu_ 4        VP                  4        RRR4       R#   + '       g   i     R# ; i)r   r   r   l     p/ l    @spc/ r   dT)utczDhist method requires numerical or datetime columns, nothing to plot.rU   N)r   r   ra   rb   r   r   r  astypeobjectrW   rX   rY   r+   )r-   rf   df_orZ   s   &   r#   *test_hist_non_numerical_or_datetime_raises=TestDataFramePlots.test_hist_non_numerical_or_datetime_raises^  s   RYY**1-44R8RYY**1-66q"bA[II))!,55+-@"BHH 6 
 [II))!,55+-@"BHH 6  	
" yy T]]:S11IIK 2111s   9EE%	layout_testrk   Nexpected_sizec           	     l   \        \        P                  P                  ^4      P	                  R	4      4      p\        \        P                  P                  ^4      P                  RR^
\        P                  R7      4      V^&   VP                  VR,          R7      pVR,          p\        V^VR7       R# )
r^   r  r  r  rk   rj   rV  rr   Nr_   )
r   r   ra   rb   rc   r   r   r  r+   r   )r-   rU  rf   rv   r   s   &&   r#   ro   #TestDataFramePlots.test_hist_layoutw  s     ryy,,Q/??HIII!!!$--""hh	 . 
1 wwk(3w4/$8<r"   c           	     .   \        \        P                  P                  ^4      P	                  R
4      4      p\        \        P                  P                  ^4      P                  RR^
\        P                  R7      4      V^&   Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       \        P                  ! R4      p\        P                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       R	p\        P                  ! \        VR7      ;_uu_ 4        VP                  RR7       RRR4       R#   + '       g   i     L; i  + '       g   i     Lf; i  + '       g   i     R# ; i)r^   r  r  r  z1Layout of 1x1 must be larger than required size 3rU   rj   Nz)Layout must be a tuple of (rows, columns)1At least one dimension of layout must be positiver_   rl   )r<   r   r   )r   r   ra   rb   rc   r   r   r  rW   rX   rY   r+   reescape)r-   rf   rZ   s   &  r#   test_hist_layout_error)TestDataFramePlots.test_hist_layout_error  s   ryy,,Q/??HIII!!!$--""hh	 . 
1 B]]:S11GG6G" 2 iiCD]]:S11GG4G  2A]]:S11GG8G$ 21 21
 21 211s$   *E?E0 FE-	0F 	F	c           	     v   \        \        P                  P                  ^4      P	                  R4      4      p\        \        P                  P                  ^4      P                  RR^
\        P                  R7      4      V^&   \        VP                  RR7       \        P                  P                  4        R# )r^   r  r  r  T)r>   Nr_   )r   r   ra   rb   rc   r   r   r  r   r+   r@   rA   tight_layoutr   s   & r#   test_tight_layout$TestDataFramePlots.test_tight_layout  s    ryy,,Q/??HIII!!!$--""hh	 . 
1 	"''5

!r"   c           	     |    \        R . ROR. RO/4      p\        VP                  RR R^^ R7      p\        V^ R7       R# )lengthanimalT)r>   columnr4   r0   r/  r/  Ng      ?      ?g333333??r   )pigrabbitrl  rl  rm  )r   r   r+   r   r  s   &  r#   test_hist_subplot_xrot)TestDataFramePlots.test_hist_subplot_xrot  sK    1C
 !GG
 	4a(r"   zcolumn, expectedc           	         \        R . ROR. ROR. R	O/. R
OR7      p\        VP                  RVRR7      p\        ^4       Uu. uF  qT^ V3,          P	                  4       NK  	  ppWb8X  g   Q hR# u upi )widthre  rm   )r   T)r>   rg  rk   N)ffffff?皙?g333333?rs  g?ri  )r   rj  g333333@r^   r<   )rl  rm  duckchickenhorser<   r   )r   r   r+   r2  	get_title)r-   rg  r   rf   rv   iresults   &&&    r#    test_hist_column_order_unchanged3TestDataFramePlots.test_hist_column_order_unchanged  s     31-
 @
 !GG	
 38(;(Qq!t*&&((;!!! <s   !A/r   c                    \        \        P                  P                  ^4      P	                  ^^
RR7      RR.R7      pVP                  VR7      p\        WBR7       R# )	r^   r  r   r   columnsr   r   Nr_   r   r   ra   rb   r   r+   r   r-   r   r   rf   r=   s   &&&  r#   r   )TestDataFramePlots.test_histtype_argument  sS     II!!!$--a'-BSRUJ
 WWhW'!"6r"   r4   r   rg  r   c                   Vf   Ve   ^M^p^V3pT;'       g    RR.pVe   V.^,          p\        ^R.,          ^R.,          ,           RR7      p\        \        P                  P	                  ^4      P                  R4      VRR.R7      p\        VP                  RRVVR	7      p\        WVR
7       Vf   Vf
   V^ ,          p\        WXRR7       F  w  r\        W4       K  	  R # )Nr   r   r   r   r   r   r   r  T)r>   r   r4   rg  rr   strictr_   )r   r   r   ra   rb   rc   r   r+   r   zipr
   )r-   r4   rg  r   r   expected_labelsr   rf   rv   expected_labelr=   s   &&&        r#   r   (TestDataFramePlots.test_hist_with_legend  s     "$0BA/0 ..S#J>./!3Oa3%i!se)+#6II!!!$44W=#J
 !GG
 	$?S:&.7D"%oD"IN 4 #Jr"   c           	     p   \        ^R.,          ^R.,          ,           RR7      p\        \        P                  P	                  ^4      P                  R4      VRR.R7      p\        P                  ! \        RR	7      ;_uu_ 4        VP                  R
WRR7       RRR4       R#   + '       g   i     R# ; i)r   r   r   r   r  r   r   r  r   rU   TrN  )r   r4   rg  r   Nr_   )
r   r   r   ra   rb   rc   rW   rX   rY   r+   )r-   r4   rg  r   rf   s   &&&  r#   r   /TestDataFramePlots.test_hist_with_legend_raises  s     a3%i!se)+#6II!!!$44W=#J
 ]]:-OPPGG4BSGA QPPPs   B$$B5	c                &   \        \        P                  P                  ^4      P	                  R4      4      p\
        P                  P                  4       w  r#VP                  P                  ^VR7      p\        VP                  4      ^
8X  g   Q hR# )r^   r   Nr_   r   r   ra   rb   rc   r@   rA   rB   r   r+   rd   re   r-   rf   rL   r=   s   &   r#   test_hist_df_kwargs&TestDataFramePlots.test_hist_df_kwargs(  sf    ryy,,Q/??HI

##%WW\\qR\(2::"$$$r"   c                J   \        \        P                  P                  ^4      P	                  R4      . ROR7      pRR.^,          VR&   \
        P                  P                  4       w  r#VP                  P                  ^VR7      p\        VP                  4      ^8X  g   Q hR# )	r^   r  r   r   Er   Nr`   rz   Ar   CDr  r  s   &   r#   test_hist_df_with_nonnumerics0TestDataFramePlots.test_hist_df_with_nonnumerics.  s    II!!!$44W=(
 *q.3

##%WW\\qR\(2::"$$$r"   c                H   \        \        P                  P                  ^4      P	                  R4      . ROR7      pRR.^,          VR&   \
        P                  P                  4       w  r#VP                  P                  VR7      p\        VP                  4      ^(8X  g   Q hR# )	r^   r  r   r   r  )r=   Nr  r  r  r  s   &   r#   %test_hist_df_with_nonnumerics_no_bins8TestDataFramePlots.test_hist_df_with_nonnumerics_no_bins9  s}    II!!!$44W=(
 *q.3

##%WW\\R\ 2::"$$$r"   c                &   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      p\        P                  P                  4       w  r#VR,          P                  P                  RVR7      pVR,          P                  P                  VRRR7       \        VRR.R	7       VP                  4       P                  4       '       g   Q hVP                  P                  4       P                  4       '       g   Q hR
# )r^   abcdr  r   T)r   r=   r   r=   r   secondary_y	b (right)labelsNr  )r   r   ra   rb   rc   listr@   rA   rB   r   r+   r
   	get_yaxisr  right_axr  s   &   r#   test_hist_secondary_legend-TestDataFramePlots.test_hist_secondary_legendD  s    II!!!$44W=tF|

 

##%W\\dr2
3R$? 	Rk(:;||~))++++{{$$&224444r"   c                <   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      p\        P                  P                  4       w  r#VR,          P                  P                  RRVR7      pVR,          P                  P                  VRRR7       \        VP                  RR	.R
7       VP                  P                  4       P                  4       '       d   Q hVP                  4       P                  4       '       g   Q hR# )r^   r  r  r   Tr   r  r=   r   r  	a (right)r  r  Nr  r   r   ra   rb   rc   r  r@   rA   rB   r   r+   r
   left_axr  r  r  s   &   r#   test_hist_secondary_secondary0TestDataFramePlots.test_hist_secondary_secondaryT  s    II!!!$44W=tF|
 

##%W\\dD
3R$? 	RZZk0JK::'')557777||~))++++r"   c                :   \        \        P                  P                  ^4      P	                  R4      \        R4      R7      p\        P                  P                  4       w  r#VR,          P                  P                  RRVR7      pVR,          P                  P                  VRR7       \        VP                  RR.R	7       VP                  P                  4       P                  4       '       g   Q hVP                  4       P                  4       '       g   Q hR
# )r^   r  r  r   Tr  r   )r=   r   r  r  Nr  r  r  s   &   r#   test_hist_secondary_primary.TestDataFramePlots.test_hist_secondary_primaryc  s    II!!!$44W=tF|
 

##%W\\dD
3R- 	RZZc0BCzz##%113333||~))++++r"   c           	        \        \        P                  R R.R\        P                  \        P                  .. RO.\        R4      R7      p\        P                  ! . RO4      p\        . RO. RO.\        R4      R7      p\        P                  ! . RO. RO.4      p\
        P                  P                  4       w  rVVP                  P                  WbR7       VP                  4        Uu. uF1  p\        V\
        P                  P                  4      '       g   K/  VNK3  	  ppV U	u. uF  qP                  4       NK  	  p
p	\
        P                  P                  4       w  r[VP                  P                  WR7       VP                  4        Uu. uF1  p\        V\
        P                  P                  4      '       g   K/  VNK3  	  ppV U	u. uF  qP                  4       NK  	  pp	\        ;QJ d'    R \!        WR	R
7       4       F  '       d   K   RM	  R	M! R \!        WR	R
7       4       4      '       g   Q h\        P                  ! RR.RR..4      pRp\
        P                  P                  4       w  pp\"        P$                  ! \&        VR7      ;_uu_ 4        VP                  P                  VVR7       RRR4       R# u upi u up	i u upi u up	i   + '       g   i     R# ; i)rs  333333?皙?abcr        ??)r=   weightsc              3   .   "   T F  w  rW8H  x  K  	  R # 5ir*   r!   ).0h0h1s   &  r#   	<genexpr>ETestDataFramePlots.test_hist_with_nans_and_weights.<locals>.<genexpr>  s     T*S28*Ss   Tr  Fz?weights must have the same shape as data, or be a single columnrU   N)rr  g?rk  )r  r  r  )r  rs  r  )r  r  r  )r  r  r  )r   r   nanr  arrayr@   rA   rB   r   r+   r<  r=  re   r>  r@  allr  rW   rX   rY   )r-   rf   r  	no_nan_dfno_nan_weightsrL   ax0r   rA  rectheightsrP   no_nan_rectsno_nan_heightsidxerror_weightsrZ   rQ   s   &                r#   test_hist_with_nans_and_weights2TestDataFramePlots.test_hist_with_nans_and_weightss  s"   ffc3#rvvrvv!6HK
 ((,-@$u+V	#46H"IJ$$&
-,,.W.q*Q@U@U2V.W167??$7$$&s;'')
)!Z3;;;P;P-QAA) 	 
 9EE//+EsT#gd*STsssT#gd*STTTTT88c4[4,$?@O$$&3]]:S11NN30@A 21 X7
 F 211s0   *,KK'K,K KKKK(	r!   r   r   r   r   )r   r   r   )rz   r   )r   r^   r   )rq  re  rm   )re  rq  rm   r   )#r  r  r  r  rW   r  r	  r  r  r!  r%  r  r*  r7  rB  rE  rK  rS  ro   r^  rb  rn  r{  r   r   r   r  r  r  r  r  r  r  r  r  r  s   @r#   r  r     s    [[, , [[( ($ [[# # [[; ; [[[[HdHd3i5IFTU;W1 1  [[U U [[< < [[* * [[   2 [[t_f5v7v7v7v7w8w8w8w8
	
==%0")& [[01*,IJ	
"", [[	
77 [[TD#;/[[Xc{35 4 05< [[TD#;/[[Xc{3
B 4 0
B%	%	%5 ,, B Br"   r  c            	         a  ] tR tRt o R tR tR tR tR tR t	R t
R	 t]P                  P                  ]P                  P                  R
. R"O. R#O. R$O.4      R 4       4       t]P                  P                  R 4       t]P                  P                  ]P                  P                  R. R%O. R&O. R'O.4      R 4       4       t]P                  P                  ]P                  P                  R/ RRRR(/.4      R 4       4       t]P                  P                  ]P                  P                  RRRRR)/^R).R. R*O/^R(..4      R 4       4       tR tR tR tR tR tR t]P                  P                  R. R+O4      R  4       tR!tV tR# ),TestDataFrameGroupByPlotsi  c           	        \         P                  P                  ^
4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   R.^
,          VR	&   \        VP                  VP                  R
7      p\        V^RR7       R# r`   r  r  r  r  r  r   r  Xr  r   rr   Nr  r   )r   ra   rb   r   rc   r   r   r  r   r  r  r   r-   rsrf   rv   s   &   r#   test_grouped_hist_legacy2TestDataFrameGroupByPlots.test_grouped_hist_legacy  s    YY""2&r))'2SEBKK""hh	  
3 ++aB'3%"*3RTTbdd+$6:r"   c           	     v   \         P                  P                  ^
4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   R.^
,          VR	&   VP                  VP                  R
7      p\        V^RR7       R# r  )r   ra   rb   r   rc   r   r   r  r+   r  r   r  s   &   r#   *test_grouped_hist_legacy_axes_shape_no_colDTestDataFrameGroupByPlots.test_grouped_hist_legacy_axes_shape_no_col  s    YY""2&r))'2SEBKK""hh	  
3 ++aB'3%"*3ww"$$w$6:r"   c           	     ~   \         P                  P                  ^4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   R.^
,          VR	&   VP                  R	^R
7      p\        V^RR7       \        V^R7       R# )r^   r  r  r  r  r  r   r  r  r  )r4   rotrr   rh  Nr  rl   )r   ra   rb   r   rc   r   r   r  r+   r   r   r  s   &   r#   #test_grouped_hist_legacy_single_key=TestDataFrameGroupByPlots.test_grouped_hist_legacy_single_key  s    YY""1%r))'2SEBKK""hh	  
3 ++aB'3%"*3ww#2w&$6:4b)r"   c                   \         P                  P                  ^4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   ^^rC^^(re\        VP                  VP                  R^VVVVRR	7	      pVP                  4        F|  pVP                  4        U	u. uF1  p	\        V	\        P                  P                   4      '       g   K/  V	NK3  	  p
p	V
R,          P#                  4       p\$        P&                  ! VR
4       K~  	  \)        WsWTVR7       R# u up	i )r^   r  r  r  r  r  r   r  T)r4   r:  r0   r.  r/  r0  r1  r   r;  r-  Nr  r   )r   ra   rb   r   rc   r   r   r  r   r  r  ravelr<  r=  r@   re   r>  r@  r5   r?  r   )r-   r  rf   r5  r6  r/  r1  rv   r=   r   rA  rm   s   &           r#   ,test_grouped_hist_legacy_grouped_hist_kwargsFTestDataFrameGroupByPlots.test_grouped_hist_legacy_grouped_hist_kwargs  s3   YY""1%r))'2SEBKK""hh	  
3 ++aB'3RBdDDtt

 **,B??,,a
1ckk>S>S0T,   2Y))+F""63/  	4TtTs   ,EEc           	        \         P                  P                  ^4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   R.^
,          VR	&   \        VP                  VP                  R
R7      p\        VRR7       R# )r^   r  r  r  r  r  r   r  r  r  T)r4   r   r   r   Nr  )r   ra   rb   r   rc   r   r   r  r   r  r  r   r  s   &   r#   %test_grouped_hist_legacy_grouped_hist?TestDataFrameGroupByPlots.test_grouped_hist_legacy_grouped_hist  s    YY""1%r))'2SEBKK""hh	  
3 ++aB'3%"*3RTTbdd5U+r"   c           	        \         P                  P                  ^4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   R.^
,          VR	&   \        P                  ! \        4      ;_uu_ 4        \        VP                  VP                  R
R7       RRR4       R#   + '       g   i     R# ; i)r^   r  r  r  r  r  r   r  r  r  r   )r4   rH  Nr  )r   ra   rb   r   rc   r   r   r  r5   rI  rJ  r   r  r  )r-   r  rf   s   &  r#   %test_grouped_hist_legacy_external_err?TestDataFrameGroupByPlots.test_grouped_hist_legacy_external_err  s    YY""1%r))'2SEBKK""hh	  
3 ++aB'3%"*3%%n55"$$244U3 6555s   1#CC/	c           	        \         P                  P                  ^4      p\        VP	                  R4      R.R7      p\        VP                  RR^
\         P                  R7      4      VR&   VP                  ^ ^^
4      VR&   R.^
,          VR	&   R
p\        P                  ! \        VR7      ;_uu_ 4        VP                  RRR7       RRR4       R#   + '       g   i     R# ; i)r^   r  r  r  r  r  r   r  r  r  z$Specify figure size by tuple insteadrU   default)r4   r(   Nr  )r   ra   rb   r   rc   r   r   r  rW   rX   rY   r+   )r-   r  rf   rZ   s   &   r#   $test_grouped_hist_legacy_figsize_err>TestDataFrameGroupByPlots.test_grouped_hist_legacy_figsize_err  s    YY""1%r))'2SEBKK""hh	  
3 ++aB'3%"*34]]:S11GGsIG. 2111s   5CC$	c                :   ^
p\        \        P                  P                  ^4      P	                  ^^VR7      4      p\        \        P                  P                  ^4      P	                  ^<^
VR7      4      p\        P                  P                  ^4      P                  ^ ^.VR7      p\        RVRVRV/4      pVP                  R4      pVP                  4       p\        V4      ^8X  g   Q h\        \        P                  P                  4       4      ^8X  g   Q hR# )r`   r~  rm   weightr   N)r   r   ra   rb   normalchoicer   groupbyr+   rd   r@   rA   r   )r-   nr  rm   
gender_intdf_intgbrv   s   &       r#   test_grouped_hist_legacy23TestDataFrameGroupByPlots.test_grouped_hist_legacy2  s    		--a077Ra7HI		--a077BQ7GHYY**1-44aV!4D
Hfh*UV^^H%wwy4yA~~3::))+,111r"   zmsg, plot_col, by_col, layoutr   rm   c           	         Tp\         P                  ! \        VR 7      ;_uu_ 4        VP                  V\	        Wd4      VR7       RRR4       R#   + '       g   i     R# ; i)rU   rg  r4   rk   N)rW   rX   rY   r+   rt   )r-   rn   rZ   plot_colby_colrk   rf   s   &&&&&& r#   test_grouped_hist_layout_error8TestDataFrameGroupByPlots.test_grouped_hist_layout_error'  s@    2 ]]:S11GG8(;FGK 2111s   AA 	c           	         Tp\         P                  ! \        R R7      ;_uu_ 4        \        VP                  RVP
                  RR7      pRRR4       \        X^RR7       R#   + '       g   i     L ; i)Fr2   rm   r  Nrr   r   )r5   r6   r7   r   r+   r   r   r   s   &&  r#    test_grouped_hist_layout_warning:TestDataFrameGroupByPlots.test_grouped_hist_layout_warningD  sS    ''eLL$RYYvD M 	$6:	 MLs   $A##A3	zlayout, check_layout, figsizeNc                b    TpVP                  R VP                  W$R7      p\        V^W4R7       R# )rm   )rg  r4   rk   r(   r{   N)r+   r   r   )r-   rn   rk   check_layoutr(   rf   rv   s   &&&&&  r#    test_grouped_hist_layout_figsize:TestDataFrameGroupByPlots.test_grouped_hist_layout_figsizeM  s-     wwh2;;vwW$<Qr"   r&   rg  rk   c                    Tp\         P                  ! \        R R7      ;_uu_ 4        \        VP                  3RR/VB pRRR4       \        X^RR7       R#   + '       g   i     L ; i)Fr2   r4   r   Nrr   r   )r5   r6   r7   r   r+   r   )r-   rn   r&   rf   rv   s   &&&  r#   #test_grouped_hist_layout_by_warning=TestDataFrameGroupByPlots.test_grouped_hist_layout_by_warningW  sP     ''eLL$RWWGGGD M$6: MLs   AA(	zkwargs, axes_num, layoutr4   c                H    TpVP                   ! R/ VB p\        WcVR 7       R# )rr   Nr!   )r+   r   )r-   rn   r&   rs   rk   rf   rv   s   &&&&&  r#   test_grouped_hist_layout_axes7TestDataFrameGroupByPlots.test_grouped_hist_layout_axes`  s$     ww  $&Ar"   c                   Tp\         P                  P                  ^^4      w  r4VP                  . ROV^ ,          R7      p\	        V^RR7       \
        P                  ! WT^ ,          4       V^ ,          P                  VJ g   Q hR# )r^   rg  r=   rr   Nrm   r  r   rw  r@   rA   rB   r+   r   r5   assert_numpy_array_equalrH   r-   rn   rf   rD   rv   returneds   &&    r#   test_grouped_hist_multiple_axes9TestDataFrameGroupByPlots.test_grouped_hist_multiple_axesm  sl    JJ''1-	77"BtAw7O(Qv>
##H1g6{!!S(((r"   c                
   Tp\         P                  P                  ^^4      w  r4VP                  RV^,          R7      p\	        V^RR7       \
        P                  ! WT^,          4       V^ ,          P                  VJ g   Q hR# )r^   r   )r4   r=   rr   Nrw  r  r  s   &&    r#   'test_grouped_hist_multiple_axes_no_colsATestDataFrameGroupByPlots.test_grouped_hist_multiple_axes_no_colsw  sk    JJ''1-	77kd1g76(Qv>
##H1g6{!!S(((r"   c                    Tp\         P                  P                  ^^4      w  r4Rp\        P                  ! \
        VR7      ;_uu_ 4        VP                  RVR7      pRRR4       R#   + '       g   i     R# ; i)r^   z@The number of passed axes must be 1, the same as the output plotrU   rm   r  N)r@   rA   rB   rW   rX   rY   r+   )r-   rn   rf   rD   rv   rZ   s   &&    r#   %test_grouped_hist_multiple_axes_error?TestDataFrameGroupByPlots.test_grouped_hist_multiple_axes_error  sV    JJ''1-	P]]:S1177(t74D 2111s   A))A:	c                Z   TpVP                  R VP                  RR7      w  r4\        V4      P                  W44      '       g   Q h\        V4      P                  W44      '       g   Q h\	        V4      P                  W44      '       d   Q h\	        V4      P                  W44      '       d   Q hR# )rm   T)rg  r4   r'  Nr+   r   r   joinedr   r-   rn   rf   rP   rQ   s   &&   r#   test_axis_share_x+TestDataFrameGroupByPlots.test_axis_share_x  s    77(ryy7F #%%c////#%%c//// c?))#3333c?))#33333r"   c                Z   TpVP                  R VP                  RR7      w  r4\        V4      P                  W44      '       g   Q h\        V4      P                  W44      '       g   Q h\	        V4      P                  W44      '       d   Q h\	        V4      P                  W44      '       d   Q hR# )rm   T)rg  r4   r(  N)r+   r   r   r  r   r  s   &&   r#   test_axis_share_y+TestDataFrameGroupByPlots.test_axis_share_y  s    77(ryy7F #%%c////#%%c//// c?))#3333c?))#33333r"   c                \   TpVP                  R VP                  RRR7      w  r4\        V4      P                  W44      '       g   Q h\        V4      P                  W44      '       g   Q h\	        V4      P                  W44      '       g   Q h\	        V4      P                  W44      '       g   Q hR# )rm   T)rg  r4   r'  r(  Nr  r  s   &&   r#   test_axis_share_xy,TestDataFrameGroupByPlots.test_axis_share_xy  s    77(ryyd7S #%%c////#%%c////#%%c////#%%c////r"   r   c                    \        \        P                  P                  ^4      P	                  ^^
RR7      RR.R7      pVP                  RVR7      p\        WBR7       R# )	r^   r~  r   r   r  )r4   r   r   Nr_   r  r  s   &&&  r#   r   0TestDataFrameGroupByPlots.test_histtype_argument  sU     II!!!$--a'-BSRUJ
 WWhW/!"6r"   r!   )z1Layout of 1x1 must be larger than required size 2r  r   rl   )z1Layout of 1x3 must be larger than required size 4rm   r   rw  )rZ  rm   r   r[  )r   r   N))r   r<   r   N)r|   r|   )r}   r   r   )r   r   r  r   )r  r  r  r  r  r  r  r  r  r  r  r  rW   r  r	  r  r  r   r  r  r
  r  r  r  r  r"  r%  r   r  r  r  s   @r#   r  r    s    ;"; *$"UH,"4"/"	2 [[[['	
.L/ 0L
 [[; ; [[[['	!8:STR	 
R
 [[[[XXx6,R'ST; U ; [[[["Hh/F;891fE	
B B
))54
4	0 [[	
77r"   r  )#__doc__r\  numpyr   rW   pandasr   r   r   r   r   pandas._testing_testingr5   pandas.tests.plotting.commonr   r   r	   r
   r   r   r   r   r   r   r   r@   r    pandas.plotting._matplotlib.histr   fixturer   r%   r  r  r!   r"   r#   <module>r1     s    ! 	       ,'-. :  N$ N$bQB QBhl7 l7r"   