
    m*iu                       % S r SSKJr  SSKrSSKrSSKrSSKrSSKJ	r	J
r
JrJrJrJr  SSKJr  SSKJrJrJrJrJr  SSKJr  SSKJr  \R8                  " S5      r\R8                  " S	5      rS
 r\" \R@                  5      \" S5      :  a  SS0SS0/r!S\"S'   OSS0SS0/r!\RF                  " \!S9S 5       r$ " S S5      r% " S S5      r&g)zTest cases for .boxplot method     )annotationsN)	DataFrame
MultiIndexSeries
date_rangeplottingtimedelta_range)_check_axes_shape_check_box_return_type_check_plot_works_check_ticks_props_check_visible)Version)pprint_thing
matplotlibzmatplotlib.pyplotc                |    UR                  5       u  p#X R                  5       ::  d   eX0R                  5       :  d   eg N)get_ylimminmax)colaxy_miny_maxs       i/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/pandas/tests/plotting/test_boxplot_method.py_check_ax_limitsr   #   s3    ;;=LEGGIGGI    3.10vertFTzlist[dict[str, bool | str]]vertsorientation
horizontalvertical)paramsc                    U R                   $ r   )param)requests    r   r   r   /   s    ==r   c                  V   \ rS rSrS r\R                  R                  \R                  R                  SSS0S/SSS	/0S/SS	/S
S.\	/S/S
S/S.S/SS
0\	/SS
S/0\	/SS0S/S
SS.\	//5      S 5       5       r
S rS rS rS rS rS rS rS r\R                  R                  S/ SQ5      S 5       rS rS rS rS rS  rS! r\R                  R                  S"S#S$S%S&S'.S#S$S%S&S'.4S(S#0S(S#04S#S#S#S#S#S'.4/5      S) 5       r\R                  R                  S*S+S,S,S-S,S'.4S.S/S/S0S/S'.4/5      S1 5       r\R                  R                  S2S#S#S3.S44/5      S5 5       r\R                  R                  S6/ S7Q5      S8 5       r\R                  R=                  S95      S: 5       r\R                  R=                  S95      S; 5       r \R                  R=                  S95      S< 5       r!\R                  R=                  S95      S= 5       r"\R                  R=                  S95      S> 5       r#S?r$g)@TestDataFramePlots4   c                |   SS K Jn  Sn[        [        R                  R                  S5      R                  / SQU5      [        R                  R                  S5      R                  / SQU5      [        R                  R                  S5      R                  / SQU5      S.[        R                  " SU5      S9nUR                  SSS	9nUR                  5        Vs/ s H  n[        UR                  5       5      PM     snUR                  R                  5       :X  d   eUR                  [        R                  " SSS
5      5        UR                  5         UR                  5        Vs/ s H  n[        UR                  5       5      PM     sn[!        [        R                  " SSS
5      5      :X  d   eg s  snf s  snf )Nr   P      )r      r-      )Clinical	Confirmed	DiscardedindexbarT)kindstacked
   )matplotlib.pyplotpyplotr   nprandomdefault_rngchoicearangeplotget_xticklabelsintget_textr4   to_list
set_xticksdrawlist)selfpltndfr   xs         r   test_stacked_boxplot_set_axis0TestDataFramePlots.test_stacked_boxplot_set_axis5   sV   'II11!4;;L!LYY2215<<\1MYY2215<<\1M
 ))Aq/
 WW%W.+-+=+=+?@+?aAJJL!+?@BHHDTDTDVVVV
bii2r*+
+-+=+=+?@+?aAJJL!+?@DIIaR E
 
 	
 
 A As   #F4(#F9zkwargs, warnreturn_typedictNcolumnonetwoindic)rQ   byindic2rU   notchr.   )rU   rW   c                \   [        [        R                  R                  S5      R	                  S5      [        [        R                  S S 5      / SQS9nSS/S-  US	'   / S
QS-  US'   [        R                  " USS9   [        UR                  40 UD6  S S S 5        g ! , (       d  f       g = f)Nr-         rZ   rR   rS   threefourr4   columnsfoor5   r/   rT   )ra   r5   ra   rV   Fcheck_stacklevel)r   r;   r<   r=   standard_normalrG   stringascii_letterstmassert_produces_warningr   boxplot)rH   kwargswarnrK   s       r   test_boxplot_legacy1'TestDataFramePlots.test_boxplot_legacy1J   s     II!!!$44V<v++BQ/03

 enq(7,q08 ''uEbjj3F3 FEEs   =B
B+c                    [        [        R                  R                  S5      R	                  S5      5      n[        [        R                  R                  USS9  g )Nr-   rZ   rP   )datarO   )	r   r;   r<   r=   rd   r   r   _coreri   )rH   sers     r   test_boxplot_legacy1_series.TestDataFramePlots.test_boxplot_legacy1_seriese   s<    RYY**1-==a@A(..00sOr   c                F   [        [        R                  R                  S5      R                  S5      SS/S9n[	        / SQ5      US'   [	        S/S	-  5      US
'   [
        R                  " [        SS9   [        UR                  SS9  S S S 5        g ! , (       d  f       g = f)Nr-   r8   r-   Col1Col2r`   
Arz   rz   rz   rz   Br{   r{   r{   r{   Xrz   r8   YFrb   rU   )
r   r;   r<   r=   r   rg   rh   UserWarningr   ri   rH   rK   s     r   test_boxplot_legacy2'TestDataFramePlots.test_boxplot_legacy2i   s    II!!!$++G4vv>N
 KL3#$3''eLbjjS1 MLLs   4B
B c                >   [        [        R                  R                  S5      R                  S5      SS/S9n[	        / SQ5      US'   [	        S/S	-  5      US
'   [
        R                  R                  5       u  p#UR                  SSUS9nUR                  nXTL d   eg )Nr-   ru   rv   rw   rx   ry   r|   rz   r8   r}   )rU   r   )
r   r;   r<   r=   r   mplr:   subplotsri   axes)rH   rK   _r   r   ax_axess         r   test_boxplot_legacy2_with_ax/TestDataFramePlots.test_boxplot_legacy2_with_axr   s    II!!!$++G4vv>N
 KL3#$3 

##%zz&SRz0''r   c                `   [        [        R                  R                  S5      R                  S5      SS/S9n[	        / SQ5      US'   [	        S/S	-  5      US
'   [
        R                  R                  5       u  p#UR                  S
5      R                  USS9nUR                  nXTS   L d   eg )Nr-   ru   rv   rw   rx   ry   r|   rz   r8   r}   r   r   rO   )r   r;   r<   r=   r   r   r:   r   groupbyri   r   )rH   rK   figr   r   r   s         r   (test_boxplot_legacy2_with_ax_return_type;TestDataFramePlots.test_boxplot_legacy2_with_ax_return_type   s    II!!!$++G4vv>N
 KL3#$3**%%'zz#&&"&&A''s)###r   c                   [        [        R                  R                  S5      R                  S5      SS/S9n[	        / SQ5      US'   [	        S/S	-  5      US
'   [
        R                  R                  5       u  p#[        R                  " [        5         UR                  SS/SUSS9nS S S 5        WS   R                  5       UL d   eg ! , (       d  f       N'= f)Nr-   ru   rv   rw   rx   ry   r|   rz   r8   r}   r   )rQ   rU   r   rO   )r   r;   r<   r=   r   r   r:   r   rg   rh   r   ri   
get_figure)rH   rK   r   r   r   s        r   #test_boxplot_legacy2_with_multi_col6TestDataFramePlots.test_boxplot_legacy2_with_multi_col   s    II!!!$++G4vv>N
 KL3#$3**%%'''4::'CBF  D 5 F|&&(C///	 54s   C
Cc                   [        [        R                  R                  S5      R                  S5      SS/S9n[	        / SQ5      US'   [	        S/S	-  5      US
'   [
        R                  R                  5       u  p#UR                  USS9n[        [        R                  R                  UR                  5       5      5      n[        UR                  5       5      [        U5      :X  d   eg )Nr-   ru   rv   rw   rx   ry   r|   rz   r8   r}   rP   r   )r   r;   r<   r=   r   r   r:   r   ri   rG   	itertoolschainfrom_iterablevalueslen	get_lines)rH   rK   r   r   dliness         r   test_boxplot_legacy2_by_none/TestDataFramePlots.test_boxplot_legacy2_by_none   s    II!!!$++G4vv>N
 KL3#$3 

##%JJ"&J1Y__22188:>?2<<>"c%j000r   c                z    UR                  5       n[        U[        R                  R                  5      (       d   eg r   )ri   
isinstancer   r:   Axes)rH   hist_dfresults      r   test_boxplot_return_type_none0TestDataFramePlots.test_boxplot_return_type_none   s)    "&#**//2222r   c                j   [        [        R                  R                  S5      R	                  S5      [        [        R                  S S 5      / SQS9nSn[        R                  " [        US9   UR                  SS	9  S S S 5        UR                  5       n[        US
5        g ! , (       d  f       N+= f)Nr-   rY   rZ   r\   r_   z,return_type must be {'axes', 'dict', 'both'}match
NOT_A_TYPErO   r   )r   r;   r<   r=   rd   rG   re   rf   pytestraises
ValueErrorri   r   )rH   rK   msgr   s       r   test_boxplot_return_type_legacy2TestDataFramePlots.test_boxplot_return_type_legacy   s     II!!!$44V<v++BQ/03

 =]]:S1JJ<J0 2 vv.	 21s   /B$$
B2rP   r   bothc                @   [        [        R                  R                  S5      R	                  S5      [        [        R                  S S 5      / SQS9n[        R                  " S5         UR                  US9nS S S 5        [        WU5        g ! , (       d  f       N= f)Nr-   rY   rZ   r\   r_   Fr   )r   r;   r<   r=   rd   rG   re   rf   rg   rh   ri   r   )rH   rO   rK   r   s       r   +test_boxplot_return_type_legacy_return_type>TestDataFramePlots.test_boxplot_return_type_legacy_return_type   s{     II!!!$44V<v++BQ/03

 ''.ZZKZ8F /v{3 /.s   *B
Bc                ,   UR                  5       n[        R                  R                  S5      R	                  SSUR
                  S   5      US'   UR                  SS/SS	9u  p4[        US   U5        [        US   U5        UR                  U:X  d   eg )
Nr-   r.      r   ageheightweightcategoryr~   	copyr;   r<   r=   integersshaperi   r   _sharey)rH   r   rK   	height_ax	weight_axs        r   test_boxplot_axis_limits+TestDataFramePlots.test_boxplot_axis_limits   s    \\^II))!,55aRXXa[I5	!zz8X*>:zN	Hy1Hy1  I---r   c                   UR                  5       n[        R                  R                  S5      R	                  SSUR
                  S   5      US'   UR                  / SQSS9nUS	   US
   US   penUS   n[        US   U5        [        US   U5        [        US   U5        UR                  U:X  d   eUR                  U:X  d   eUR                  b   eg )Nr-   r.   r   r   r   )r   r   r   r   r~   )r   r   )r   r.   )r.   r   r.   r.   r   r   r   )rH   r   rK   pr   r   age_axdummy_axs           r   !test_boxplot_axis_limits_two_rows4TestDataFramePlots.test_boxplot_axis_limits_two_rows   s    \\^II))!,55aRXXa[I5	JJ2zJB'(w$4f	T7Hy1Hy1EF+  I---~~***'''r   c                    [        [        R                  R                  S5      R	                  S5      5      n[        R
                  UR                  S S 2S4'   [        UR                  SS9  g )Nr-   )r   r[   r   r   r   )	r   r;   r<   r=   rd   nanlocr   ri   r   s     r   test_boxplot_empty_column,TestDataFramePlots.test_boxplot_empty_column   sI    ryy,,Q/??HIvvq!t"**&9r   c                ,   [        [        R                  R                  S5      R                  S5      / SQS9nUR	                  SSS9nUR
                  R                  R                  S:X  d   eUR
                  R                  R                  S	:X  d   eg )
Nr-   )r8      )rz   r{   CDErx   r   )      )rO   figsizer   r   )	r   r;   r<   r=   ri   figurebbox_incheswidthr   )rH   rK   r   s      r   test_figsizeTestDataFramePlots.test_figsize   s|    II!!!$++G4>W
 @}}((.."444}}((//1444r   c                T    [        S/ SQ05      n[        UR                  SSS9SSS9  g )Nar.   r-   r/   r[   r   rZ      )fontsize
xlabelsize
ylabelsizer   r   ri   r   s     r   test_fontsize TestDataFramePlots.test_fontsize   s,    /012::cB:7BSUVr   c                   [        [        SSS9[        R                  R	                  S5      R                  S5      [        R                  R	                  S5      R                  S5      S-   [        SSS9R                  [        5      [        SSSS9[        SSS9S.5      nUR                  S	S
9nUR                  5        Vs/ s H  o3R                  5       PM     snSS/:X  d   eg s  snf )Nz
2012-01-01d   )periodsr-   UTC)r   tzz1 days)r   bcr   efbox)r6   r   r   )r   r   r;   r<   r=   rd   astypestrr	   r@   rA   rC   )rH   rK   r   rL   s       r   test_boxplot_numeric_data,TestDataFramePlots.test_boxplot_numeric_data   s    c:YY**1-==cBYY**1-==cBQFc:AA#FceD$Xs;	
 WW%W &(&8&8&:;&:

&:;SzIII;s   C(zcolors_kwd, expectedrr   gr   )boxeswhiskersmedianscapsr   c                    [        [        R                  R                  S5      R                  S5      5      nUR	                  USS9nUR                  5        H   u  pVXE   S   R                  5       U:X  a  M    e   g )Nr-   ru   rP   colorrO   r   )r   r;   r<   r=   ri   items	get_color)rH   
colors_kwdexpectedrK   r   kvs          r   test_color_kwd!TestDataFramePlots.test_color_kwd   sj     ryy,,Q/66w?@*&ANN$DA9Q<))+q000 %r   zscheme,expecteddark_backgroundz#8dd3c7z#bfbbd9defaultz#1f77b4z#2ca02cc                N   [        [        R                  R                  S5      R                  S5      5      nSS KJn  UR                  R                  U5        UR                  R                  SS9nUR                  5        H   u  pgXV   S   R                  5       U:X  a  M    e   g )Nr-   ru   r   rP   r   )r   r;   r<   r=   r9   r:   styleuser@   r   r  r  )rH   schemer  rK   rI   r   r  r  s           r   test_colors_in_theme'TestDataFramePlots.test_colors_in_theme  s    2 ryy,,Q/66w?@'		f0NN$DA9Q<))+q000 %r   zdict_colors, msg)r   invalid_keyzinvalid key 'invalid_key'c                    [        [        R                  R                  S5      R                  S5      5      n[        R
                  " [        US9   UR                  USS9  S S S 5        g ! , (       d  f       g = f)Nr-   ru   r   rP   r   )r   r;   r<   r=   r   r   r   ri   )rH   dict_colorsr   rK   s       r   test_color_kwd_errors(TestDataFramePlots.test_color_kwd_errors1  sR     ryy,,Q/66w?@]]:S1JJ[fJ= 211s   A++
A9zprops, expected))boxpropsr   )whiskerpropsr   )cappropsr   )medianpropsr   c           	        [        S Vs0 s H1  o3[        R                  R                  S5      R                  S5      _M3     sn5      nUSS00nUR                  " S	SS0UD6nXb   S   R                  5       S:X  d   eg s  snf )
NABCr-   r8   r   C1rO   rP   r    )r   r;   r<   r=   ri   r  )rH   propsr  r  rK   kwdr   s          r   test_specified_props_kwd+TestDataFramePlots.test_specified_props_kwd;  s     N1299003::2>>NOwo&66#6",,.$666	 Os   8A?z!ignore:set_ticklabels:UserWarningc                   [        [        R                  R                  S5      R	                  S5      [        R                  R                  S5      R	                  S5      [        R                  R                  S5      R                  SS/S5      S.5      nSu  p4UR                  " S	SX4S.UD6nUR                  5       U:X  d   eUR                  5       U:X  d   eg )
Nr-   r8   group1group2r   r   grouprL   yr   )r6   xlabelylabelr  )	r   r;   r<   r=   rd   r>   r@   
get_xlabel
get_ylabelrH   r   rK   r)  r*  r   s         r   test_plot_xlabel_ylabel*TestDataFramePlots.test_plot_xlabel_ylabelL  s    YY**1-==bAYY**1-==bA..q188(H9MrR
 "WWF%FF}}&(((}}&(((r   c                .   [         R                  R                  S5      n[        UR	                  SSSS9[        S5      S9n[        UR	                  SSSS9[        S5      S9nSu  pV[        R                  SS	S
S9u  pxUR                  R                  " SUS   XVS.UD6  UR                  R                  " SUS   XVS.UD6  U H/  n	U	R                  5       U:X  d   eU	R                  5       U:X  a  M/   e   [        R                  R                  5         g )Nr-   r   r   )r   r[   sizeABCDrx   r'  )r8      T)ncolsr   sharey)r   r)  r*  r.   r  )r;   r<   r=   r   r   rG   rI   r   r@   r   r+  r,  r   r:   close)
rH   r   rngdf1df2r)  r*  r   axsr   s
             r   test_plot_box TestDataFramePlots.test_plot_boxZ  s     ii##A&Q(;T&\RQ(;T&\R!AwtDEAvEEEAvEEB==?f,,,==?f,,,  	

r   c                   [        [        R                  R                  S5      R	                  S5      [        R                  R                  S5      R	                  S5      [        R                  R                  S5      R                  SS/S5      S.5      nSu  p4UR                  " SX4S.UD6nUR                  5       U:X  d   eUR                  5       U:X  d   eg )	Nr-   r8   r#  r$  r%  r'  )r)  r*  r  )	r   r;   r<   r=   rd   r>   ri   r+  r,  r-  s         r   test_boxplot_xlabel_ylabel-TestDataFramePlots.test_boxplot_xlabel_ylabelj  s    YY**1-==bAYY**1-==bA..q188(H9MrR
 "ZZ=v==}}&(((}}&(((r   c                   [        [        R                  R                  S5      R	                  S5      [        R                  R                  S5      R	                  S5      [        R                  R                  S5      R                  SS/S5      S.5      nSu  p4UR                  " S	SX4S.UD6nU H/  nUR                  5       U:X  d   eUR                  5       U:X  a  M/   e   [        R                  R                  5         g )
Nr-   r8   r#  r$  r%  r'  r&  )rU   r)  r*  r  )r   r;   r<   r=   rd   r>   ri   r+  r,  r   r:   r7  )rH   r   rK   r)  r*  r   subplots          r    test_boxplot_group_xlabel_ylabel3TestDataFramePlots.test_boxplot_group_xlabel_ylabelx  s    YY**1-==bAYY**1-==bA..q188(H9MrR
 "ZZI76IDIG%%'6111%%'6111  	

r   c                   [        [        R                  5      [        S5      :  a7  USS0:X  a/  UR                  [        R
                  R                  U S3S95        [        [        R                  R                  S5      R                  S5      [        R                  R                  S5      R                  S5      [        R                  R                  S5      R                  SS	/S5      S
.5      nUR                  " SSS0UD6nU HE  nUSS0:X  d  USS0:X  a  UR                  5       OUR                  5       nU[!        S/5      :X  a  ME   e   [        R"                  R%                  5         g )Nr   r!   r"   z$ fails starting with matplotlib 3.10)reasonr-   r8   r#  r$  r%  rU   r&  r   Tr#   r  )r   r   __version__applymarkerr   markxfailr   r;   r<   r=   rd   r>   ri   r+  r,  r   r:   r7  )rH   r   r'   rK   r   rB  target_labels          r   #test_boxplot_group_no_xlabel_ylabel6TestDataFramePlots.test_boxplot_group_no_xlabel_ylabel  sL   3??#wv64<D
 <
 !!D61U)V!W YY**1-==bAYY**1-==bA..q188(H9MrR
 ZZ+7+d+G FD>)M:66 ""$ '')	   <	#::::  	

r   r  )%__name__
__module____qualname____firstlineno__rM   r   rI  slowparametrizer   rl   rr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r   filterwarningsr.  r<  r?  rC  rL  __static_attributes__r  r   r   r)   r)   4   s   
* [[[[V$d+'.g6D':;TBG_k*Wh'(+6q\4 a(+6		
4 4P2	$013
/ [[],DE
4 F
4.(:
5WJ [[ 33L33L s^gs^,CSS#NO	

1
1 [[ "& )(%	 & )(%		
.1/.1 [[
,.I	JK>	> [[	
77 [[ CD) E) [[ CD E [[ CD) E) [[ CD E [[ CD Er   r)   c            
         \ rS rSrS rS r\R                  R                  S 5       r	\R                  R                  S 5       r
\R                  R                  SS\SS	// S
Q/5      S 5       rS rS r\R                  R                  S 5       r\R                  R                  S 5       r\R                  R                  \R                  R                  S/ SQ5      S 5       5       r\R                  R                  \R                  R                  S/ SQ5      S 5       5       r\R                  R                  S 5       r\R                  R                  S 5       r\R                  R                  S 5       r\R                  R                  \R                  R                  S/ SQ/ SQ/ SQ/5      S 5       5       r\R                  R                  \R                  R                  SSS/SS/S S//5      S! 5       5       r\R                  R                  S" 5       r\R                  R                  \R                  R                  S#S$S%/5      S& 5       5       r\R                  R                  \R                  R                  S'S(S(/S%S//5      S) 5       5       r\R                  R                  \R                  R                  S*S(S(/S%S//5      S+ 5       5       r\R                  R                  S, 5       r\R                  R                  S- 5       r\R                  R                  S. 5       rS/ r \R                  R                  S0S1/ S2Q4S1// S2Q4S3/ S4Q4S1S3// S5Q4S6/ S5Q4/5      S7 5       r!S8 r"S9 r#S:r$g6);TestDataFrameGroupByPlotsi  c                    UR                  SS9n[        R                  " [        SS9   [	        UR
                  SS9nS S S 5        [        [        WR                  5      SSS	9  g ! , (       d  f       N-= f)
Ngenderr~   Frb   r   r   r-   )r.   r-   axes_numlayout)	r   rg   rh   r   r   ri   r
   rG   r   rH   r   groupedr   s       r   rl   .TestDataFrameGroupByPlots.test_boxplot_legacy1  sW    //X/.''eL$W__&ID M$t{{+aG MLs   A%%
A3c                b    UR                  SS9n[        UR                  SSS9n[        USSS9  g )	NrY  r~   Fr   r   rO   r.   r   rZ  )r   r   ri   r
   r]  s       r    test_boxplot_legacy1_return_type:TestDataFrameGroupByPlots.test_boxplot_legacy1_return_type  s0    //X/. 5fU$6:r   c                   [        [        R                  S S [        S5      5      n[	        [
        R                  R                  S5      R                  S5      [        R                  " U5      S9nUR                  SS9n[        R                  " [        SS9   [        UR                  S	S
9nS S S 5        [!        [#        WR$                  5      SSS9  g ! , (       d  f       N-= f)Nr8   r-   r8   r/   r3   r.   levelFrb   r   r   )r[   r/   rZ  )zipre   rf   ranger   r;   r<   r=   r   from_tuplesr   rg   rh   r   r   ri   r
   rG   r   rH   tuplesrK   r^  r   s        r   r   .TestDataFrameGroupByPlots.test_boxplot_legacy2  s    V))#2.b	:II!!!$++G4((0
 **1*%''eL$W__&ID M$t{{+bH MLs   C
C#c                B   [        [        R                  S S [        S5      5      n[	        [
        R                  R                  S5      R                  S5      [        R                  " U5      S9nUR                  SS9n[        UR                  SSS	9n[        USS
S9  g )Nr8   r-   re  r3   r.   rf  Fr   ra  r   rZ  )rh  re   rf   ri  r   r;   r<   r=   r   rj  r   r   ri   r
   rk  s        r    test_boxplot_legacy2_return_type:TestDataFrameGroupByPlots.test_boxplot_legacy2_return_type  s    V))#2.b	:II!!!$++G4((0
 **1*% 5fU$6:r   z subplots, warn, axes_num, layoutTr/   r-   r-   )FNr.   r   c                $   [        [        R                  S S [        S5      5      n[	        [
        R                  R                  S5      R                  S5      [        R                  " U5      S9nSn[        R                  " [        US9   UR                  SS9R                  S	SS
9nS S S 5        [        R                  " USS9   [        WR                   USS9n	S S S 5        [#        W	X4S9  g ! , (       d  f       NL= f! , (       d  f       N*= f)Nr8   r-   re  r3   z+DataFrame.groupby with axis=1 is deprecatedr   r.   rf  r   )rg  axisFrb   r   ra  rZ  )rh  re   rf   ri  r   r;   r<   r=   r   rj  rg   rh   FutureWarningunstackr   r   ri   r
   )
rH   r   rk   r[  r\  rl  rK   r   r^  r   s
             r   test_boxplot_legacy3.TestDataFrameGroupByPlots.test_boxplot_legacy3  s    
 V))#2.b	:II!!!$++G4((0
 <''SAjjqj)111BG B''uE$(D F 	$A BAEEs   C0D0
C>
Dc                   Sn[        [        R                  R                  S5      R	                  SSUS95      n[        [        R                  R                  S5      R	                  SSUS95      n[        R                  R                  S5      R                  SS/US9n[        X2US	.5      nUR                  S
5      nUR                  5       n[        [        R                  R                  5       5      S:X  d   e[        U5      S:X  d   e[        R                  S5        UR                  SS9n[        [        R                  R                  5       5      S:X  d   e[        U5      S:X  d   eg )Nr8   r-      r   r1  <   malefemaler   r   rY  rY  allr   r   r.   )r   r;   r<   r=   normalr>   r   r   r@   r   r   r:   get_fignumsrI   r7  ri   )rH   rJ   r   r   rY  rK   gbress           r   test_grouped_plot_fignums3TestDataFrameGroupByPlots.test_grouped_plot_fignums  s*   		--a077Ra7HI		--a077BQ7GH&&q)00&(1C!0L&fMNZZ!ggi3::))+,1113x1}}		%jjVj,3::))+,1113x1}}r   c                   Sn[        [        R                  R                  S5      R	                  SSUS95      n[        [        R                  R                  S5      R	                  SSUS95      n[        R                  R                  S5      R                  SS/US9n[        X2US	.5      nUR                  S
5      R                  5         g )Nr8   r-   ry  r   r1  rz  r{  r|  r}  rY  )	r   r;   r<   r=   r  r>   r   r   hist)rH   rJ   r   r   rY  rK   s         r   &test_grouped_plot_fignums_excluded_col@TestDataFrameGroupByPlots.test_grouped_plot_fignums_excluded_col  s    		--a077Ra7HI		--a077BQ7GH&&q)00&(1C!0L&fMN


8!!#r   c                    UnUR                  SS9n[        U[        R                  5      (       d   e[	        US / SQS9  g )NrY  r~   r   r   r   expected_keys)ri   r   r;   ndarrayr   rH   r   rK   r   s       r   test_grouped_box_return_type6TestDataFrameGroupByPlots.test_grouped_box_return_type  s@     x(&"**----D(H	
r   c                ^    UnUR                  S5      R                  SS9n[        USSS/S9  g )NrY  rP   r   MaleFemaler  r   ri   r   r  s       r   $test_grouped_box_return_type_groupby>TestDataFrameGroupByPlots.test_grouped_box_return_type_groupby  s4    H%--&-Avvfh=OPr   rO   r   c                    UnUR                  S5      R                  US9n[        XB/ SQS9  UR                  SUS9n[        XB/ SQS9  g )N	classroomr   rz   r{   r   r  rU   rO   r  r  )rH   r   rO   rK   returneds        r    test_grouped_box_return_type_arg:TestDataFrameGroupByPlots.test_grouped_box_return_type_arg  sO     ::k*22{2KxOT::+:F1Q	
r   c                D   SR                  5       n[        [        R                  R	                  S5      R                  S5      US9nSR                  5       nUS-  US'   UR                  S5      R                  US9n[        XQUS	9  UR                  SUS
9n[        XQUS	9  g )Nz	X B C D Ar-   )rZ   r   rx   zA Br/   r   r   r  r  )	splitr   r;   r<   r=   rd   r   ri   r   )rH   rO   columns2r:  categories2r  s         r   .test_grouped_box_return_type_arg_duplcate_catsHTestDataFrameGroupByPlots.test_grouped_box_return_type_arg_duplcate_cats  s     $$&II!!!$44V<h
 kkm%/J;;z*22{2KxKP;;*+;FxHMr   c                    UnSn[         R                  " [        US9   UR                  SS/UR                  SS9  S S S 5        g ! , (       d  f       g = f)Nz1Layout of 1x1 must be larger than required size 2r   r   r   r   rQ   rU   r\  r   r   r   ri   rY  rH   r   rK   r   s       r   !test_grouped_box_layout_too_small;TestDataFrameGroupByPlots.test_grouped_box_layout_too_small"  sA    A]]:S1JJx2ryyJP 211   A
Ac                    UnSn[         R                  " [        US9   UR                  / SQSSS9  S S S 5        g ! , (       d  f       g = f)Nz7The 'layout' keyword is not supported when 'by' is Noner   r  )r-   r.   rP   rQ   r\  rO   )r   r   r   ri   r  s       r    test_grouped_box_layout_needs_by:TestDataFrameGroupByPlots.test_grouped_box_layout_needs_by*  s@    G]]:S1JJ7"   211s	   ;
A	c                    UnSn[         R                  " [        US9   UR                  SS/UR                  SS9  S S S 5        g ! , (       d  f       g = f)Nz1At least one dimension of layout must be positiver   r   r   )r  r  r  r  s       r   'test_grouped_box_layout_positive_layoutATestDataFrameGroupByPlots.test_grouped_box_layout_positive_layout5  sA    A]]:S1JJx2ryyJR 211r  zgb_key, axes_num, rows)rY  r-   r.   )r   r[   r-   )r  r/   r-   c                   Un[         R                  " [        SS9   [        UR	                  U5      R
                  SSS9  S S S 5        [        [        R                  R                  5       R                  X4S4S9  g ! , (       d  f       NA= f)NFrb   r   rP   rQ   rO   r-   rZ  rg   rh   r   r   r   ri   r
   r   r:   gcfr   )rH   r   gb_keyr[  rowsrK   s         r   ,test_grouped_box_layout_positive_layout_axesFTestDataFrameGroupByPlots.test_grouped_box_layout_positive_layout_axes<  si     ''eL

6"**8 M 	#**..*//(RS9U	 MLs   %A<<
B
zcol, visibler   Fr   r   c                   UnUR                  / SQSSS9n[        [        R                  R	                  5       R
                  SSS9  XR   n[        UR                  5       US9  [        UR                  R                  5       /US9  g )	Nr  rY  r   )rQ   rU   rO   r/   rq  rZ  )visible)
ri   r
   r   r:   r  r   r   rA   xaxis	get_label)rH   r   r   r  rK   r   r   s          r   test_grouped_box_layout_visible9TestDataFrameGroupByPlots.test_grouped_box_layout_visibleL  sv    
 zz3f  
 	#**..*//!FKYr))+W=**,-w?r   c                    UnUR                  S5      R                  / SQSS9  [        [        R                  R                  5       R                  SSS9  g )Nr  r  rP   r  r/   rq  rZ  r   ri   r
   r   r:   r  r   )rH   r   rK   s      r   test_grouped_box_layout_shape7TestDataFrameGroupByPlots.test_grouped_box_layout_shape[  sG    


;''3 	( 	
 	#**..*//!FKr   colsr-   r  c                   Un[         R                  " [        SS9   [        UR	                  S5      R
                  SSU4SS9  S S S 5        [        [        R                  R                  5       R                  SS	S
9  g ! , (       d  f       N@= f)NFrb   r   r   r/   rP   r  r[   )r/   r-   rZ  r  )rH   r   r  rK   s       r   test_grouped_box_layout_works7TestDataFrameGroupByPlots.test_grouped_box_layout_worksc  so     ''eL

:&..4y"	 M 	#**..*//!FK MLs   (A>>
Bz	rows, resr[   c                    UnUR                  / SQSUS4S9  [        [        R                  R	                  5       R
                  SUS4S9  g )Nr  rY  r.   r  r/   rZ  )ri   r
   r   r:   r  r   )rH   r   r  r  rK   s        r   'test_grouped_box_layout_axes_shape_rowsATestDataFrameGroupByPlots.test_grouped_box_layout_axes_shape_rowsp  sI     


3$PQ 	 	
 	#**..*//!S!HMr   z	cols, resc                    UnUR                  S5      R                  / SQSU4SS9  [        [        R                  R                  5       R                  SSU4S9  g )Nr  r  r.   rP   r  r/   rZ  r  )rH   r   r  r  rK   s        r   /test_grouped_box_layout_axes_shape_cols_groupbyITestDataFrameGroupByPlots.test_grouped_box_layout_axes_shape_cols_groupbyy  sU     


;''3t9 	( 	

 	#**..*//!QHMr   c                V   Un[         R                  " [        5         [        R                  R                  SS5      u  p4UR                  S5      R                  SSUS9  [        [        R                  R                  5       R                  SSS9  S S S 5        g ! , (       d  f       g = f)	Nr-   r   r   r   rQ   rO   r   r[   rq  rZ  )rg   rh   r   r   r:   r   r   ri   r
   r  r   )rH   r   rK   r   r   s        r   test_grouped_box_multiple_axes8TestDataFrameGroupByPlots.test_grouped_box_multiple_axes  sy      ''4jj))!Q/GAJJz"**(SW*Xcjjnn.33aO 544s   A4B
B(c                   Un[         R                  R                  SS5      u  p4[        R                  " [
        5         UR                  / SQSSUS   S9nS S S 5        [        R                  " [        WR                  5      5      n[        USSS	9  [        R                  " XTS   5        US   R                  UL d   e[        R                  " [
        5         UR                  S
5      R                  / SQSUS   S9nS S S 5        [        R                  " [        UR                  5      5      n[        USSS	9  [        R                  " XTS   5        US   R                  UL d   eg ! , (       d  f       GN= f! , (       d  f       N= f)Nr-   r/   r  rY  r   r   )rQ   rU   rO   r   )r.   r/   rZ  r  r.   r  )r   r:   r   rg   rh   r   ri   r;   arrayrG   r   r
   assert_numpy_array_equalr   r   )rH   r   rK   r   r   r  s         r   %test_grouped_box_multiple_axes_on_fig?TestDataFrameGroupByPlots.test_grouped_box_multiple_axes_on_fig  sH    JJ''1-	''4zz7"7	 " H 5 88D12(Qv>
##H1g6{!!S((( ''4zz+.667VPTUVPW 7 H 5 88D12(Qv>
##H1g6{!!S((() 54 54s   E*&E<*
E9<
F
c                Z   UnSn[         R                  " [        US9   [        R                  R                  SS5      u  pE[        R                  " [        5         UR                  S5      R                  US9nS S S 5        S S S 5        g ! , (       d  f       N= f! , (       d  f       g = f)Nz@The number of passed axes must be 3, the same as the output plotr   r-   r/   r  )r   )r   r   r   r   r:   r   rg   rh   r   r   ri   )rH   r   rK   r   r   r   s         r   'test_grouped_box_multiple_axes_ax_errorATestDataFrameGroupByPlots.test_grouped_box_multiple_axes_ax_error  s}     P]]:S1

++Aq1IC++K8zz+.66$6? 9 21 98 21s#   =BB:B
B	B
B*c                \    [        / SQ/ SQS.5      n[        UR                  SSSS9SSS9  g )	Nr   )r   r   r   r.   r.   r.   )r   r   r   r   r   )rU   r   r   r   r   s     r   r   'TestDataFrameGroupByPlots.test_fontsize  s1    /6HIJJJssRJ0RB	
r   zcol, expected_xticklabelr  )(a, v)(b, v)(c, v)(d, v)(e, v)v1)(a, v1)(b, v1)(c, v1)(d, v1)(e, v1))
r  r  r  r  r  r  r  r  r  r  Nc                   [        [        R                  R                  S5      R	                  [        S5      S5      [        R                  R                  S5      R                  S5      [        R                  R                  S5      R                  S5      S.5      nUR                  S5      n[        UR                  SUSS9nUR                  5        Vs/ s H  ofR                  5       PM     nnX':X  d   eg s  snf )	Nr-   abcder   )catr  r  r  Fr   )r   rQ   rO   )r   r;   r<   r=   r>   rG   r   r   ri   rA   rC   )rH   r   expected_xticklabelrK   r^  r   rL   result_xticklabels           r   #test_groupby_boxplot_subplots_false=TestDataFrameGroupByPlots.test_groupby_boxplot_subplots_false  s    P yy,,Q/66tG}cJYY**1-44S9ii++A.55c:
 **U# OOeCV
 483G3G3IJ3IaZZ\3IJ"777 Ks   C:c                    UR                  S5      nUR                  S5      nSn[        R                  " [        US9   [        UR                  SS9  S S S 5        g ! , (       d  f       g = f)NobjectrY  z:boxplot method requires numerical columns, nothing to plotr   F)r   )r   r   r   r   r   r   ri   )rH   r   rK   r^  r   s        r   test_groupby_boxplot_object5TestDataFrameGroupByPlots.test_groupby_boxplot_object  sK    ^^H%**X&J]]:S1goo> 211s   A
A*c                   / SQ/ SQ/n[        [        U6 5      n[        R                  " USS/S9n[	        [
        R                  R                  S5      R                  S5      / SQUS	9nS
S/n[        UR                  USS9nSS/nUR                  5        Vs/ s H  oR                  5       PM     n	nXy:X  d   eg s  snf )N)r5   r5   bazr  ra   ra   quxr  )rR   rS   rR   rS   rR   rS   rR   rS   firstsecond)namesr-   )r/   r   r  r_   )r5   rR   )r5   rS   r   r  z
(bar, one)z
(bar, two))rG   rh  r   rj  r   r;   r<   r=   rd   r   ri   rA   rC   )
rH   arraysrl  r4   rK   r   r   r  rL   r  s
             r   test_boxplot_multiindex_column8TestDataFrameGroupByPlots.test_boxplot_multiindex_column  s     ED
 c6l#&&vgx5HIII!!!$44V<!
 ~. CVL+\:373G3G3IJ3IaZZ\3IJ"777 Ks   B<r  )%rN  rO  rP  rQ  rl   rb  r   rI  rR  r   ro  rS  r   rv  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  rU  r  r   r   rW  rW    s   H;
 [[	I 	I [[; ; [[*
Q	')ABB	B"$ [[
 
 [[Q Q [[[[],DE	
 F 	
 [[[[],DEN F N [[Q Q [[  [[S S [[[[ 	-/BC	V	 
	V [[[[(E*Xt,<z4>PQ	@ 	@ [[L L [[[[VaW-	L . 	L [[[[[Aq6B7*;<N = N [[[[[Aq6B7*;<N = N [[P P [[) )4 [[@ @
 [["DEUFGJKd  '"	
%L8M%L8$?8r   rW  )'__doc__
__future__r   r   re   numpyr;   r   pandasr   r   r   r   r   r	   pandas._testing_testingrg   pandas.tests.plotting.commonr
   r   r   r   r   pandas.util.versionr   pandas.io.formats.printingr   importorskipr   rI   r   rG  r    __annotations__fixturer   r)   rW  r  r   r   <module>r     s    & "        ( 3,'-. 3??gfo-+15/FD>)JE&J\*]J,GHE u l l^o8 o8r   