
    bMh>                    d   d Z ddlmZmZ ddlZddlZddlZddlZddlZddlZ	ddl
Z
ddlmc mZ ddlmZ ddlZddlmZmZmZmZmZmZmZmZmZ ddlmZ ddlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z, ddl-m.Z. ddl/m0Z0  e
j1        d	          Z2 e
j1        d
          Z3 G d d          Z4d Z5dS )z Test cases for DataFrame.plot     )datedatetimeN)is_list_like)		DataFrameIndex
MultiIndexPeriodIndexSeriesbdate_range
date_rangeoption_contextplotting)_check_ax_scales_check_axes_shape_check_box_return_type_check_colors_check_data_check_grid_settings_check_has_errorbars_check_legend_labels_check_plot_works_check_text_labels_check_ticks_props_check_visible
get_y_axis)Versionpprint_thing
matplotlibzmatplotlib.pyplotc                   '   e Zd Zej        j        d             Zej        j        d             Zej        j        d             Zej        j        d             Z	ej        
                    d          ej        j        d                         Zej        j        d             Zej        j        ej                            d	d
g didg didddddddg          d                         Zej        j        d             Zej        j        d             Zej        j        d             Zej        j        d             Zej        j        ej                            dddg          d                         Zej        j        d             Zej                            d ed          ddgddgddgd dgd dgdd gdd gdd gdd gdd!gdd!gdd"gdd"gg          d#             Zej        j        ej                            d$g d%          d&                         Zej        j        ej                            d'd(i gd)i gd*i gd+d,d,igd-d.d,d/gd0d.d,d/gg          d1                         Zd2 Zd3 Zd4 Zd5 Zd6 Zd7 Zej                            d8d9d:g          d;             Zej                            d<g d=          d>             Z d? Z!d@ Z"dA Z#dB Z$dC Z%dD Z&ej                            dEe'j(        e'j)        g          dF             Z*ej                            dG e+d,g dHig dIJ           e+d,dKdLe'j,        dMdNdOdPgidLdKdMdQe'j,        dMdQgJ          g          dR             Z-dS Z.dT Z/dU Z0ej                            dVd(dWg          ej                            dXdYdZg          d[                         Z1ej                            dVd(dWg          d\             Z2d] Z3ej                            dVd(dWg          d^             Z4ej                            d_ e5d`           e6dad!d`b          g          dc             Z7ej                            d_ e5d`           e6dad!d`b          g          dd             Z8ej                            d_ e5d`           e6dad!d`b          g          ej                            d	i dedfig          dg                         Z9ej                            d	i dhdig          di             Z:dj Z;ej        
                    dfdkl          ej                            deddfg          dm                         Z<dn Z=ej                            deddfg          do             Z>dp Z?ej                            dqdrdsg          ej                            deddfg          dt                         Z@ej                            dqdrdsg          du             ZAdv ZBdw ZCdx ZDdy ZEdz ZFej                            d_eGeHjI        g          d{             ZJej                            d|d/d}g          d~             ZKd ZLd ZMd ZNej                            d|ddg          d             ZOej                            ddf ejP        d eQjR        d                    g          ej                            d|ddg          ej                            dg dg dg          d                                     ZSej                            dddfg          ej                            dg dg df          d                         ZTej                            d|g d          d             ZUej                            dddg          d             ZVd ZWd ZXd ZYd ZZd Z[ej        j        ej                            d	i ddfiddddedig          d                         Z\ej        j        d             Z]ej        j        d             Z^ej        j        d             Z_d Z`d Zad Zbej        c                    d          ej        
                     edeejf                   edd          k    d          d                         Zgej        c                    d          ej        
                     edeejf                   edd          k    d          d                         Zhej        c                    d          ej        
                     edeejf                   edd          k    d          d                         Zid Zjej                            dg d          d             Zkd Zld Zmd Znd Zod Zpd Zqd Zrd Zsd Ztd Zuej                            dd e'jv        d          z  d e'jv        d          z  g          d             Zw	 	 	 	 dZdZxej                            d e'jy         e'jz        g dĢ           e'jz        g dŢ                     e'jy         e'jz        g dĢ           e'jz        g dƢ                     e'jy         e'jz        g dĢ           e'jz        g dǢ                    dȜ e'jy         e'jz        e'j,        dYddd`dg           e'jz        g d̢                     e'jy         e'jz        dYe'j,        ddd`dg           e'jz        g d͢                     e'jy         e'jz        dYdde'j,        d`dg           e'jz        g d΢                    dȜg          dτ             Z{dЄ Z|ej                            ddddddddg dբddgg          dք             Z}dׄ Z~ej                            dg d٢          dڄ             Zdۄ Zej                            dVej        j                  d܄             Zej                            dVd-d0g          d݄             Zej                            dVej        j                  dބ             Zej                            dV eej        j                  dWgz             d߄             Zd Zej                            ddd gddfdgdd gddgfg          d             Zd Zej                            dddgdfg          d             Zej                            dddgdgdgfddd gddgddgfddYdgddgddgfg          d             Zej                            dddYddgfdYdddYgfg          d             Zd Zd Zej                            dde'j        g          d             Zej                            di dfddidfddidfg          d             Zd  Zej                            d,ddg          d             Zd Zd Zd Zej        j        ej                            d	ddidddddig          d	                         Zej        j        d
             Zej        j        d             Zej        j        ej                            dddg          d                         Zej        j        d             Zej        j        d             Zej        j        ej                            dVg d          ej                            d e e'jv        d          dz  d.           e+ e'jv        d          dz   e'jv        d          dz  d/          g          d                                     Zej        j        ej                            dVg d          ej                            d e+ e'jv        d          dz   e'jv        d          dz  d/           e+ e'jv        d          dz   e'jv        d          dz  d/          f e e'jv        d          dz  d.           e e'jv        d          dz  d.          fdg          d                                     Zej        j        ej                            dVg d          d                         Zej        
                    de          d             Zd Zej        j        ej                            dVd(d)g          d                          Zej        j        d!             Zej        j        ej                            d"d# e+g          d$                         Zej                            dVg d          d%             Zd& Zd' Zd( Zd) Zd* Zd+ Zd, Zd- Zd. Zej                            dVej        j                  d/             Zd0 Zd1 Zd2 Zd3 Zd4 Zd5 Zd6 Zej                            d7g d8          d9             Zd: Zd; Zej                            dVd(dWg          d<             Zd= Zd> Zd? Zej                            dVd@          dA             ZdB ZÐdC ZĐdD Zej                            dEg dF          dG             ZƐdH ZǐdI Zej                            dVdJ          dK             Zej                            dLdMdNdOdPddQdYdgfg          ej                            dVg dR          dS                         Zej                            dTg dU          ej                            dVd-d0g          dV                         Zej                            dhdW          dX             Zej        j        dY             ZdS ([  TestDataFramePlotsc           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          |j
        d
           d S )N   
      ABCDdtype
2000-01-01r%   BperiodsfreqcolumnsindexF)grid)r   nprandomdefault_rngstandard_normalr   listobjectr   r   plotselfdfs     f/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pandas/tests/plotting/frame/test_frame.py	test_plotzTestDataFramePlots.test_plot8   s|    I!!!$$44W==$v,,f555\2C@@@
 
 

 	"'......    c           	      >   t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          |j
        d
d
          }t          |dd           d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   Tdefault_axessubplotsr&   r&      axes_numlayoutr   r3   r4   r5   r6   r   r7   r8   r   r   r9   r   r;   r<   axess      r=   test_plot_subplotsz%TestDataFramePlots.test_plot_subplotsA   s    I!!!$$44W==$v,,f555\2C@@@
 
 
 !tdKKK$6::::::r?   c           	      @   t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          |j
        d
d
d          }t          |dd           d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   T)r#   )rB   rC   rH   r&   r#   r#   rF   rI   rJ   s      r=   "test_plot_subplots_negative_layoutz5TestDataFramePlots.test_plot_subplots_negative_layoutL   s    I!!!$$44W==$v,,f555\2C@@@
 
 

 !G	
 
 
 	$6::::::r?   c           	      b   t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          |j
        d
d
d          }t          |d           t          |dd           d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   TF)rB   rC   	use_indexr   xrotr&   rD   rF   )r   r3   r4   r5   r6   r   r7   r8   r   r   r9   r   r   rJ   s      r=   test_plot_subplots_use_indexz/TestDataFramePlots.test_plot_subplots_use_index[   s    I!!!$$44W==$v,,f555\2C@@@
 
 

 !G	
 
 
 	4a(((($6::::::r?   zApi changed in 3.6.0)reasonc                     t          ddgddgd          }d}t          j        t          |          5  |j                            d	           d d d            d S # 1 swxY w Y   d S )
NrE   r#      r&   xyz''Line2D' object has no property 'blarg'matchT)blarg)r   pytestraisesAttributeErrorr9   liner;   r<   msgs      r=   test_plot_invalid_argz(TestDataFramePlots.test_plot_invalid_argk   s     aV1a&11227]>555 	% 	%GLLtL$$$	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	% 	%s   AA!$A!c                    t          t          j                            d                              d          t	          t
          j        d d                             }t          |j        d          }t          |d           d S )	Nr#   r%   rX   r%   r1   TrR   r   rS   )
r   r3   r4   r5   r7   stringascii_lettersr   r9   r   r;   r<   axs      r=   test_plot_tick_propsz'TestDataFramePlots.test_plot_tick_propss   s}    I!!!$$++G44v+CRC011
 
 

 rw$7772A&&&&&&r?   kwargsyticks)rE      r%   xticks)id   )ylimxlimTblah)rB   rC   titlec                     t          t          j                            d                              d          t	          t
          j        d d                             }t          |j        fi | d S )Nr#   rg   r%   rh   	r   r3   r4   r5   r7   rj   rk   r   r9   r;   ro   r<   s      r=   test_plot_other_argsz'TestDataFramePlots.test_plot_other_args}   sp     I!!!$$++G44v+CRC011
 
 
 	"',,V,,,,,r?   c                 .   t          t          j                            d                              d          t	          t
          j        d d                             }|                    dd          }t          |dd	
           |d d         D ]}t          |j
                   t          |                                d           t          |                    d          d           t          |j
                                        gd           |d         fD ]o}t          |j
                   t          |                                           t          |j
                                        g           t          |d           pd S )Nr#   rg   r%   rh   Trv   )rC   rw   rX   rX   rE   rF   Fvisibleminorr   rS   )r   r3   r4   r5   r7   rj   rk   r9   r   r   xaxisget_xticklabels	get_labelr   )r;   r<   rK   rm   s       r=   test_plot_visible_axz'TestDataFramePlots.test_plot_visible_ax   s   I!!!$$++G44v+CRC011
 
 
 wwFw33$6::::rr( 	B 	BB28$$$2--//????2--D-995IIIIBH..0015AAAAA7) 	+ 	+B28$$$2--//000BH..001222r*****		+ 	+r?   c                     t          t          j                            d                              d          t	          t
          j        d d                             }t          |j        d           d S )Nr#   rg   r%   rh   rv   rw   ry   r:   s     r=   test_plot_titlez"TestDataFramePlots.test_plot_title   sk    I!!!$$++G44v+CRC011
 
 
 	"'000000r?   c                 X   t          t          j        d d         t          d                    }t	          t
          j                            d                              d          t          j	        |                    }t          |j        d          }t          |d           d S )	Nr%   r#   rg   rh   Tri   r   rS   )ziprj   rk   ranger   r3   r4   r5   r   from_tuplesr   r9   r   )r;   tuplesr<   rm   s       r=   test_plot_multiindexz'TestDataFramePlots.test_plot_multiindex   s    V)#2#.b		::I!!!$$++G44(00
 
 
 rw$7772A&&&&&&r?   c                 "   t          j        g dddg          }t          j        ddgddg          }t          t          j                            d	                              d
dd          ||          }t          |j        d           d S )N))   αr   )r   rE   )   βr#   )r   rX   )   γr&   )r   rq   )   δ   )r      i0i1)names)baru   Δ)r   u   Εc0c1r#   r   r%   )   r#   r/   u   Σr   )	r   r   r   r3   r4   r5   integersr   r9   )r;   r1   r0   r<   s       r=   test_plot_multiindex_unicodez/TestDataFramePlots.test_plot_multiindex_unicode   s     &	 	 	 ,
 
 
 ( 124,
 
 
 I!!!$$--aV<<
 
 

 	"'222222r?   rH   N)rN   rE   c                     t          dt          j                            d                              d          i          }t	          |j        j        d|          }t          |dd           d S )	NrZ   r#   r%   T)rC   rH   rE   rE   rE   rF   )r   r3   r4   r5   r   r9   r   r   )r;   rH   r<   rK   s       r=   test_plot_single_column_barz.TestDataFramePlots.test_plot_single_column_bar   sg    
 RY22155<<R@@ABB tFKKK$6::::::r?   c                 R   t          dt          j                            d                              d          i          }t          j                                        \  }}|j                            d|          }t          |          dk    sJ |j
        }||d         u sJ d S )NrZ   r#   r%   TrC   rm   rE   r   )r   r3   r4   r5   mplpyplotrC   r9   r   lenrK   )r;   r<   _rm   rK   results         r=   test_plot_passed_axz&TestDataFramePlots.test_plot_passed_ax   s     RY22155<<R@@ABB
##%%2w{{DR{004yyA~~~~a      r?   z
cols, x, yABCDEAr+   CDEc                 h   g d}t          g dg dt          j        ddt          j        ddgt                    t          j        |d	                              d
          t          j        |dd                              d
          d          }t          ||         j	        ||           d S )N)20082009N20112012rE   r#   rX   r&   rq   r   rq   rX   r#   r(   z%Yformati8T)r   utcr   r+   r   r   r   rY   )
r   r3   arraynanr8   pdto_datetimeviewr   r9   )r;   colsrZ   r[   datesr<   s         r=   test_nullable_int_plotz)TestDataFramePlots.test_nullable_int_plot   s     766$__$__Xq!RVQ2&AAA^E$777<<TBB^E$DAAAFFtLL 
 
 	"T(-1222222r?   r9   )rb   r   histpiec                     t          j        g dd          }t          |          }t          t	          |j        |                     d S )NrE   r#   rX   r&   UInt32r(   )r   r   r
   r   getattrr9   )r;   r9   arrss       r=   test_integer_array_plot_seriesz1TestDataFramePlots.test_integer_array_plot_series  sG     h|||84443KK'!&$//00000r?   zplot, kwargsrb   r   r   r   r[   scatterrZ   rY   hexbinc                     t          j        g dd          }t          ||d          }t          t	          |j        |          fi | d S )Nr   r   r(   rY   )r   r   r   r   r   r9   )r;   r9   ro   r   r<   s        r=   test_integer_array_plot_dfz-TestDataFramePlots.test_integer_array_plot_df
  sY     h|||8444Ss++,,'"'400;;F;;;;;r?   c                     t          g dg dd          }|                                }t          |                                          dk    sJ d S )NrZ   r[   zrE   r#   rX   r   r+   rE   )r   r9   r   	get_linesrl   s      r=   test_nonnumeric_excludez*TestDataFramePlots.test_nonnumeric_exclude  sS    ___999==>>WWYY2<<>>""a''''''r?   c                    t          t          j                            d                              d          g d          }|                    dd          }t          |j                                        d           d S )Nr#   rg   abcr0   r   r   rY   )	r   r3   r4   r5   r6   r9   r   r   r   rl   s      r=   test_implicit_labelz&TestDataFramePlots.test_implicit_label!  sx    I!!!$$44W==
 
 
 WWscW""28--//55555r?   c                     t          t          j                            d                              d          ddg          }d|j        _        |                    dd           |j        j        dk    sJ d S )	Nr#   rO   r   r   r   NAMELABEL)r[   label)r   r3   r4   r5   r6   r1   namer9   r:   s     r=   test_donot_overwrite_index_namez2TestDataFramePlots.test_donot_overwrite_index_name(  sy    I!!!$$44V<<sCj
 
 
 
#W%%%x}&&&&&&r?   c           	      :   t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          |
                    d
d          |                    d          d         
                                           t          |
                    d
          |                    d          
                                           t          |
                    d
          |j        
                                           t          |
                    dd          |                    d          j        
                                           t          |
                    d          |                    d          
                                           t          |
                    d          |j        
                                           d S )Nr#   rq   r&   r'   r(   r*   rq   r+   r,   r/   r   rE   rY   r   rZ   r[   )r   r3   r4   r5   r6   r   r7   r8   r   r   r9   	set_indexr+   r:   s     r=   test_plot_xyzTestDataFramePlots.test_plot_xy1  s   I!!!$$44V<<$v,,f555\13???
 
 

 	BGGa1G%%r||C'8'8'='B'B'D'DEEEBGGaGLL",,s"3"3"8"8":":;;;BGGaGLL"$))++...BGGcSG))2<<+<+<+>+C+C+E+EFFFBGGcGNNBLL$5$5$:$:$<$<===BGGcGNNBDIIKK00000r?   c           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          j	        d
t          |j                  d
z             |_        t          |                    d
d          |                    d
          d                                                    t          |                    d
          |                    d
                                                     t          |                    d
          |d
                                                    d S )Nr#   r   r'   r(   r*   rq   r+   r,   r/   rE   rY   r   r   )r   r3   r4   r5   r6   r   r7   r8   r   aranger   r0   r   r9   r   r:   s     r=   test_plot_xy_int_colsz(TestDataFramePlots.test_plot_xy_int_cols?  s   I!!!$$44V<<$v,,f555\13???
 
 
 Yq#bj//A"566
BGGa1G%%r||Aq'9'>'>'@'@AAABGGaGLL",,q//"6"6"8"8999BGGaGLL"Q%**,,/////r?   c           	      n   t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }|	                    d
ddd          }t          |j        d           t          |d
dd           d S )Nr#   r   r'   r(   r*   rq   r+   r,   r/   rE   Test)   r   )rZ   r[   rw   figsizer   )g      0@g       @)rG   rH   r   )r   r3   r4   r5   r6   r   r7   r8   r   r9   r   rw   r   rl   s      r=   test_plot_xy_figsize_and_titlez1TestDataFramePlots.test_plot_xy_figsize_and_titleK  s    I!!!$$44V<<$v,,f555\13???
 
 
 WWqAVWW==28V,,,"qMMMMMMr?   zinput_log, expected_log)Tlog)symsymlogc                 0   t          dt          j        d          it          j        d                    }|                    |          }t	          ||           |                                |k    sJ |                    |          }t	          ||           |                                |k    sJ |                    |          }t	          |||	           |                                |k    sJ |                                |k    sJ d S )
Nr   rs   rh   logyyaxis)logxr   loglog)r   r   )r   r3   r   r9   r   
get_yscale
get_xscale)r;   	input_logexpected_logr<   rm   s        r=   test_logscalesz!TestDataFramePlots.test_logscalesY  s	    RYs^^,BIcNNCCCWW)W$$<0000}},....WW)W$$<0000}},....WWIW&&<|DDDD}},....}},......r?   input_param)r   r   r   c                    t          dt          j        d          it          j        d                    }d| d}t          j        t
          |          5   |j        di |di d d d            n# 1 swxY w Y   d| d	}t          j        t          |          5   |j        j
        dd
di|di d d d            d S # 1 swxY w Y   d S )Nr   rs   rh   z	keyword 'z*' should be bool, None, or 'sym', not 'sm'r\   smzPiePlot ignores the 'z	' keywordrC   T )r   r3   r   r_   r`   
ValueErrorr9   tmassert_produces_warningUserWarningr   )r;   r  r<   rd   s       r=   test_invalid_logscalez(TestDataFramePlots.test_invalid_logscalel  sr    RYs^^,BIcNNCCCQ+QQQ]:S111 	+ 	+BG**{D)***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ =k<<<'3??? 	> 	>BGK===+t)<===	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	> 	>s$   A55A9<A9!CC	C	c           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }|	                    d
          }|
                                }t          |d                                         t                    rJ t          |d           d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   T)x_compatr      rS   )r   r3   r4   r5   r6   r   r7   r8   r   r9   r   
isinstance	get_xdatar	   r   r;   r<   rm   liness       r=   test_xcompatzTestDataFramePlots.test_xcompaty  s    I!!!$$44W==$v,,f555\2C@@@
 
 

 WWdW##eAh0022K@@@@@2B''''''r?   c           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }d
t          j
        d<   |                                }|                                }t          |d                                         t                    rJ t!          |d           d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   Tzxaxis.compatr   r  rS   )r   r3   r4   r5   r6   r   r7   r8   r   r   plot_paramsr9   r   r  r  r	   r   r  s       r=   test_xcompat_plot_paramsz+TestDataFramePlots.test_xcompat_plot_params  s    I!!!$$44W==$v,,f555\2C@@@
 
 

 04^,WWYYeAh0022K@@@@@2B''''''r?   c           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }d
t          j
        d<   |                                }|                                }t          |d                                         t                    rJ d}t!          j        t$          |          5  t          t          |d                                                   t                    sJ 	 d d d            d S # 1 swxY w Y   d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   Fr  r   zPeriodDtype\[B\] is deprecatedr\   )r   r3   r4   r5   r6   r   r7   r8   r   r   r  r9   r   r  r  r	   r  r  FutureWarningr;   r<   rm   r  rd   s        r=   !test_xcompat_plot_params_x_compatz4TestDataFramePlots.test_xcompat_plot_params_x_compat  sr   I!!!$$44W==$v,,f555\2C@@@
 
 

 ,1Z(WWYYeAh0022K@@@@@/'SAAA 	N 	Nk%(*<*<*>*>??MMMMMM	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	Ns   7=EE	Ec           	      .   t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          j
                            d
d          5  |                                }|                                }t          |d                                         t                     rJ t#          |d           d d d            d S # 1 swxY w Y   d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   r  Tr   r  rS   )r   r3   r4   r5   r6   r   r7   r8   r   r   r  user9   r   r  r  r	   r   r  s       r=   (test_xcompat_plot_params_context_managerz;TestDataFramePlots.test_xcompat_plot_params_context_manager  s1   I!!!$$44W==$v,,f555\2C@@@
 
 
 !%%j$77 	, 	,BLLNNE!%("4"4"6"6DDDDDr++++		, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	,s   A)D

DDc           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }|	                                }|
                                }t          |d
                                         t                    rJ d}t          j        t           |          5  t          t          |d
                                                   t                    sJ 	 d d d            n# 1 swxY w Y   t#          |d
           d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   r   zPeriodDtype\[B\] is deprecated r\   rS   )r   r3   r4   r5   r6   r   r7   r8   r   r9   r   r  r  r	   r  r  r  r   r  s        r=   test_xcompat_plot_periodz+TestDataFramePlots.test_xcompat_plot_period  sl   I!!!$$44W==$v,,f555\2C@@@
 
 

 WWYYeAh0022K@@@@@0'SAAA 	N 	Nk%(*<*<*>*>??MMMMMM	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N 	N2A&&&&&&s   (=D22D69D6c                 N   t          t          j                            d                              d          t	          t          ddd          t          ddd                    ddg          }|                                 t          j        	                    d	
           d S )Nr#   )   r#     rE      r   r   r1   r0   r   r   )
r   r3   r4   r5   r   r   r9   r   r   axhliner:   s     r=   test_period_compatz%TestDataFramePlots.test_period_compat  s     I!!!$$++G44htQ22HT1b4I4IJJ#J
 
 
 				
Qr?   index_dtypec           
         t          dt          j        d          it          t          j        ddd          |          t          j                  }|                                }|                                d         }|                                }t          |d d df         |d d df         t          j        d	          }t          j
        ||j        d
           d S )Nr[   rs   c   rN   r(   )r1   r)   r   rE   )r)   r   F)check_index_type)r   r3   r   r   int64r9   r   
get_xydatar
   r  assert_series_equalr[   )r;   r&  r<   rm   r  rss         r=   test_unsorted_indexz&TestDataFramePlots.test_unsorted_index  s    ")C..!	"b"--[AAA(
 
 

 WWYYq!Bqqq!tHbAhbhSAAA
r24%@@@@@@r?   r<                 ?       @      @)r1  r0  r3  r2  rh   r0  r1  r3  g      @g      @g      @r2  c                 d   |                                 }|                                \  }}|                                }|t          j        |d                                         d                   k    sJ |t          j        |d                                         d                   k    sJ d S )Nr   )r9   get_xlimr   r3   nanminget_datananmaxr;   r<   rm   xminxmaxr  s         r=   test_unsorted_index_limsz+TestDataFramePlots.test_unsorted_index_lims  s     WWYY[[]]
dryq!2!2!4!4Q!7888888ryq!2!2!4!4Q!788888888r?   c                    t          g dg dd          }|                    dd          }|                                \  }}|                                }|t	          j        |d                                         d                   k    sJ |t	          j        |d                                         d                   k    sJ d S )Nr/  )g     V@g     V@g     @W@g      W@)r[   r   r   r[   rY   r   )r   r9   r5  r   r3   r6  r7  r8  r9  s         r=   test_unsorted_index_lims_x_yz/TestDataFramePlots.test_unsorted_index_lims_x_y  s    1118P8P8PQQRRWWscW""[[]]
dryq!2!2!4!4Q!7888888ryq!2!2!4!4Q!788888888r?   c                    t          t          j                            d                              d          t	          t
          j        d d                   g d           }d}t          j        t          |          5  |j
                            d	           d d d            n# 1 swxY w Y   t          j        t          |          5  |j
                            d
           d d d            d S # 1 swxY w Y   d S )Nr#   r   r&   r   rZ   r[   r   fourr#  z+Log-y scales are not supported in area plotr\   Tr   r   )r   r3   r4   r5   r7   rj   rk   r_   r`   r  r9   arearc   s      r=   test_negative_logz$TestDataFramePlots.test_negative_log  sr   I!!!$$++F33v+BQB/00+++
 
 
 

 <]:S111 	$ 	$GLLdL###	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$ 	$]:S111 	& 	&GLLL%%%	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	& 	&s$   B**B.1B.C99C= C=c                 H   t          j        t          |d                                         d                             }t	          ||          D ]Q\  }}||                                d         z  }|                                d         }t          j        ||           Rd S )Nr   rE   )r3   zerosr   r7  r   r  assert_numpy_array_equal)r;   normal_linesstacked_linesbasenlslsys          r=   _compare_stacked_y_coodz*TestDataFramePlots._compare_stacked_y_cood  s    xLO4466q9::;;,66 	2 	2FBBKKMM!$$Dq!B'b1111	2 	2r?   kindrC  multrE   rN   c                 .   |t          t          j                            d                              d          g d          z  }t	          |j        |d          }t	          |j        |d          }|                     |j        |j                   d S )Nr#   r@  wrZ   r[   r   r   FrO  stackedTr   r3   r4   r5   r   r9   rN  r  )r;   rO  rP  r<   ax1ax2s         r=   test_line_area_stackedz)TestDataFramePlots.test_line_area_stacked  s     II!!!$$++F33=Q=Q=Q
 
 
 
  dEBBBdDAAA$$SY	:::::r?   c                    t          t          j                            d                              d          t          j                            d                              d          t          j                            d                              d           t          j                            d                              d           d          }t	          |j        |d          }t	          |j        |d          }|                     |j        d d         |j        d d                    |                     |j        dd          |j        dd                     d S )Nr#   r   rR  FrT  TrV  )r;   rO  sep_dfrW  rX  s        r=   test_line_area_stacked_sep_dfz0TestDataFramePlots.test_line_area_stacked_sep_df
  s/    Y**1--44Q77Y**1--44Q77i++A..55a888i++A..55a888	 
 
  $FFF$EEE$$SYrr]CIbqbMBBB$$SYqrr]CIabbMBBBBBr?   c                    t          t          j                            d                              d          t          t          j        d d                   g d          }t          |j	        d           d}t          j        t          |	          5  |	                    d
           d d d            d S # 1 swxY w Y   d S )Nr#   r@  r   rR  r#  FrU  zWhen stacked is True, each column must be either all positive or all negative. Column 'w' contains both positive and negative valuesr\   T)r   r3   r4   r5   r6   r7   rj   rk   r   r9   r_   r`   r  )r;   mixed_dfrd   s      r=   test_line_area_stacked_mixedz/TestDataFramePlots.test_line_area_stacked_mixed  s   I!!!$$44V<<v+BQB/00(((
 
 

 	(-7777 	
 ]:S111 	( 	(MM$M'''	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	(s   B;;B?B?c                     t          t          j                            d                              d          g d          }|                    |j        dz             }t          |j        |dd           d S )Nr#   r@  rR  r   rE   T)rO  r   rU  )r   r3   r4   r5   r   r1   r   r9   )r;   rO  r<   df2s       r=   #test_line_area_stacked_positive_idxz6TestDataFramePlots.test_line_area_stacked_positive_idx*  sx    I!!!$$++F33=Q=Q=Q
 
 

 ll28a<((#(D$GGGGGGr?   idxr&   z	2023-01-1)r.   r-   c                    ddt           j        dg}dt           j        ddg}t          ||d|          }t          |j                  }|j        d                                         }|j        d                                         }t          j        g dt           j                  }t          j
        t          j        |j        d          |           t          j        g d	t           j                  }t          j
        t          j        |j        d          |           t          j
        |j        t          j        g d
                     t          j
        |j        t          j        g d                     d S )NrE   r#   rX   r   r   rh   r   r   r(   )rX   r#   rE   )FFTF)FTFF)r3   r   r   r   r9   r  	get_ydatar   float64r  rG  deletedatamask)	r;   rd  values1values2r<   rm   masked1masked2exps	            r=   test_line_area_nan_dfz(TestDataFramePlots.test_line_area_nan_df4  sE    a#bfa#W7333???rw''(1+''))(1+'')) hyyy
333
#BIglA$>$>DDDhyyy
333
#BIglA$>$>DDD
#GL"(;V;V;V2W2WXXX
#GL"(;V;V;V2W2WXXXXXr?   c                    ddt           j        dg}dt           j        ddg}t          ||d|          }t          j        g dt           j                  }t          j        g dt           j                  }t          |j        d	
          }t          j        |j	        d         
                                |           t          j        |j	        d         
                                ||z              d S )NrE   r#   rX   rf  rh   rE   r#   r   rX   r(   rX   r   r#   rE   Tr^  r   )r3   r   r   r   rh  r   r9   r  rG  r  rg  )r;   rd  rl  rm  r<   	expected1	expected2rm   s           r=   test_line_area_nan_df_stackedz0TestDataFramePlots.test_line_area_nan_df_stackedI  s     a#bfa#W7333???H\\\<<<	H\\\<<<	rw555
#BHQK$9$9$;$;YGGG
#BHQK$9$9$;$;Y=RSSSSSr?   rU  Fc                 Z   ddt           j        dg}dt           j        ddg}t          ||d|          }t          j        g dt           j                  }t          j        g dt           j                  }t          |j        j        fi |}t          j	        |j
        d	                                         |           |r3t          j	        |j
        d                                         |           n5t          j	        |j
        d                                         ||z              t          |j        j        d
          }t          j	        |j
        d	                                         |           t          j	        |j
        d                                         |           d S )NrE   r#   rX   rf  rh   rs  r(   rt  r   Fr^  )r3   r   r   r   rh  r   r9   rC  r  rG  r  rg  )	r;   rd  ro   rl  rm  r<   ru  rv  rm   s	            r=   "test_line_area_nan_df_stacked_areaz5TestDataFramePlots.test_line_area_nan_df_stacked_areaX  sq   
 a#bfa#W7333???H\\\<<<	H\\\<<<	rw|66v66
#BHQK$9$9$;$;YGGG 	X'(=(=(?(?KKKK'(=(=(?(?YAVWWWrw|U;;;
#BHQK$9$9$;$;YGGG
#BHQK$9$9$;$;YGGGGGr?   secondary_yc                    t          t          j                            d                              d          g d          } |j        di |}|                                \  }}|                                }||d                                         d         d         k    sJ ||d                                         d         d         k    sJ d S )Nr#   r   rX   r   r   r   rN   r  )r   r3   r4   r5   r9   r5  r   r7  )r;   ro   r<   rm   r:  r;  r  s          r=   test_line_limz TestDataFramePlots.test_line_limo  s    ry,,Q//66v>>XXXRWv[[]]
duQx((**1-a00000uQx((**1-b1111111r?   c                 6   t          t          j                            d                              d          g d          }|                    dd          }t          |dd	           |D ]}t          |d
          sJ t          |d          rJ |                                \  }}|                                }||d         	                                d         d         k    sJ ||d         	                                d         d         k    sJ d S )Nr#   r|  r   r   T)rz  rC   rX   r}   rF   left_axright_axr   rN   )
r   r3   r4   r5   r9   r   hasattrr5  r   r7  )r;   r<   rK   rm   r:  r;  r  s          r=   test_line_lim_subplotsz)TestDataFramePlots.test_line_lim_subplotsx  s   ry,,Q//66v>>XXXww4$w77$6:::: 	6 	6B2y)))))r:.....JD$LLNNE58,,..q1!4444458,,..q1"555555	6 	6r?   zX2020-12-01 this has been failing periodically on the ymin==0 assertion for a week or so.)strictrV   c                    t          t          j                            d                              d          g d          }| }t	          |j        j        |          }|                                \  }}|                                \  }}|	                                }	||	d         
                                d         d         k    sJ ||	d         
                                d         d         k    sJ |dk    sJ t	          |j        j        |          }|                                \  }}|dk    sJ d S )Nr#   r@  rA  r   r^  r   rN   )r   r3   r4   r5   r   r9   rC  r5  get_ylimr   r7  )
r;   rU  r<   neg_dfrm   r:  r;  yminymaxr  s
             r=   test_area_limz TestDataFramePlots.test_area_lim  s,    I!!!$$++F33=T=T=T
 
 
 rw|W===[[]]
d[[]]
duQx((**1-a00000uQx((**1-b11111qyyyyv{/AAA[[]]
dqyyyyyyr?   c                    t          t          j                            d                              d          ddg          }t          j                            ddd          \  }\  }}|                    |d	
           |                    |d	
           t          |          	                    ||          sJ t          |          	                    ||          sJ d S )Nr#   r&   r#   rZ   r[   r   rE   T)shareyrC  )rm   rO  )
r   r3   r4   r5   r   r   rC   r9   r   joined)r;   r<   figrW  rX  s        r=   test_area_sharey_dont_overwritez2TestDataFramePlots.test_area_sharey_dont_overwrite  s    ry,,Q//66v>>c
SSS*--a4-@@Zc3
3V$$$
3V$$$#%%c3/////#%%c3///////r?   c                    t          t          j                            d                              d                    }|j                            |d          }|j        D ]}|                                dk    sJ d S )Nr#   rq   rq   )rU  	linewidth)	r   r3   r4   r5   r6   r9   r   patchesget_linewidth)r;   rU  r<   rm   rs        r=   test_bar_linewidthz%TestDataFramePlots.test_bar_linewidth  s}    ry,,Q//??GGHHW[[A[66 	* 	*A??$$)))))	* 	*r?   c                 2   t          t          j                            d                              d                    }|j                            dd          }t          |dd           |D ]&}|j        D ]}|	                                dk    sJ 'd S )Nr#   r  T)r  rC   rq   )rq   rE   rF   )
r   r3   r4   r5   r6   r9   r   r   r  r  )r;   r<   rK   rm   r  s        r=   test_bar_linewidth_subplotsz.TestDataFramePlots.test_bar_linewidth_subplots  s    ry,,Q//??GGHHw{{Q{66$6:::: 	. 	.BZ . .((A-----.	. 	.r?   z	meth, dim)r   	get_width)barh
get_heightc                    t          t          j                            d                              d                    }d} t          |j        |          ||          }|j        D ]V}|s4 t          ||                      |t          |j	                  z  k    sJ 8 t          ||                      |k    sJ Wd S )Nr#   r  ?)rU  width)
r   r3   r4   r5   r6   r   r9   r  r   r0   )r;   methdimrU  r<   r  rm   r  s           r=   test_bar_barwidthz$TestDataFramePlots.test_bar_barwidth  s    
 ry,,Q//??GGHH#WRWd##G5AAA 	2 	2A 2&wq#((EC
OO,CCCCCC&wq#((E11111		2 	2r?   c                 "   t          t          j                            d                              d                    }d} t          |j        |          |d          }|D ]*}|j        D ] } t          ||                      |k    sJ !+d S )Nr#   r  r  T)r  rC   )r   r3   r4   r5   r6   r   r9   r  )r;   r  r  r<   r  rK   rm   r  s           r=   test_barh_barwidth_subplotsz.TestDataFramePlots.test_barh_barwidth_subplots  s     ry,,Q//??GGHH%wrw%%EDAAA 	2 	2BZ 2 2&wq#((E111112	2 	2r?   c                 x   t          t          j                            d                              d                    }|j                            dd          }d |j        D             }|dgdz  k    sJ |j                            dg d	          }d
 |j        d d         D             }|g d	k    sJ d S )Nr#   r  FrE   )rU  bottomc                 6    g | ]}|                                 S r  get_y.0ps     r=   
<listcomp>zBTestDataFramePlots.test_bar_bottom_left_bottom.<locals>.<listcomp>       000!''))000r?      T)rN   c                 6    g | ]}|                                 S r  r  r  s     r=   r  zBTestDataFramePlots.test_bar_bottom_left_bottom.<locals>.<listcomp>       444!''))444r?   rq   )r   r3   r4   r5   r9   r   r  r;   r<   rm   r   s       r=   test_bar_bottom_left_bottomz.TestDataFramePlots.test_bar_bottom_left_bottom  s    ry,,Q//66v>>??W[[q[1100RZ000!r!!!!W[[.B.B.B[CC44RZ^444---------r?   c                    t          t          j                            d                              d                    }|j                            dt          j        g d                    }d |j        D             }|dgdz  k    sJ |j                            d	g d
          }d |j        d d         D             }|g d
k    sJ d S )Nr#   r  FrE   rE   rE   rE   rE   )rU  leftc                 6    g | ]}|                                 S r  get_xr  s     r=   r  z@TestDataFramePlots.test_bar_bottom_left_left.<locals>.<listcomp>  r  r?   rE   r  Tr   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z@TestDataFramePlots.test_bar_bottom_left_left.<locals>.<listcomp>  r  r?   rq   )r   r3   r4   r5   r9   r  r   r  r  s       r=   test_bar_bottom_left_leftz,TestDataFramePlots.test_bar_bottom_left_left  s    ry,,Q//66v>>??W\\%bh.G.G\HH00RZ000!r!!!!W\\$___\==44RZ^444((((((r?   c                    t          t          j                            d                              d                    }|j                            dd          }|D ]}d |j        D             }|dgdz  k    sJ  |j                            dt          j        g d          	          }|D ]}d
 |j        D             }|dgdz  k    sJ  d S )Nr#   r  TrN   )rC   r  c                 6    g | ]}|                                 S r  r  r  s     r=   r  zDTestDataFramePlots.test_bar_bottom_left_subplots.<locals>.<listcomp>       444Aaggii444r?   rq   r  )rC   r  c                 6    g | ]}|                                 S r  r  r  s     r=   r  zDTestDataFramePlots.test_bar_bottom_left_subplots.<locals>.<listcomp>  r  r?   rE   )	r   r3   r4   r5   r9   r   r  r  r   )r;   r<   rK   rm   r   s        r=   test_bar_bottom_left_subplotsz0TestDataFramePlots.test_bar_bottom_left_subplots  s    ry,,Q//66v>>??w{{D{44 	& 	&B44444FbTAX%%%%%w||T0I0I|JJ 	% 	%B44444FaS1W$$$$$	% 	%r?   c                     t          dt          j        dgg dg dd          }|j                                        }g d}d |j        D             }||k    sJ d S )Nr%      rq   r%   r  r   r   r+   r   	r%   r   r  rq   r%   r  rE   r#   rX   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z3TestDataFramePlots.test_bar_nan.<locals>.<listcomp>       555Q!,,..555r?   r   r3   r   r9   r   r  r;   r<   rm   expectedr   s        r=   test_bar_nanzTestDataFramePlots.test_bar_nan  sp    b"&"-KKKiiiPPQQW[[]]22255"*555!!!!!!r?   c                     t          dt          j        dgg dg dd          }|j                            d          }g d}d	 |j        D             }||k    sJ d
 |j        D             }g d}||k    sJ d S )Nr%   r  r  r   r  Tr^  r  c                 6    g | ]}|                                 S r  r  r  s     r=   r  z;TestDataFramePlots.test_bar_nan_stacked.<locals>.<listcomp>  r  r?   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z;TestDataFramePlots.test_bar_nan_stacked.<locals>.<listcomp>  r  r?   )	r0  r0  r0        $@r0  g      4@g      .@r  g      D@r  r  s        r=   test_bar_nan_stackedz'TestDataFramePlots.test_bar_nan_stacked  s    b"&"-KKKiiiPPQQW[[[&&22255"*555!!!!00RZ000EEE!!!!!!r?   c           	         t          t          j                            d                              d           |t          d                     |t          d                              }|j                                        }|j        	                                }t          j        |t          j        g d                     |                                dk    sJ |j        d                                         d	k    sJ |j        d
                                         dk    sJ |j                            d          }t          j        |t          j        g d                     |                                dk    sJ |j        d                                         d	k    sJ |j        d
                                         dk    sJ d S )Nr#   )r   rq   ABCDEFabcder#  )r   rE   r#   rX   r&   rq   )g      g      @r   g      пrN   g@Tr^  g      @)r   r3   r4   r5   r6   r7   r9   r   r   get_ticklocsr  rG  r   r5  r  r  )r;   rd  r<   rm   tickss        r=   test_bar_categoricalz'TestDataFramePlots.test_bar_categorical  s    I!!!$$44V<<#d8nn%%CW&&
 
 
 W[[]]%%''
#E284F4F4F+G+GHHH{{}}++++z!}""$$----z"~##%%----W[[[&&
#E284F4F4F+G+GHHH{{}}++++z!}""$$----z"~##%%------r?   zx, yrE   r#   c                    t          t          j                            d                              d          t          t          j        d d                   g d          }t          |j	        j
        ||           d S )Nr#   r@  r   rA  r#  rY   )r   r3   r4   r5   r6   r7   rj   rk   r   r9   r   r;   rZ   r[   r<   s       r=   test_plot_scatterz$TestDataFramePlots.test_plot_scatter  sx    I!!!$$44V<<v+BQB/00+++
 
 
 	"'/Q!444444r?   c                 V   t          t          j                            d                              d          t          t          j        d d                   g d          }t          j	        d          }t          j        t          |          5  |j                            d	           d d d            n# 1 swxY w Y   t          j	        d
          }t          j        t          |          5  |j                            d           d d d            d S # 1 swxY w Y   d S )Nr#   r@  r   rA  r#  z5scatter() missing 1 required positional argument: 'y'r\   rZ   r   z5scatter() missing 1 required positional argument: 'x'r[   r   )r   r3   r4   r5   r6   r7   rj   rk   reescaper_   r`   	TypeErrorr9   r   rc   s      r=   test_plot_scatter_errorz*TestDataFramePlots.test_plot_scatter_error)  s   I!!!$$44V<<v+BQB/00+++
 
 

 iOPP]9C000 	# 	#GOOcO"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#iOPP]9C000 	# 	#GOOcO"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s$   B;;B?B?5DD"%D"c                 "   t          t          j                            d                              d          t          t          j        d d                   g d          }|                    dddd	
          }t          |dd           d S )Nr#   r@  r   rA  r#  rZ   r[   r   T)rZ   r[   rO  rC   rE   r   rF   )
r   r3   r4   r5   r6   r7   rj   rk   r9   r   rJ   s      r=   test_plot_scatter_shapez*TestDataFramePlots.test_plot_scatter_shape6  s    I!!!$$44V<<v+BQB/00+++
 
 
 ww)dwCC$6::::::r?   c                 Z   t          t          j                            d                              d          dg          }t          ddd          j        |d<   d	}t          j        t          |
          5  |
                    ddd           d d d            d S # 1 swxY w Y   d S )Nr#   r%   r   r   z
2014-01-01h)startr.   r-   dtimez9must be a string or a (real )?number, not 'datetime.time'r\   r   )rO  rZ   r[   )r   r3   r4   r5   r6   r   timer_   r`   r  r9   rc   s      r=   &test_raise_error_on_datetime_time_dataz9TestDataFramePlots.test_raise_error_on_datetime_time_data@  s    ry,,Q//??CCcUSSS |#rJJJO7I]9C000 	6 	6GGgG555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6s   :B  B$'B$r   valsr   rE   c                 &   t          t          ddd          dd          }t          j                            d                              ddt          |                    }t          ||d          }t          |j	        j
        ||	           d S )
Ni  rE      W)r  r-   r.   r#   r   r  rY   )r   r   r3   r4   r5   normalr   r   r   r9   r   )r;   rZ   r[   r   r  r<   s         r=   test_scatterplot_datetime_dataz1TestDataFramePlots.test_scatterplot_datetime_dataI  s     dAq!1!12CHHHy$$Q''..q!SZZ@@5566"'/Q!444444r?   infer_stringpyarrow)marksrf  b_colr#   rX   r&   r   c                     t          d|          5  t          g d|d          }t          |j        j        ||           d d d            d S # 1 swxY w Y   d S )Nzfuture.infer_stringr  rf  rY   )r   r   r   r9   r   )r;   r  rZ   r[   r  r<   s         r=   test_scatterplot_object_dataz/TestDataFramePlots.test_scatterplot_object_dataR  s     1<@@ 	9 	9u==>>Bbgoa8888	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9 	9s   1AAAordered
categories)setosa
versicolor	virginica)r  r  r  c                 Z   t          ddgddgddgddgddggd	d
g          }t          j        g d||          |d<   |j                            ddd          }|j        \  }|j        }t          j        g d          }|	                                }t          j        ||           t          j        g d          }	|j        }
t          j        |
|	           |}d |j                                        D             }t          d t!          ||          D                       sJ d S )Ngffffff@g      @g@r3  g      @g	@g@g@lengthr  r   )r  r  r  r  r  )r  r  speciesr   rE   rZ   r[   r   )      ?g      ?g      @r/  c                 6    g | ]}|                                 S r  get_text)r  is     r=   r  zLTestDataFramePlots.test_scatterplot_color_by_categorical.<locals>.<listcomp>z  s     WWWqajjllWWWr?   c              3   (   K   | ]\  }}||k    V  d S Nr  )r  r  js      r=   	<genexpr>zKTestDataFramePlots.test_scatterplot_color_by_categorical.<locals>.<genexpr>{  s*      TTda16TTTTTTr?   )r   r   Categoricalr9   r   collectionscolorbarr3   r   	get_ticksr  rG  _boundariesrm   get_ymajorticklabelsallr   )r;   r  r  r<   rm   colorbar_collectionr  expected_ticksresult_ticksexpected_boundariesresult_boundariesexpected_yticklabelsresult_yticklabelss                r=   %test_scatterplot_color_by_categoricalz8TestDataFramePlots.test_scatterplot_color_by_categorical^  sd    3Z#sc3Z#sc3ZHw'
 
 
 HHH!
 
 
9
 W__qA_33!#	&////22))++
#L.AAA h';';';<<$0
#$57JKKK)WWHK4T4T4V4VWWWTTc*<>R&S&STTTTTTTTTTr?   )rY   )r[   rZ   )r[   r[   c                     t          g dt          j        g d          d          }t          |j        j        ||           d S )Nr   )r   r   r   r   rY   )r   r   r  r   r9   r   r  s       r=   'test_plot_scatter_with_categorical_dataz:TestDataFramePlots.test_plot_scatter_with_categorical_data}  sM     \\\?S?S?S0T0TUUVV"'/Q!444444r?   zx, y, cr   )r   rE   r#   c                    t          t          j                            d                              ddd          t          t          j        d d                   g d          }|j        	                    |||	          }|j
        d         j        j        d
k    sJ |j
        d         j        j                                        dk    sJ d S )Nr#   r   rs   r@  lowhighsizer   rA  r#  r  Greysr   )r   r3   r4   r5   r   r7   rj   rk   r9   r   r  cmapr   r  rm   
get_ylabel)r;   rZ   r[   r   r<   rm   s         r=   test_plot_scatter_with_cz+TestDataFramePlots.test_plot_scatter_with_c  s    I!!!$$--!#F-KKv+BQB/00+++
 
 
 W__qA_++~a %*g5555~a ),7799S@@@@@@r?   c                 @   t          t          j                            d                              ddd          t          t          j        d d                   g d          }d	}|j        	                    d
dd|          }|j
        d         j        j        |k    sJ |j        	                    d
ddd          }|j
        d         j        J |j        	                    ddd          }|j
        d         j        J t          |j
        dg           d S )Nr#   r   rs   r@  r  r   rA  r#  	cubehelixrZ   r[   r   )rZ   r[   r   colormapF)rZ   r[   r   r  rE   redr  r  
facecolors)r   r3   r4   r5   r   r7   rj   rk   r9   r   r  r$  r   r  r   )r;   r<   cmrm   s       r=   test_plot_scatter_with_c_propsz1TestDataFramePlots.test_plot_scatter_with_c_props  s   I!!!$$--!#F-KKv+BQB/00+++
 
 

 W__scS2_>>~a %*b0000 W__scS5_AA~a )111 W__qA_//~a )111bn#777777r?   c                 t   t          ddgddgd          }g d}g d}t          j        ||g          }|j                            dd	|
          }t          j        |j        d                                         |           t          j        ddg          }|j                            dd	|d           d S )NrE   r#   rX   r&   r   )r1  r0  r0  r1  )r0  r1  r0  r1  r   r+   r  r   r0  r1  spring)rZ   r[   r   r$  )	r   r3   r   r9   r   r  rG  r  get_facecolor)r;   r<   red_rgba
green_rgba
rgba_arrayrm   float_arrays          r=   test_plot_scatter_with_c_arrayz1TestDataFramePlots.test_plot_scatter_with_c_array  s     aV1a&1122''')))
Xx455
W__scZ_88
 	#BN1$5$C$C$E$EzRRR hSz**
#(CCCCCr?   c                 H   t          t          j                            d                              d          dz  g d          }|j                            ddd	          }t          j        |d         j        |j	        d
         
                                           d S )Nr#   rg   rs   r   r   r   r   r   )rZ   r[   r   r   )right)r   r3   r4   r5   r9   r   r  rG  valuesr  	get_sizesrl   s      r=   test_plot_scatter_with_sz+TestDataFramePlots.test_plot_scatter_with_s  s    I!!!$$++G44s:OOO
 
 
 W__scS_11
#BsGN".:K:U:U:W:WXXXXXXr?   c                 6   t          t          j                            d                              d          dz  g d          }t          j                                        }|j                            ddd|	          }|j	        d
         j
        |u sJ d S )Nr#   rg   rs   r   r   r   r   r   )rZ   r[   r   normr   )r   r3   r4   r5   r   colorsLogNormr9   r   r  r=  )r;   r<   r=  rm   s       r=   test_plot_scatter_with_normz.TestDataFramePlots.test_plot_scatter_with_norm  s    I!!!$$++G44s:OOO
 
 
 z!!##W__scSt_<<~a %------r?   c                    t          t          j                            d                              d          dz  g d          }|j                            ddd	          }|j        d
         j        }|j        	                                |j        
                                f}t          j        j        | }|j        D ]} ||           ||          k    sJ d S )Nr#   rg   rs   r   r   r   r   r   r  r   )r   r3   r4   r5   r9   r   r  r=  r   minmaxr   r>  	Normalize)r;   r<   rm   	plot_normcolor_min_maxdefault_normvalues          r=   test_plot_scatter_without_normz1TestDataFramePlots.test_plot_scatter_without_norm  s    I!!!$$++G44s:OOO
 
 
 W__scS_11N1%*	RTXXZZ0z+];T 	; 	;E9U##||E':'::::::	; 	;r?   legendrA   c                     t          t          j                            d                              d          t          t          j        d d                   g d          }t          |j	        j
        fi | d S )Nr#   r@  r   onetwothreerB  r#  )r   r3   r4   r5   r6   r7   rj   rk   r   r9   r   rz   s      r=   test_plot_barz TestDataFramePlots.test_plot_bar  s{     I!!!$$44V<<v+BQB/00333
 
 
 	"'+0000000r?   c                    t          t          j                            d                              d          t          t          j        d d                   t          d                    }t          |j
        j                   d S )Nr#   )r%      r%   rR  r#  )r   r3   r4   r5   r6   r7   rj   rk   r   r   r9   r   r:   s     r=   test_plot_bar_int_colz(TestDataFramePlots.test_plot_bar_int_col  sq    I!!!$$44X>>v+CRC011"II
 
 

 	"'+&&&&&r?   c                     t          ddgddgd          }t          |j        j                  }t	          |d           |j                            dd          }t	          |ddd	           d S )
Nr   rE   rf  Z   rS   #   r%   rotfontsizerT   
xlabelsize
ylabelsize)r   r   r9   r   r   rl   s      r=   test_plot_bar_ticksz&TestDataFramePlots.test_plot_bar_ticks  sw    aV1a&1122rw{++2B''''W[[R"[--2B2"EEEEEEr?   c                     t          ddgddgd          }t          |j        j                  }t	          |d           |j                            dd          }t	          |ddd           d S )	Nr   rE   rf  )yrot7      rW  )r_  r\  r[  )r   r   r9   r  r   rl   s      r=   test_plot_barh_ticksz'TestDataFramePlots.test_plot_barh_ticks  sw    aV1a&1122rw|,,2A&&&&W\\b2\..2B2"EEEEEEr?   c           	         |}|                                 j        }d |D             }t          |j        j                  }t          |                                |           t          j        |j	        
                                t          j        dt          |          dz                        t          |j                  dt          |          z  k    sJ d S )Nc                 ,    g | ]}t          |          S r  r   r  r   s     r=   r  z3TestDataFramePlots.test_boxplot.<locals>.<listcomp>      888a,q//888r?   rE   r   )_get_numeric_datar0   r   r9   boxr   r   r  rG  r   r  r3   r   r   r  )r;   hist_dfr<   numeric_colslabelsrm   s         r=   test_boxplotzTestDataFramePlots.test_boxplot  s    ++--588<888rw{++2--//888
#H!!##RYq#l2C2Ca2G%H%H	
 	
 	
 28}}C$5$5 5555555r?   c                     |}|d         }|j                             d          }t          |dd           t          |j         j                   d S )Nheight(   rX  r   rT   r_  )r9   rh  r   r   )r;   ri  r<   seriesrK   s        r=   test_boxplot_seriesz&TestDataFramePlots.test_boxplot_series  sR    H{2&&4bq1111&+/*****r?   c                    |}t          j        g d          }|j                            |          }|                                j        }d |D             }t          |                                |           t          j	        |j
                                        |           t          |j                  dt          |          z  k    sJ d S )N)rE   r   r   )	positionsc                 ,    g | ]}t          |          S r  r   re  s     r=   r  zDTestDataFramePlots.test_boxplot_series_positions.<locals>.<listcomp>!  rf  r?   r   )r3   r   r9   rh  rg  r0   r   r   r  rG  r   r  r   r  )r;   ri  r<   ru  rm   rj  rk  s          r=   test_boxplot_series_positionsz0TestDataFramePlots.test_boxplot_series_positions  s    HYYY''	W[[9[--++--588<8882--//888
#BH$9$9$;$;YGGG28}}C$5$5 5555555r?   z!ignore:set_ticklabels:UserWarning3.10z#Fails starting with matplotlib 3.10c                    |}|                                 j        }d |D             }t          t          j                  t          d          k     rddinddi} |j        j        dddd	|}t          |d
dd           t          |	                                |           t          |j                  dt          |          z  k    sJ d S )Nc                 ,    g | ]}t          |          S r  r   re  s     r=   r  z<TestDataFramePlots.test_boxplot_vertical.<locals>.<listcomp>.  rf  r?   rx  vertForientation
horizontal2   r   rW  r   rT   r_  r\  r   r  )rg  r0   r   r   __version__r9   rh  r   r   get_yticklabelsr   r  )r;   ri  r<   rj  rk  ro   rm   s          r=   test_boxplot_verticalz(TestDataFramePlots.test_boxplot_vertical&  s     ++--588<888
 s'''&//99 UOO. 	
 RW[6R!66v662AB1====2--//88828}}C$5$5 5555555r?   zignore::UserWarningz+Fails starting with matplotlib version 3.10c                    |}|                                 j        }d |D             }t          t          j                  t          d          k     rddinddi}t          |j        j        fdddd|}t          |d	d
           t          |d           t          ||          D ]B\  }}t          |                                |g           t          |j                  dk    sJ Cd S )Nc                 ,    g | ]}t          |          S r  r   re  s     r=   r  zETestDataFramePlots.test_boxplot_vertical_subplots.<locals>.<listcomp>C  rf  r?   rx  r{  Fr|  r}  T)rB   rC   r   rX   )rE   rX   rF   r   r   r   )rg  r0   r   r   r  r   r9   rh  r   r   r   r   r  r   r  )	r;   ri  r<   rj  rk  ro   rK   rm   r   s	            r=   test_boxplot_vertical_subplotsz1TestDataFramePlots.test_boxplot_vertical_subplots;  s!    ++--588<888 s'''&//99 UOO. 	
 !GK
&*T
 
HN
 
 	$6::::U++++T6** 	& 	&IBr1133eW===rx==A%%%%%	& 	&r?   c                    |}|                                 j        }d |D             }t          j        g d          }t	          t
          j                  t	          d          k     rddinddi} |j        j        d
d|i|}t          |
                                |           t          j        |j                                        |           t          |j                  d	t          |          z  k    sJ d S )Nc                 ,    g | ]}t          |          S r  r   re  s     r=   r  zFTestDataFramePlots.test_boxplot_vertical_positions.<locals>.<listcomp>Z  rf  r?   )rX   r#   r   rx  r{  Fr|  r}  ru  r   r  )rg  r0   r3   r   r   r   r  r9   rh  r   r  r  rG  r   r  r   r  )r;   ri  r<   rj  rk  ru  ro   rm   s           r=   test_boxplot_vertical_positionsz2TestDataFramePlots.test_boxplot_vertical_positionsR  s    ++--588<888HYYY''	 s'''&//99 UOO. 	
 RW[7797772--//888
#BH$9$9$;$;YGGG28}}C$5$5 5555555r?   c                 n   t          t          j                            d                              d          t          t          j        d d                   g d          }d}t          j	        t          |          5  |j                            d	           d d d            d S # 1 swxY w Y   d S )
Nr#   r@  r   rL  r#  z2return_type must be {None, 'axes', 'dict', 'both'}r\   
not_a_typereturn_type)r   r3   r4   r5   r6   r7   rj   rk   r_   r`   r  r9   rh  rc   s      r=    test_boxplot_return_type_invalidz3TestDataFramePlots.test_boxplot_return_type_invalidf  s    I!!!$$44V<<v+BQB/00333
 
 

 C]:S111 	2 	2GKKLK111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2s   B**B.1B.r  )dictrK   bothc                 "   t          t          j                            d                              d          t          t          j        d d                   g d          }|j        	                    |          }t          ||           d S )Nr#   r@  r   rL  r#  r  )r   r3   r4   r5   r6   r7   rj   rk   r9   rh  r   )r;   r  r<   r   s       r=   %test_boxplot_return_type_invalid_typez8TestDataFramePlots.test_boxplot_return_type_invalid_typep  s    I!!!$$44V<<v+BQB/00333
 
 

 55v{33333r?   c                 >   t          j        d           t          t          j                            d                              d                    }t          |j        d          }d |j	        D             }t          ||           t          |d	           d S )
Nscipyr#   rs   r&   kderO  c                 ,    g | ]}t          |          S r  r   re  s     r=   r  z2TestDataFramePlots.test_kde_df.<locals>.<listcomp>~      888LOO888r?   rk  r   rS   )r_   importorskipr   r3   r4   r5   r6   r   r9   r0   r   r   )r;   r<   rm   r  s       r=   test_kde_dfzTestDataFramePlots.test_kde_dfz  s    G$$$ry,,Q//??IIJJrwU33388RZ888R11112A&&&&&&r?   c                    t          j        d           t          t          j                            d                              d                    }|                    ddd          }t          |ddd           d S )	Nr  r#   r$   r  r  rq   )rO  rX  rY  rZ  )	r_   r  r   r3   r4   r5   r6   r9   r   rl   s      r=   test_kde_df_rotz"TestDataFramePlots.test_kde_df_rot  sr    G$$$ry,,Q//??HHIIWW%R!W442B1CCCCCCr?   c                     t          j        d           t          t          j                            d                              d                    }t          |j        ddd          }t          |dd	           d S )
Nr  r#   r$   Tr  )rB   rO  rC   r&   rD   rF   )
r_   r  r   r3   r4   r5   r6   r   r9   r   rJ   s      r=   test_kde_df_subplotsz'TestDataFramePlots.test_kde_df_subplots  s}    G$$$ry,,Q//??HHII G	
 
 
 	$6::::::r?   c                     t          j        d           t          t          j                            d                              d                    }|                    ddd          }t          |d           d S )	Nr  r#   r$   r  T)rO  r   rC   r   r   )	r_   r  r   r3   r4   r5   r6   r9   r   rJ   s      r=   test_kde_df_logyz#TestDataFramePlots.test_kde_df_logy  sn    G$$$ry,,Q//??HHIIwwEtw<<U++++++r?   c                    t          j        d           t          t          j                            d                              d                    }t          j        |j        d<   t          |j
        d           d S )Nr  r#   r  r"  r   r   r  r  )r_   r  r   r3   r4   r5   uniformr   locr   r9   r:   s     r=   test_kde_missing_valsz(TestDataFramePlots.test_kde_missing_vals  si    G$$$ry,,Q//77X7FFGGvt"'......r?   c                 z   t          t          j                            d                              d                    }t          |j        j                  }d |j        D             }t          ||           t          |j        j        ddd          }t          |dd	           t          |d
           d S )Nr#   r  c                 ,    g | ]}t          |          S r  r   re  s     r=   r  z3TestDataFramePlots.test_hist_df.<locals>.<listcomp>  r  r?   r  T)rB   rC   r   r&   rD   rF   r   r   )r   r3   r4   r5   r6   r   r9   r   r0   r   r   r   )r;   r<   rm   r  rK   s        r=   test_hist_dfzTestDataFramePlots.test_hist_df  s    ry,,Q//??IIJJrw|,,88RZ888R1111 GL	
 
 
 	$6::::U++++++r?   c                     t          t          j                            d                              d                    }|j                            d          }t          |dd           d S )Nr#   r%   ro  rp  r   rq  )r
   r3   r4   r5   r9   r   r   )r;   rr  rK   s      r=   test_hist_df_seriesz&TestDataFramePlots.test_hist_df_series  s`    	--a0077;;<<{B''4bq111111r?   c                 f   ddl m t          t          j                            d                              d                    }|j                            ddd          }fd|                                D             }t          j
        |d	                                         d
           d S )Nr   	Rectangler#   r%   Tr&   )
cumulativebinsdensityc                 4    g | ]}t          |          |S r  r  r  rZ   r  s     r=   r  zMTestDataFramePlots.test_hist_df_series_cumulative_density.<locals>.<listcomp>  (    JJJqAy1I1IJJJJr?   rN   r1  matplotlib.patchesr  r
   r3   r4   r5   r9   r   get_childrenr  assert_almost_equalr  r;   rr  rm   rectsr  s       @r=   &test_hist_df_series_cumulative_densityz9TestDataFramePlots.test_hist_df_series_cumulative_density  s    000000	--a0077;;<<[AtDDJJJJBOO--JJJ
uRy3355s;;;;;r?   c                 d   ddl m t          t          j                            d                              d                    }|j                            dd          }fd|                                D             }t          j
        |d	                                         d
           d S )Nr   r  r#   r%   Tr&   )r  r  c                 4    g | ]}t          |          |S r  r  r  s     r=   r  zETestDataFramePlots.test_hist_df_series_cumulative.<locals>.<listcomp>  r  r?   r  r  r  r  s       @r=   test_hist_df_series_cumulativez1TestDataFramePlots.test_hist_df_series_cumulative  s    000000	--a0077;;<<[A66JJJJBOO--JJJ
uRy3355t<<<<<r?   c                     t          t          j                            d                              d                    }|j                            ddd          }t          |ddd           d S )	Nr#   r$   r~  r   r}  )rX  rY  r|  r   r  )r   r3   r4   r5   r6   r9   r   r   rJ   s      r=   test_hist_df_orientationz+TestDataFramePlots.test_hist_df_orientation  sc    ry,,Q//??HHIIw||QL|II4abQ??????r?   weights皙?)rs   )shape)rs   r#   c           
         t          t          t          ddgt          j                            d                              d                                        }t          |j        d|          }t          |j        d          }d |j	        D             }d	 |j	        D             }t          j        ||           d S )
Nr   r+   r#   r#   rs   r   )rO  r  r  c                 6    g | ]}|                                 S r  r  r  patchs     r=   r  z8TestDataFramePlots.test_hist_weights.<locals>.<listcomp>  s$    $Q$Q$QEU%5%5%7%7$Q$Q$Qr?   c                 <    g | ]}d |                                 z  S )r  r  r  s     r=   r  z8TestDataFramePlots.test_hist_weights.<locals>.<listcomp>  s)     S S Seu'7'7'9'9!9 S S Sr?   )r   r  r   r3   r4   r5   r6   r   r9   r  r  r  )r;   r  r<   rW  rX  patch_height_with_weightsexpected_patch_heights          r=   test_hist_weightsz$TestDataFramePlots.test_hist_weights  s     c3Z!6!6q!9!9!I!I(!S!STTUU
 
  fgFFFf555$Q$QS[$Q$Q$Q! !T Ss{ S S S
8:OPPPPPr?   c                    t          j        d |D                       }t          j        d |D                       }t          j        d |D                       }t          j        d |D                       }	|t          j        ||d           |t          j        ||d           |t          j        ||d           |t          j        |	|d           d S d S )Nc                 6    g | ]}|                                 S r  r  r  s     r=   r  z7TestDataFramePlots._check_box_coord.<locals>.<listcomp>       8881QWWYY888r?   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z7TestDataFramePlots._check_box_coord.<locals>.<listcomp>  s     !B!B!BQ!,,..!B!B!Br?   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z7TestDataFramePlots._check_box_coord.<locals>.<listcomp>  r  r?   c                 6    g | ]}|                                 S r  )r  r  s     r=   r  z7TestDataFramePlots._check_box_coord.<locals>.<listcomp>  s      @ @ @1 @ @ @r?   F)check_dtype)r3   r   r  rG  )
r;   r  
expected_y
expected_h
expected_x
expected_wresult_yresult_heightresult_xresult_widths
             r=   _check_box_coordz#TestDataFramePlots._check_box_coord  s    88888899!B!B'!B!B!BCC88888899x @ @ @ @ @AA !'*%PPPP!'zuUUUU!'*%PPPP!'jeTTTTTT "!r?   rj  r   r%   	   r   r   r   r   r   r   r   r   r   r   r   r  r%   r  r#   rX   rq   )rX   r%   r  r   r   r   )r   rX   r   r   r   r   )r   r   r   rX   r  r%   c                 6   t          |          }|j                            d          }|                     |j        d d         t          j        g d          t          j        g d                     |                     |j        dd         t          j        g d          t          j        g d                     |                     |j        dd          t          j        g d          t          j        g d                     |j                            dd	
          }|                     |j        d d         t          j        g d          t          j        g d                     |                     |j        dd         t          j        g d          t          j        g d                     |                     |j        dd          t          j        g d          t          j        g d                     |j                            dd	d	          }|                     |d         j        t          j        g d          t          j        g d                     |                     |d         j        t          j        g d          t          j        g d                     |                     |d         j        t          j        g d          t          j        g d                     |j                            dd          }|                     |j        d d         t          j        g d          t          j        g d                     |                     |j        dd         t          j        g d          t          j        g d                     |                     |j        dd          t          j        g d          t          j        g d                     |j                            dd	d          }|                     |j        d d         t          j        g d          t          j        g d                     |                     |j        dd         t          j        g d          t          j        g d                     |                     |j        dd          t          j        g d          t          j        g d                     |j                            dd	d	d          }|                     |d         j        t          j        g d          t          j        g d                     |                     |d         j        t          j        g d          t          j        g d                     |                     |d         j        t          j        g d          t          j        g d                     d S )Nrq   )r  )r   r   r   r   r   r  )r  r  r%   r  r  T)r  rU  )      r   rR     )r  rU  rC   r   rE   r#   r}  )r  r|  )r  r  )r  rU  r|  )r  rU  rC   r|  )r   r9   r   r  r  r3   r   )r;   rj  r<   rm   rK   s        r=   test_hist_df_coordz%TestDataFramePlots.test_hist_df_coord  sI   , t__W\\q\!!JrrNx00x 0 0 011 	 	
 	
 	

 	Jqtx00x00 	 	
 	
 	

 	JrssOx00x 0 0 011 	 	
 	
 	
 W\\q$\//JrrNx00x 0 0 011 	 	
 	
 	

 	Jqtx 0 0 011x00 	 	
 	
 	

 	JrssOx 4 4 455x 0 0 011 	 	
 	
 	
 w||D4|@@GOx00x 0 0 011 	 	
 	
 	

 	GOx00x00 	 	
 	
 	

 	GOx00x 0 0 011 	 	
 	
 	
 W\\ql\;;JrrNx00x 0 0 011 	 	
 	
 	

 	Jqtx00x00 	 	
 	
 	

 	JrssOx00x 0 0 011 	 	
 	
 	
 W\\q$L\IIJrrNx00x 0 0 011 	 	
 	
 	

 	Jqtx 0 0 011x00 	 	
 	
 	

 	JrssOx 4 4 455x 0 0 011 	 	
 	
 	
 w||D4\  
 
 	GOx00x 0 0 011 	 	
 	
 	

 	GOx00x00 	 	
 	
 	

 	GOx00x 0 0 011 	 	
 	
 	
 	
 	
r?   c                     t          t          j                            d                              d                                                    }t          |j        d           d S )Nr#   r  TrJ  )r   r3   r4   r5   r6   cumsumr   r9   r:   s     r=   test_plot_int_columnsz(TestDataFramePlots.test_plot_int_columnsy  sT    ry,,Q//??IIJJQQSS"'$//////r?   markers^+o)r  r  r  c                    dd l m} |                                }|                                 |                    d           t          t          j                            d          	                    d                    }|
                    |          }t          |                                d t          |                             D ]%\  }}|                                ||         k    sJ &d S )Nr   o   r#   rg   )style)matplotlib.pyplotr   gcfclfadd_subplotr   r3   r4   r5   r6   r9   	enumerater   r   
get_marker)r;   r  pltr  r<   rm   rd  rb   s           r=   test_style_by_columnz'TestDataFramePlots.test_style_by_column}  s     	('''''ggii			ry,,Q//??HHIIWW7W##"2<<>>.CLL.#ABB 	5 	5IC??$$44444	5 	5r?   c                 0   t          ddg          }|                                }|                                J |                    d          }|                                                                d                                         dk    sJ d S )NrE   r#   Tr  r    )r
   r9   
get_legend	get_textsr  )r;   r   rm   s      r=   test_line_label_nonez'TestDataFramePlots.test_line_label_none  s    Aq6NNVVXX}}&&&VV4V  }}((**1-6688B>>>>>>r?   zprops, expected))boxpropsboxes)whiskerpropswhiskers)cappropscaps)medianpropsmediansc                     t          d dD                       }|ddii} |j        j        dddi|}||         d                                         dk    sJ d S )	Nc                 t    i | ]5}|t           j                            d                               d          6S r  )r3   r4   r5   )r  ks     r=   
<dictcomp>zHTestDataFramePlots.test_specified_props_kwd_plot_box.<locals>.<dictcomp>  s8    OOOA290033::3??OOOr?   ABCcolorC1r  r  r   r  )r   r9   rh  	get_color)r;   propsr  r<   kwdr   s         r=   !test_specified_props_kwd_plot_boxz4TestDataFramePlots.test_specified_props_kwd_plot_box  sy     OOOOOPPwo&777377h",,..$666666r?   c                    t          ddd          t          ddd          t          ddd          g}g d}t          t          j        |          |dg          }|                                }|j        d	                                         }t          j        |t          j        |t          
                     |j        d	         
                                }t          j        |t          j        |                     |j                                        }d |D             }t          |          j        sJ d |D             }t          j        |d          j        sJ d S )N  r%   rE   r  r   )r3  r2  r1  testr#  r   r(   c                 B    g | ]}|                                 d          S )r   )get_positionr  rZ   s     r=   r  z8TestDataFramePlots.test_unordered_ts.<locals>.<listcomp>  s'    555!!!$555r?   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z8TestDataFramePlots.test_unordered_ts.<locals>.<listcomp>  s     000A1::<<000r?   z%Y-%m-%dr   )r   r   r3   r   r9   r  r  r  rG  r8   rg  r   get_ticklabelsr   is_monotonic_increasingr   r   )	r;   r1   r9  r<   rm   rr   ydataxlocsxlabelss	            r=   test_unordered_tsz$TestDataFramePlots.test_unordered_ts  sT   dB""Dq!$4$4d4A6F6FG HVH
 
 

 WWYY!&&((
#FBHU&,I,I,IJJJ%%''
#E28F+;+;<<< ((**55f555U||333300000~gj999QQQQQQr?   c                     t          j        d           t          dg di          }|                    |            t	          |j        |                       d S Nr  rZ   r   r  r_   r  r   r9   r   r;   rO  r<   s      r=   test_kind_both_waysz&TestDataFramePlots.test_kind_both_ways  s]    G$$$YYY'((
T     r?   c                     t          j        d           t          dg di          }|                    dd|            t	          |j        |          dd           d S r!  r"  r#  s      r=   test_kind_both_ways_x_yz*TestDataFramePlots.test_kind_both_ways_x_y  se    G$$$YYY'((
St$$$sC(((((r?   c                     t          t          d                    }d}t          j        t          |          5  |                    |           d d d            d S # 1 swxY w Y   d S )Nabcdno numeric data to plotr\   r  )r   r7   r_   r`   r  r9   r;   rO  r<   rd   s       r=   test_all_invalid_plot_dataz-TestDataFramePlots.test_all_invalid_plot_data  s    tF||$$']9C000 	 	GGG	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   AA"%A"c                    t          t          j                            d                              d          t
                    }d|t          j                            d                              |j        d                   dk    <   d}t          j        t          |          5  |
                    |	           d d d            d S # 1 swxY w Y   d S )
Nr#   r%   r#   r(   r   r   r  r)  r\   r  )r   r3   r4   r5   r6   r8   r  r_   r`   r  r9   r*  s       r=   (test_partially_invalid_plot_data_numericz;TestDataFramePlots.test_partially_invalid_plot_data_numeric  s    I!!!$$44W==
 
 
 BE29  ##**28A;77#=>']9C000 	 	GGG	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   (CCCc                    t          t          j                            d                              d                    }d}t          j        t          |          5  |                    d           d d d            d S # 1 swxY w Y   d S )Nr#   r-  z*invalid_plot_kind is not a valid plot kindr\   invalid_plot_kindr  )	r   r3   r4   r5   r6   r_   r`   r  r9   rc   s      r=   test_invalid_kindz$TestDataFramePlots.test_invalid_kind  s    ry,,Q//??HHII:]:S111 	. 	.GG,G---	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	.s   BBBzx,y,lblr   r   r   c                     t          ddgddgddgd          }t          j        t          d	          5  |                    |||
           d d d            d S # 1 swxY w Y   d S )NrE   r#   rX   r&   rq   r   r  x must be a label or positionr\   rZ   r[   r   r   r_   r`   r  r9   )r;   rZ   r[   lblr<   s        r=   test_invalid_xy_argsz'TestDataFramePlots.test_invalid_xy_args  s     aV1a&1v>>??]:-LMMM 	) 	)GGa1CG(((	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	)s   AA"Ac                     t          ddgddgddgd          }d}t          j        t          |	          5  |                    d
ddgd           d d d            d S # 1 swxY w Y   d S )NrE   r#   rX   r&   rq   r   r  z.label should be list-like and same length as yr\   r   r+   r   	bad_labelr4  r5  rc   s      r=   test_bad_labelz!TestDataFramePlots.test_bad_label  s    aV1a&1v>>??>]:S111 	< 	<GGcc3Z{G;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	<s   AA#&A#zx,yr   c                     t          g dg dgt          d                    }t          j        t          d          5  |                    ||           d d d            d S # 1 swxY w Y   d S )N)rE   rX   rq   )r#   r&   r   AABr   r3  r\   rY   )r   r7   r_   r`   r  r9   r  s       r=   test_invalid_xy_args_dup_colsz0TestDataFramePlots.test_invalid_xy_args_dup_cols  s     			999-tE{{CCC]:-LMMM 	 	GGa1G	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s    A%%A),A)zx,y,lbl,colorsr*  bluer   bokehcythongreenyellowc                 .   t          ddgddgddgd          }t          |j        d||	           |                    ||||
          }t          |j                  t          |          k    sJ t          |                                |           d S )NrE   r#   rX   r&   rq   r   r  r   r4  )rZ   r[   r   r  
linecolors)r   r   r9   r   r  r   r   )r;   rZ   r[   r6  r>  r<   rm   s          r=   test_y_listlikez"TestDataFramePlots.test_y_listlike  s     aV1a&1v>>??"'SAS9999WWqASW7728}}A&&&&bllnn888888r?   zx,y,colnamesc                 n    t          ddgddgd          }||_        t          |j        ||           d S )NrE   r#   rX   r&   r   rY   )r   r0   r   r9   )r;   rZ   r[   colnamesr<   s        r=   test_xy_args_integerz'TestDataFramePlots.test_xy_args_integer  sE     aV1a&1122
"'Q!,,,,,,r?   c                    t          t          j                            d                              d          t          j                            d                              d          t          j        d          t          j                            d                              d          z   d          }|j                            ddd          }t          |j	                  d	k    sJ d S )
Nr#   r  r  r  r   r+   r%   )rZ   r[   gridsizerE   
r   r3   r4   r5   r  r   r9   r   r   r  rl   s      r=   test_hexbin_basicz$TestDataFramePlots.test_hexbin_basic  s    Y**1--5525>>Y**1--5525>>Yr]]RY%:%:1%=%=%E%E2%E%N%NN 
 
 W^^cS2^662>""a''''''r?   c                 $   t          t          j                            d                              d          t          j                            d                              d          t          j        d          t          j                            d                              d          z   d          }|j                            ddd          }t          |d	         j	        j
                  dk    sJ t          |d
d           d S )Nr#   r  r  r  r   r+   T)rZ   r[   rC   r   rE   r   rF   )r   r3   r4   r5   r  r   r9   r   r   figurerK   r   rJ   s      r=   test_hexbin_basic_subplotsz-TestDataFramePlots.test_hexbin_basic_subplots(  s    Y**1--5525>>Y**1--5525>>Yr]]RY%:%:1%=%=%E%E2%E%N%NN 
 
 w~~sT~:: 47>&''1,,,,$6::::::r?   reduce_Cc                    t          t          j                            d                              d          t          j                            d                              d          t          j        d          t          j                            d                              d          z   d          }|j                            ddd|          }t          |j	                  d	k    sJ d S )
Nr#   r  r  r  r   r+   r   )rZ   r[   r   reduce_C_functionrE   rL  )r;   rQ  r<   rm   s       r=   test_hexbin_with_cz%TestDataFramePlots.test_hexbin_with_c8  s    Y**1--5525>>Y**1--5525>>Yr]]RY%:%:1%=%=%E%E2%E%N%NN 
 
 W^^cSC8^LL2>""a''''''r?   zkwargs, expectedBuGnr)  r(  r$  YlGnc                    t          t          j                            d                              d          t          j                            d                              d          t          j        d          t          j                            d                              d          z   d          } |j        j        d	ddd|}|j        d         j	        j
        |k    sJ d S )
Nr#   r  r  r  r   r+   rY   r   r  )r   r3   r4   r5   r  r   r9   r   r  r$  r   )r;   ro   r  r<   rm   s        r=   test_hexbin_cmapz#TestDataFramePlots.test_hexbin_cmapE  s     Y**1--5525>>Y**1--5525>>Yr]]RY%:%:1%=%=%E%E2%E%N%NN 
 
 RW^3cS33F33~a %*h666666r?   c                 0   t          t          j                            d                              d          g dg d          }d}t	          j        t          |          5  |j                                         d d d            d S # 1 swxY w Y   d S )Nr#   rq   rX   XYZr   r   r   der/   z/pie requires either y column or 'subplots=True'r\   )	r   r3   r4   r5   r_   r`   r  r9   r   rc   s      r=   test_pie_df_errz"TestDataFramePlots.test_pie_df_errX  s    I!!!$$++F33#OO+++
 
 

 @]:S111 	 	GKKMMM	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   $BBBr]  c                     t          t          j                            d                              d          g dg d          }t	          |j        j        |          }t          |j        |j	                   d S )Nr#   rZ  r[  r_  r/   r   )
r   r3   r4   r5   r   r9   r   r   textsr1   )r;   r[   r<   rm   s       r=   test_pie_dfzTestDataFramePlots.test_pie_dfb  sy    I!!!$$++F33#OO+++
 
 

 rw{a00028RX.....r?   c                    t          t          j                            d                              d          g dg d          }t	          |j        j        dd          }t          |          t          |j                  k    sJ |D ]}t          |j
        |j                   t          ||j                  D ]\  }}|                                |k    sJ  d S )Nr#   rZ  r[  r_  r/   TrA   )r   r3   r4   r5   r   r9   r   r   r0   r   rd  r1   r   r%  )r;   r<   rK   rm   ylabels        r=   test_pie_df_subplotsz'TestDataFramePlots.test_pie_df_subplotsl  s    I!!!$$++F33#OO+++
 
 

 !GK
 
 

 4yyC
OO++++ 	3 	3Brx2222dBJ// 	- 	-JB==??f,,,,,	- 	-r?   c                    t          t          j                            d                              d          g dg d          }g d}g d}t	          |j        j        dd||	          }t          |          t          |j                  k    sJ |D ]-}t          |j
        |           t          |j        |
           .d S )Nr#   rZ  r[  r_  r/   r   )r  gr   r   mT)rB   rC   rk  r>  r+  )r   r3   r4   r5   r   r9   r   r   r0   r   rd  r   r  )r;   r<   rk  
color_argsrK   rm   s         r=   test_pie_df_labels_colorsz,TestDataFramePlots.test_pie_df_labels_colors}  s    I!!!$$++F33#OO+++
 
 

 +**...
 GK
 
 
 4yyC
OO++++ 	= 	=Brx000"*<<<<<	= 	=r?   c                    t          t          j                            d                              d                    }t	          d          D ]}t          j        |j        ||f<   t          j        	                    d          \  }}ddi}t          j        d           5   |j        j        dd|dd| d d d            n# 1 swxY w Y   g d}t          |          D ]\  }}t          |          }d	||<   d
 |j        D             }	|	|k    sJ d |                                                                D             }
|d |         ||dz   d          z   }|
|k    sJ d S )Nr#   )r&   r&   r&   )ncols	normalizeT)rC   rm   rJ  )0123r  c                 6    g | ]}|                                 S r  r  r  s     r=   r  z6TestDataFramePlots.test_pie_df_nan.<locals>.<listcomp>  s     555qajjll555r?   c                 6    g | ]}|                                 S r  r  r  s     r=   r  z6TestDataFramePlots.test_pie_df_nan.<locals>.<listcomp>  s     OOOaQZZ\\OOOr?   rE   r  )r   r3   r4   r5   r   r   ilocr   r   rC   r  r  r9   r   r  r7   rd  r  r  )r;   r<   r  r   rK   ro   base_expectedrm   r  r   result_labelsexpected_labelss               r=   test_pie_df_nanz"TestDataFramePlots.test_pie_df_nan  s   ry,,Q//66v>>??q 	# 	#AFBGAqDMM*%%A%..4 t$'-- 	G 	GBGKF$tFFvFFF	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G -,,t__ 	4 	4EArM**HHQK55BH555FX%%%%
 PO2==??3L3L3N3NOOOM+BQB/-A2HHO O33333	4 	4s   #CC
C
r   )r   r   r   c                 B   t          j        d          t          j        ddd          d}t          |          }t          j        d          dz  t          j        d          dz  d}t          |          }t	          |j        fd|i|}t          |dd	           d S )
Nr  r   rN   rY   皙?皙?yerrr#   xerrr  r3   r   r   onesr   r9   r   )r;   ro   r`  r<   d_errdf_errrm   s          r=   test_errorbar_plotz%TestDataFramePlots.test_errorbar_plot  s     )B--biAr&:&:;;q\\gbkkC'bgbkkC.?@@5!! rw>>V>v>>Raa000000r?   c                 R   t          j        d          t          j        ddd          d}t          |          }t          j        d          dz  t          j        d          dz  d}t          |          }t	          |dz   j        ||dd	
          }t          |dd           d S )Nr  r   rN   rY   r}  r~  rE   r   T)r  r  rO  r   r#   r  r  )r;   r`  r<   r  r  rm   s         r=   test_errorbar_plot_barz)TestDataFramePlots.test_errorbar_plot_bar  s    )B--biAr&:&:;;q\\gbkkC'bgbkkC.?@@5!!!VMV%T
 
 
 	Raa000000r?   c                 z   t          j        d          t          j        ddd          d}t          |          }t          |d         j        t          j        d          dz            }t          |dd	           t          |j        t          j        d
          dz            }t          |dd	           d S )Nr  r   rN   rY   r[   r~  r  rE   r  )r#   r  r#   )r3   r   r   r   r9   r  r   r;   r`  r<   rm   s       r=   test_errorbar_plot_yerr_arrayz0TestDataFramePlots.test_errorbar_plot_yerr_array  s    )B--biAr&:&:;;q\\r#w|"'"++2CDDDRaa0000rwRWW-=-=-CDDDRaa000000r?   r  u   誤差c                 R   t          j        d          t          j        ddd          d}t          |          }t          j        d          dz  ||<   t	          |j        |          }t          |dd           t	          |j        d	d
|          }t          |dd           d S )Nr  r   rN   rY   r}  r  r#   r  r[   rZ   )r[   rZ   r  rE   r  )r;   r  r`  r<   rm   s        r=   test_errorbar_plot_column_namez1TestDataFramePlots.test_errorbar_plot_column_name  s     )B--biAr&:&:;;q\\72;;$4rwT222Raa0000rw#4@@@Raa000000r?   c                 j   t          j        d          t          j        ddd          d}t          |          }t          j        t
                    5  |                    t           j                            d          	                    d                     d d d            d S # 1 swxY w Y   d S )Nr  r   rN   rY   r#   ra  r  )
r3   r   r   r  external_error_raisedr  r9   r4   r5   r6   r;   r`  r<   s      r=   &test_errorbar_plot_external_valueerrorz9TestDataFramePlots.test_errorbar_plot_external_valueerror  s    )B--biAr&:&:;;q\\%j11 	G 	GGG..q11AA"EEGFFF	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	G 	Gs   AB((B,/B,c                 >   t          j        d          t          j        ddd          d}t          |          }t          dgdz  dgdz  d          }t          j        t
                    5  |                    |           d d d            d S # 1 swxY w Y   d S )Nr  r   rN   rY   zzzr  )r3   r   r   r  r  r  r9   )r;   r`  r<   r  s       r=   %test_errorbar_plot_external_typeerrorz8TestDataFramePlots.test_errorbar_plot_external_typeerror  s    )B--biAr&:&:;;q\\%2UGbLAABB%i00 	! 	!GGG   	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!s   .BBB)rb   r   r  y_errr  r}  )r   r~  c                     t          t          j        d          t          j        ddd          d          }t          |j        ||          }t          |dd           d S )Nr  r   rN   rY   r  rO  r#   r  r   r3   r   r   r9   r   )r;   rO  r  r<   rm   s        r=   !test_errorbar_plot_different_yerrz4TestDataFramePlots.test_errorbar_plot_different_yerr  s`     RYr]]2q"1E1EFFGGrwU>>>Raa000000r?   zy_err, x_err)r}  r}  c                     t          t          j        d          t          j        ddd          d          }t          |j        |||          }t          |dd           d S )Nr  r   rN   rY   )r  r  rO  r#   r  r  )r;   rO  r  x_errr<   rm   s         r=   &test_errorbar_plot_different_yerr_xerrz9TestDataFramePlots.test_errorbar_plot_different_yerr_xerr   sb     RYr]]2q"1E1EFFGGrwUTJJJRaa000000r?   c                 F   t          t          j        d          t          j        ddd          d          }t          t          j        d          dz  t          j        d          dz  d          }t	          |j        d||d|          }t          |d	d	
           d S )Nr  r   rN   rY   r}  r~  T)rB   r  r  rC   rO  rE   r  )r   r3   r   r  r   r9   r   )r;   rO  r<   r  rK   s        r=   /test_errorbar_plot_different_yerr_xerr_subplotszBTestDataFramePlots.test_errorbar_plot_different_yerr_xerr_subplots  s     RYr]]2q"1E1EFFGGs!2s9JKKLL G
 
 
 	T222222r?   zIterator is consumed)rV   r`   c           	      
   t          j        d          t          j        ddd          d}t          |          }t          |j        t          j        dt          |                              }t          |dd           d S )	Nr  r   rN   rY   r  r  r#   r  )	r3   r   r   r   r9   	itertoolsrepeatr   r   r  s       r=   test_errorbar_plot_iteratorz.TestDataFramePlots.test_errorbar_plot_iterator!  st    )B--biAr&:&:;;q\\ rwY-=c3r77-K-KLLLRaa000000r?   c                    t          t          j        t          j                            d                              d                              }t          t          j        t          j                            d                              d                              }t          |j        |          }t          |dd           t          |j        dd          }t          |dd           d S )Nr#   r-  r  r   r  rE   )r[   r  	r   r3   absr4   r5   r6   r   r9   r   r;   r<   r  rm   s       r=   'test_errorbar_with_integer_column_namesz:TestDataFramePlots.test_errorbar_with_integer_column_names*  s    rvbi33A66FFwOOPPQQ26")"7"7":":"J"J7"S"STTUUrwV444Raa0000rw!!444Raa000000r?   c                    t          t          j        t          j                            d                              d                              }t          t          j        t          j                            d                              d                    ddg          }t          |j        ||          }t          |dd           d S )Nr#   rg   r-  r   r   r  r  r  )r;   rO  r<   r  rm   s        r=   'test_errorbar_with_partial_columns_kindz:TestDataFramePlots.test_errorbar_with_partial_columns_kind3  s     rvbi33A66FFwOOPPQQF29((++;;GDDEEPQSTv
 
 
 rwV$???Raa000000r?   c                 $   t          t          j        t          j                            d                              d                              }t          t          j        t          j                            d                              d                    ddg          }t          ddd	          }|                    |d
           |                    |d
           t          |j	        |d          }t          |dd           d S )Nr#   rg   r-  r   r   1/1/2000r%   MEr,   T)inplacerb   r  r  )r   r3   r  r4   r5   r6   r   r   r   r9   r   )r;   r<   r  ixrm   s        r=   &test_errorbar_with_partial_columns_dtiz9TestDataFramePlots.test_errorbar_with_partial_columns_dti=  s    rvbi33A66FFwOOPPQQF29((++;;GDDEEPQSTv
 
 
 
BT:::
R&&&T***rwV&AAARaa000000r?   err_boxc                     | S r
  r  r   s    r=   <lambda>zTestDataFramePlots.<lambda>J  s    1 r?   c                 :   t          j        d          t          j        ddd          d}t          |          } |t          j        d          dz  t          j        d          dz  d          }t	          |j        |          }t          |dd	
           d S )Nr  r   rN   rY   r}  r~  )rZ   r   r  rE   r  r  )r;   r  r`  r<   errrm   s         r=   &test_errorbar_with_partial_columns_boxz9TestDataFramePlots.test_errorbar_with_partial_columns_boxI  s     )B--biAr&:&:;;q\\gBGBKK#-BGBKK#4EFFGGrwS111Raa000000r?   c                 "   t          j        d          t          j        ddd          d}t          j        d          dz  t          j        d          dz  d}t          ddd	
          }t	          ||          }t	          ||          }t          |j        ||          }t          |dd           t          |j        ||          }t          |dd           t          |j        d|d         |          }t          |dd           t          |j        dd|          }t          |dd           t          |j        ||          }t          |dd           t          |j        d||d          }t          |dd           d S )Nr  r   rN   rY   r}  r~  r  z1/1/2001r  )r.   rh   r  r#   r  r[   rZ   )r[   r  rO  rE   T)rB   rO  r  rC   )r3   r   r  r   r   r   r9   r   )	r;   rO  r`  r  r  tdftdf_errrm   rK   s	            r=   test_errorbar_timeseriesz+TestDataFramePlots.test_errorbar_timeseriesR  s   )B--biAr&:&:;;gbkkC'bgbkkC.?@@ 
JT:::$$$E,,,sxgDAAARaa0000sxe$???Raa0000sx3WS\MMMRaa0000sx3StDDDRaa0000sxgDAAARaa0000 H
 
 
 	T222222r?   c                    t           j                            d                              d          }t          t          j        d                              dd                    j        }|                    ||dz            }|j        d         	                                d         j
        d d df         }|dd d df         t          j        d	dg          z  }t          j        ||           t          j        d
          }t!          j        t$          |          5  |                    |j                   d d d            d S # 1 swxY w Y   d S )Nr#   )rX   r#   rq   rR  rX   rq   )r  r  rE   r   rN   zCAsymmetrical error bars should be provided with the shape (3, 2, 5)r\   r  )r3   r4   r5   r   r   reshapeTr9   r  	get_pathsverticesr   r  r  r  r  r_   r`   r  )r;   r  r<   rm   yerr_0_0expected_0_0rd   s          r=   test_errorbar_asymmetricalz-TestDataFramePlots.test_errorbar_asymmetricalt  ss   i##A&&--i88 ry}},,Q22335WW#C!GW,,>!$..003<QQQTB1aaa7|bhAw&7&77
x666iQ
 
 ]:S111 	  	 GGG	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	 s   #EEEc                 >   t          t          j                            d                              d          t	          t
          j        d d                             }t          |j        d           t          |j        |           t          j
        d           5  |                                }t          |j                  dk    sJ t          j        ||j                   t          |j                  dk    sJ 	 d d d            d S # 1 swxY w Y   d S )	Nr#   rg   r%   rh   T)tabler   rE   )r   r3   r4   r5   r7   rj   rk   r   r9   r  r  r   tablesr   r  r  rl   s      r=   
test_tablezTestDataFramePlots.test_table  sG   I!!!$$++G44v+CRC011
 
 
 	"'...."',,,, '-- 	' 	'Bry>>Q&&&&N2rt$$$ry>>Q&&&&&		' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's   !A#DDDc                    t          t          j        t          j                            d                              d                    t          d          ddg          }t          t          j        t          j                            d                              d                    dz  t          d          ddg          }t          |j        j	        dd          }t          |dd	           t          |j        j	        dd|
          }t          |dd	           t          |j        j	        dd|          }t          |dd	           t          |j        j	        dd||          }t          |dd	           d S )Nr#   )rq   r#   rq   rZ   r[   r#  rY   r   r  )rZ   r[   r  rE   )rZ   r[   r  )rZ   r[   r  r  )r   r3   r  r4   r5   r6   r   r   r9   r   r   r  s       r=   test_errorbar_scatterz(TestDataFramePlots.test_errorbar_scatter  sl   F29((++;;FCCDD((#J
 
 

 F29((++;;FCCDDqH((#J
 
 
 rw#===Raa0000rw#6JJJRaa0000rw#6JJJRaa0000rw#6PVWWWRaa000000r?   c                    dfd	}t          t          j        t          j                            d                              d                    g d          }|j                            ddd	d
d          t          dd            |j	        dd            |j	        dd           |j                            ddd
d          t          dd            |j	        dd           d S )Nhas_xerrc           	      P   g }t          fdj        D                       }|D ]<}t          |          r|                    |           '|                    |           =fd|D             }t          |t          j        |gt          |          z                       d S )Nc              3   H   K   | ]}t          |d           |j        V  dS )FN)r   r  )r  r   has_errs     r=   r  z`TestDataFramePlots.test_errorbar_scatter_color.<locals>._check_errorbar_color.<locals>.<genexpr>  s6      UUA'!We:T:TUUUUUUUr?   c                 &    g | ]}|j         v |S r  )r  )r  rZ   rm   s     r=   r  zaTestDataFramePlots.test_errorbar_scatter_color.<locals>._check_errorbar_color.<locals>.<listcomp>  s%    AAAqQ".-@-@-@-@-@r?   rD  )	next
containersr   extendappendr   r3   r   r   )r  r  r  r  errsel	err_linesrm   s     `    r=   _check_errorbar_colorzMTestDataFramePlots.test_errorbar_scatter_color.<locals>._check_errorbar_color  s    EUUUUUUUUUD % %## %LL$$$$LL$$$$AAAAEAAAI)(c)nn9T0U0UVVVVVVr?   r#   )r%   rq   r_  r   r   r   r`  ra  r*  )rZ   r[   r  r  r   rE   r  )r  has_yerrrA  )rZ   r[   r  r  r   )r  )
r   r3   r  r4   r5   r6   r9   r   r   r  )r;   r  r<   rm   s      @r=   test_errorbar_scatter_colorz.TestDataFramePlots.test_errorbar_scatter_color  s)   		W 		W 		W 		W 		W 		W F29((++;;GDDEE---
 
 
 W__sc#_GGRaa0000bmUJGGGGbmUJGGGGW__sc7_CCRaa0000bmWjIIIIIIr?   c                     t          g ddd          }t          j        t          t          fd          5  |                    dddd	
           d d d            d S # 1 swxY w Y   d S )Nr   r&   rf  z'unknown' is not ar\   r   r   unknownr   )rZ   r[   r)  rO  )r   r_   r`   r  KeyErrorr9   r:   s     r=   test_scatter_unknown_colormapz0TestDataFramePlots.test_scatter_unknown_colormap  s    YYYQ//00]J19MNNN 	F 	FGGcS99GEEE	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	F 	Fs   AA"%A"c                 2   dd l m} |                    d           t                      \  }}t	          g dg dg dg dd          }d }|D ]}|                    ddd|d	
           |                    |                                            ||           |                    d           t                      \  }}t          j	        t                    5  |                    d	|d	          }d d d            n# 1 swxY w Y    ||           d S )Nr   r  rE   r#   rX   r&   rq   r   r   r   r   r`  c                    | D ]?}t          |j                  dk    sJ t          |                                d           @| d         | d         fD ]J}t          |                                d           t          |                    d          d           K| d         | d         fD ]J}t          |                                d           t          |                    d          d           Kd S )	NrE   Tr~   r   r#   Fr   rX   )r   r  r   r  r   rK   rm   s     r=   _checkz5TestDataFramePlots.test_sharex_and_ax.<locals>._check  s"    C C28}}))))r1133TBBBBBAwQ( N Nr1133UCCCCr111==uMMMMMAwQ( M Mr1133TBBBBr111==tLLLLLM Mr?   r   r   rw   T)rZ   r[   rw   rm   sharex)rC   rm   r  )r  r   close_generate_4_axes_via_gridspecr   r9   tight_layoutr  r  r  r	  r;   r  gsrK   r<   r  rm   s          r=   test_sharex_and_axz%TestDataFramePlots.test_sharex_and_ax  s    	('''''		%022D''''''''''''	 
 
		M 		M 		M  	E 	EBGGcSBtGDDDD
		"""t		%022D'44 	@ 	@77DT$7??D	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ts   DDDc                 
   dd l m} t          g dg dg dg dd          }t                      \  }}|D ]}|                    ddd|           |                    |                                           |D ]}t          |j                  dk    sJ t          |
                                d	
           t          |                                d	
           t          |                    d	          d	
           d S Nr   r  r  r   r   rw   )rZ   r[   rw   rm   rE   Tr~   r   r  r   r   r  r9   r  r  r   r  r   r  r   r;   r  r<   r  rK   rm   s         r=   test_sharex_false_and_axz+TestDataFramePlots.test_sharex_false_and_ax  sE    	('''''''''''''''''	 
 
 122D 	8 	8BGGcSBG7777
		""" 	I 	IBrx==A%%%%2--//>>>>2--//>>>>2--D-994HHHHH		I 	Ir?   c                 V   dd l m} t                      \  }}t          g dg dg dg dd          }d }|D ]}|                    ddd|d	           |                    |                                            ||           |                    d
           t                      \  }}t          j	        t                    5  |                    d|d          }d d d            n# 1 swxY w Y   |                    |                                            ||           d S )Nr   r  r  c                    | D ]d}t          |j                  dk    sJ t          |                                d           t          |                    d          d           e| d         | d         fD ]%}t          |                                d           &| d         | d         fD ]%}t          |                                d           &d S )	NrE   Tr~   r   r   r#   rX   F)r   r  r   r   r  r  s     r=   r  z5TestDataFramePlots.test_sharey_and_ax.<locals>._check  s     M M28}}))))r1133TBBBBr111==tLLLLLAwQ( C Cr1133TBBBBBAwQ( D Dr1133UCCCCCD Dr?   r   r   rw   T)rZ   r[   rw   rm   r  r  )rC   rm   r  )r  r   r  r   r9   r  r  r  r  r  r	  r  s          r=   test_sharey_and_axz%TestDataFramePlots.test_sharey_and_ax  s    	('''''022D''''''''''''	 
 
	D 	D 	D  	E 	EBGGcSBtGDDDD
		"""t		%022D'44 	@ 	@77DT$7??D	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 	@ 			"""ts   C,,C03C0c                 
   dd l m} t          g dg dg dg dd          }t                      \  }}|D ]}|                    ddd|           |                    |                                           |D ]}t          |j                  dk    sJ t          |
                                d	
           t          |                                d	
           t          |                    d	          d	
           d S r  r  r  s         r=   test_sharey_and_ax_tightz+TestDataFramePlots.test_sharey_and_ax_tight5  sC   ''''''''''''''''''	 
 
 122D 	8 	8BGGcSBG7777
		""" 	I 	IBrx==A%%%%2--//>>>>2--//>>>>2--D-994HHHHH		I 	Ir?   c           	      n   t          j        d           i }|dv rt          t          j                            d                              d          t          j                            d                              d          t          j        d          t          j                            d                              d          z   d          }ddd	}n|d
k    rt          t          j                            d                              d          t          t          d          t                    t          ddd                                                    }nst          t          j                            d                              d          t          t          d          t                    t          ddd                    }t          j         |j        dd|i|          }t"                              d           t'          j                      |            J dS )z3Check that every plot type gets properly collected.r  )r   r   r   r#   r  r  r  r   r+   rY   rC  r$   r'   r(   r*   r%   r,   r/   rO  r  Nr  )r_   r  r   r3   r4   r5   r  r   r6   r   r7   r8   r   r  weakrefrefr9   r  r  gccollect)r;   rO  argsr<   r  s        r=   test_memory_leakz#TestDataFramePlots.test_memory_leakM  s    	G$$$///..q1199r9BB..q1199r9BB2)>)>q)A)A)I)Ir)I)R)RR  B 3''DDV^^	%%a((88AAd6ll&999 rDDD   cee	 B 	%%a((88AAd6ll&999 rDDD  B k'"'44t4t4455 			%

suu}}}}}r?   c                 
  	
 ddl m	 dd lm
 t	          t
          j                            d                              d          t          dd                    }t          t
          j                            d                              d          |j        t          d	          
          }	
fd}	
fd} |             |            fD ]\  }}|                    |          }t          |j                  dk    sJ |                    |          }t          |j                  dk    sJ ||fD ]m}t!          |                                d           t!          |                                d           t!          |                    d          d           n
                    d            |             |            fD ]\  }}|                    d||g          }t          |j                  dk    sJ t          |j                  dk    sJ |D ]m}t!          |                                d           t!          |                                d           t!          |                    d          d           n
                    d            |            \  }}t)          j        t,                    5  |                    d||gdd          }d d d            n# 1 swxY w Y   t          |d         j                  dk    sJ t          |d         j                  dk    sJ ||fD ]%}t!          |                                d           &t!          |d                                         d           t!          |d                             d          d           t!          |d                                         d           t!          |d                             d          d           
                    d            |            \  }}t)          j        t,                    5  |                    d||gdd          }d d d            n# 1 swxY w Y   t          |d         j                  dk    sJ t          |d         j                  dk    sJ t!          |d                                         d           t!          |d                                         d           ||fD ]J}t!          |                                d           t!          |                    d          d           K
                    d           d S )Nr   gridspecr#   r%   r  r-   rh   r-  ABr#  c                                           dd          }                                 }|                    | d dd d f                   }|                    | dd d f                   }||fS )NrX   rE   r#   GridSpecrO  r  r  r  rW  rX  r  r  s       r=   _get_vertical_gridzSTestDataFramePlots.test_df_gridspec_patterns_vert_horiz.<locals>._get_vertical_grid  sl    ""1a((B**,,C//"RaRU),,C//"QT(++C8Or?   c                                           dd          }                                 }|                    | d d d df                   }|                    | d d df                   }||fS )NrE   rX   r#   r  r  s       r=   _get_horizontal_gridzUTestDataFramePlots.test_df_gridspec_patterns_vert_horiz.<locals>._get_horizontal_grid  sl    ""1a((B**,,C//"QQQU),,C//"QQQT(++C8Or?   rm   rE   Tr~   r   r  r   rC   rm   r  r  Fr   r  r  r   r
   r3   r4   r5   r6   r   r   r1   r7   r9   r   r  r   r  r   r  r  r  r	  )r;   tsr<   r  r  rW  rX  rm   rK   r  r  s            @@r=   $test_df_gridspec_patterns_vert_horizz7TestDataFramePlots.test_df_gridspec_patterns_vert_horizr  sc   ''''''''''''I!!!$$44R88Z444
 
 

 I!!!$$44W==(JJ
 
 
	 	 	 	 	 		 	 	 	 	 	 ,+--/C/C/E/EF 		 		HC''S'//Csy>>Q&&&&''S'//Csy>>Q&&&&Cj M Mr1133TBBBBr1133TBBBBr111==tLLLLLIIe ,+--/C/C/E/EF 	 	HC77Dc3Z788Dsy>>Q&&&&sy>>Q&&&& M Mr1133TBBBBr1133TBBBBr111==tLLLLLIIe &%''S'44 	S 	S77Dc3ZT7RRD	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S47=!!Q&&&&47=!!Q&&&&* 	? 	?B2--//>>>>>tAw..00%@@@@tAw..T.::EJJJJtAw..00$????tAw..T.::DIIII		% ('))S'44 	S 	S77Dc3ZT7RRD	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S 	S47=!!Q&&&&47=!!Q&&&&tAw..00$????tAw..00%@@@@* 	I 	IB2--//>>>>2--D-994HHHHH		%s$   K::K>K>Q::Q>Q>c                 J   ddl m dd lm t	          t
          j                            d                              d          t          dd                    }fd} |            }t          t
          j                            d                              d	          |j        t          d
                    }|                    d|          }|D ]}t          |j                  dk    sJ t!          |                                d           t!          |                                d           t!          |                    d          d                               d            |            }t)          j        t,                    5  |                    d|dd          }d d d            n# 1 swxY w Y   |D ]}t          |j                  dk    sJ |d         |d         fD ]%}t!          |                                d           &|d         |d         fD ]%}t!          |                                d           &|d         |d         fD ]J}t!          |                                d           t!          |                    d          d           K|d         |d         fD ]J}t!          |                                d           t!          |                    d          d           K                    d           d S )Nr   r  r#   r%   r  r  rh   c                  X                        dd          }                                 }|                    | d dd df                   }|                    | d ddf                   }|                    | dd df                   }|                    | d                   }||||fS )NrX   r#   rO   r  )r  r  rW  rX  ax3ax4r  r  s         r=   _get_boxed_gridzKTestDataFramePlots.test_df_gridspec_patterns_boxed.<locals>._get_boxed_grid  s    ""1a((B**,,C//"RaR!V*--C//"RaRU),,C//"QU),,C//"T(++CS#%%r?   r$   r'   r#  Tr   rE   r~   r   r  r  rX   Fr	  )r;   r
  r  rK   r<   rm   r  r  s         @@r=   test_df_gridspec_patterns_boxedz2TestDataFramePlots.test_df_gridspec_patterns_boxed  s   ''''''''''''I!!!$$44R88Z444
 
 
	& 	& 	& 	& 	& 	&   I!!!$$44W==(LL
 
 

 www.. 	I 	IBrx==A%%%%2--//>>>>2--//>>>>2--D-994HHHHH		%   '44 	M 	M77DT$t7LLD	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	M 	& 	&Brx==A%%%%%7DG$ 	? 	?B2--//>>>>>7DG$ 	@ 	@B2--//?????7DG$ 	J 	JB2--//????2--D-995IIIII7DG$ 	I 	IB2--//>>>>2--D-994HHHHH		%s   GG	Gc                 v    t          t          g dg dd          t          j        j        ddd           d S )Nr   r  rf  r   r   rY   )kws)r   r   r   PlotAccessor_dataframe_kinds)r;   s    r=   test_df_grid_settingsz(TestDataFramePlots.test_df_grid_settings  sR    IIIIII6677!2$$	
 	
 	
 	
 	
 	
r?   c                    t           j                                        \  }}|                    g d           t	          t
          j                            d                              d                                        |           d S )N)r}  r}  r}  r}  r#   r%   r  )	r   r   rC   add_axesr
   r3   r4   r5   r9   )r;   r  rm   s      r=   test_plain_axesz"TestDataFramePlots.test_plain_axes	  sw     *%%''R)))***ry$$Q''..r223388B8?????r?   c                    t          t          j                            d                              d          t          j                            d                              d          d          }t
          j                                        }|                    d          }|	                    d|dddd	           d S )
Nr#   r   rf  )r   r   rE   rE   r   r   r   hsv)rO  rm   rZ   r[   r   r$  )
r   r3   r4   r5   r6   r   r   rO  r  r9   )r;   r<   r  rm   s       r=   test_plain_axes_dfz%TestDataFramePlots.test_plain_axes_df		  s     Y**1--==a@@Y**1--==a@@ 
 
 j!!\\,''
Y2sGGGGGr?   c                    t           j                                        \  }}ddlm}  ||          }|                    ddd          }t          t          j        	                    d                              d                    
                    |	           t          t          j        	                    d                              d                    
                    |	           d S )
Nr   )make_axes_locatabler8  z5%g?)r"  padr#   r%   r  )r   r   rC   mpl_toolkits.axes_grid1r  append_axesr
   r3   r4   r5   r9   )r;   r  rm   r  dividercaxs         r=   #test_plain_axes_make_axes_locatablez6TestDataFramePlots.test_plain_axes_make_axes_locatable	  s    *%%''R??????%%b))!!'$!??ry$$Q''..r223388B8???ry$$Q''..r223388C8@@@@@r?   c                    t           j                                        \  }}ddlm}  ||ddd          }t          t          j                            d                              d                    	                    |	           t          t          j                            d                              d                    	                    |	           d S )
Nr   )
inset_axesz30%r1  rX   )r  rn  r  r#   r%   r  )
r   r   rC   %mpl_toolkits.axes_grid1.inset_locatorr&  r
   r3   r4   r5   r9   )r;   r  rm   r&  iaxs        r=   test_plain_axes_make_inset_axesz2TestDataFramePlots.test_plain_axes_make_inset_axes 	  s    *%%''RDDDDDDj5!<<<ry$$Q''..r223388B8???ry$$Q''..r223388C8@@@@@r?   method)rb   r  r   c                 p   t          t          j                            d                              d          t          d                                        d                               d           }d	}d
dg}||dd} t          |j        |          di |}t          |j
        |           d S )Nr#   )rR  r#   r  r   c                 4    | j                                         S r
  )r+   r  r<   s    r=   r  zBTestDataFramePlots.test_secondary_axis_font_size.<locals>.<lambda>/	  s     r?   r   c                     | j         dz  S )Ng?r.  r-  s    r=   r  zBTestDataFramePlots.test_secondary_axis_font_size.<locals>.<lambda>0	  s     r?   )r   r  r   r   T)rz  rY  
mark_right)rK   r\  r  )r   r3   r4   r5   r6   r7   assignr   r9   r   r  )r;   r*  r<   rY  rM  ro   rm   s          r=   test_secondary_axis_font_sizez0TestDataFramePlots.test_secondary_axis_font_size(	  s     	%%a((88AA4PT::   V..V//V++V,, 	 3Z!#NN%WRWf%%////AAAAAAr?   c                    t          g dg dg dd          }|j                            d          }|                    dd           d	 |                                D             }t          t          ||                                                    }|d
         dk    sJ |d         dk    sJ |d         dk    sJ d S )N)rX   r#   rX   )r  *      )MondayTuesday	Wednesday)salesvisitsdayr;  r   rN   rX   c                 6    g | ]}|                                 S r  r  r  ts     r=   r  zATestDataFramePlots.test_x_string_values_ticks.<locals>.<listcomp>F	       BBBqzz||BBBr?   r6  r0  r7  r1  r8  r2  )r   r9   rC  set_xlimr   r  r   
get_xticks)r;   r<   rm   xticklabelslabels_positions        r=   test_x_string_values_ticksz-TestDataFramePlots.test_x_string_values_ticks:	  s     "&,,999 
 
 W\\E\""
BBBR-?-?-A-ABBBs;@@AAx(C////y)S0000{+s222222r?   c                     t          j        ddgddgg          }t          t          j                            d                              d          ddg|          }|                                }|                    d	d
           d |	                                D             }t          t          ||                                                    }|d         dk    sJ |d         dk    sJ |d         dk    sJ |d         dk    sJ d S )Nr  i  rE   r#   r  r   r+   r/   rN   r&   c                 6    g | ]}|                                 S r  r  r=  s     r=   r  zETestDataFramePlots.test_x_multiindex_values_ticks.<locals>.<listcomp>X	  r?  r?   z	(2012, 1)r0  z	(2012, 2)r1  z	(2013, 1)r2  z	(2013, 2)r3  )r   from_productr   r3   r4   r5   r6   r9   r@  r   r  r   rA  )r;   r1   r<   rm   rB  rC  s         r=   test_x_multiindex_values_ticksz1TestDataFramePlots.test_x_multiindex_values_ticksM	  s    '$1v(>??I!!!$$44V<<#J
 
 

 WWYY
BBBR-?-?-A-ABBBs;@@AA{+s2222{+s2222{+s2222{+s222222r?   c                     t          ddgddg          }|                    |          }|                                }|d         dk     sJ |d         dk    sJ d S )Nr#   r&   rE   rh   r  r   )r   r9   r5  )r;   rO  r<   rm   xlimss        r=   test_xlim_plot_linez&TestDataFramePlots.test_xlim_plot_line`	  sd     1vaV,,,WW$WQx!||||Qx!||||||r?   c                    t           j                                        \  }}g d}t          g dg dg dg dd|          }|g d         j                            |d	
           |dg                             |d           |                                }|d         dk     sJ |d         dk    sJ d |                                D             }||k    sJ d S )N)k1k2k3k4)i  r!    r!  )i  ix  r!  i  )rQ  rQ  i@  i  )rE   rX   r&   rX   )s1s2s3rz  rh   )rR  rS  rT  F)rm   rU  rz  T)rm   rz  r   rE   rX   c                 6    g | ]}|                                 S r  r  r=  s     r=   r  zWTestDataFramePlots.test_xlim_plot_line_correctly_in_mixed_plot_type.<locals>.<listcomp>	  r?  r?   )r   r   rC   r   r9   r   r5  r   )r;   r  rm   indexesr<   rJ  rB  s          r=   0test_xlim_plot_line_correctly_in_mixed_plot_typezCTestDataFramePlots.test_xlim_plot_line_correctly_in_mixed_plot_typej	  s    *%%''R***...---...+||	  
 
 
 	#''2u'===
M?  BD 999Qx!||||Qx!|||| CBR-?-?-A-ABBBg%%%%%%r?   c                    t          dgt                    }|j        sJ |                                }t	          |                                          dk    sJ |                                d         }t	          |                                          dk    sJ t	          |                                          dk    sJ d S )Nfoo)r0   r)   rE   r   )r   intemptyr9   r   r   r  rg  )r;   r<   rm   rb   s       r=   test_plot_no_rowsz$TestDataFramePlots.test_plot_no_rows	  s    wc222xWWYY2<<>>""a''''||~~a 4>>##$$))))4>>##$$))))))r?   c                     t          g d          }t          j        t          d          5  |                                 d d d            d S # 1 swxY w Y   d S )Nr   r)  r\   )r   r_   r`   r  r9   r:   s     r=   test_plot_no_numeric_dataz,TestDataFramePlots.test_plot_no_numeric_data	  s    '']9,EFFF 	 	GGIII	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   AAA)rb   r   r  r   r  r  rC  r   c                 @   t          j        d           t          j        d          t          j        d          dz   t          j        d          dz   t          j        d          t          j        d          d}t	          |          }|                    ddg|          }t          |          dk    sJ d	d
gddgdgf}t          ||          D ]I\  }}|dk    rt          ||           |dk    r't          |j	                  t          |          k    sJ Jd S )Nr  r%   rE   r_  )r   ra  )r   r`  rC   rO  rX   r   ra  r   r`  r   r   r  rb   )
r_   r  r3   r   r   r9   r   r   r   r  )r;   rO  r`  r<   rK   rz  rm   rk  s           r=   test_group_subplotz%TestDataFramePlots.test_group_subplot	  s    	G$$$22"2"22
 
 q\\wwZ 8twDD4yyA~~~~:SzC59dO44 	4 	4JBu}}$R7777v~~28}}F3333		4 	4r?   c                     t          t          d                    }d}t          j        t          |          5  |                    dg           d d d            d S # 1 swxY w Y   d S )NrE   z!An iterable subplots for a Seriesr\   r   rC   )r
   r   r_   r`   NotImplementedErrorr9   )r;   serrd   s      r=   (test_group_subplot_series_notimplementedz;TestDataFramePlots.test_group_subplot_series_notimplemented	  s    U1XX1].c::: 	( 	(HHvhH'''	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	( 	(s   AA#&A#c                    t          t          j        d          t          j        ddg                    }d}t          j        t          |          5  |                    dg           d d d            d S # 1 swxY w Y   d S )Nr#   r  r  r   z6An iterable subplots for a DataFrame with a MultiIndexr\   rd  )	r   r3   eyer   r   r_   r`   re  r9   rc   s      r=   ,test_group_subplot_multiindex_notimplementedz?TestDataFramePlots.test_group_subplot_multiindex_notimplemented	  s    rvayy**@&&AQ*R*RSSSF].c::: 	' 	'GGfXG&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's   A::A>A>c                     t          t          j        d          ddg          }d}t          j        t
          |          5  |                    dg           d d d            d S # 1 swxY w Y   d S )Nr#   r   r   z4An iterable subplots for a DataFrame with non-uniquer\   rc  rd  )r   r3   ri  r_   r`   re  r9   rc   s      r=   0test_group_subplot_nonunique_cols_notimplementedzCTestDataFramePlots.test_group_subplot_nonunique_cols_notimplemented	  s    rvayy3*555D].c::: 	' 	'GGfXG&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's   A((A,/A,zsubplots, expected_msg)){   z(subplots should be a bool or an iterable)r   !each entry should be a list/tuple))rE   rn  )rc  rn  c                 
   t          j        d          t          j        d          d}t          |          }t          j        t
          |          5  |                    |           d d d            d S # 1 swxY w Y   d S )Nr%   rf  r\   rd  r3   r   r   r_   r`   r  r9   )r;   rC   expected_msgr`  r<   s        r=   test_group_subplot_bad_inputz/TestDataFramePlots.test_group_subplot_bad_input	  s     )B--bimm44q\\]:\::: 	' 	'GGXG&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's   A88A<?A<c                    t          j        d          t          j        d          d}t          |          }t          t           j                  t          d          k     rMt          j        t          d          5  |                    dg           d d d            d S # 1 swxY w Y   d S t          j        t          d          5  |                    dg           d d d            d S # 1 swxY w Y   d S )	Nr%   rf  z2.0.0z Column label\(s\) \['bad_name'\]r\   )r   bad_namerd  z-Column label\(s\) \[np\.str\_\('bad_name'\)\])	r3   r   r   r   r  r_   r`   r  r9   r  s      r=   &test_group_subplot_invalid_column_namez9TestDataFramePlots.test_group_subplot_invalid_column_name	  sv   )B--bimm44q\\2>""WW%5%555z1TUUU 6 6"3!45556 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 "R   6 6 "3!45556 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6s$   >B##B'*B'C00C47C4c                 4   t          j        d          t          j        d          t          j        d          d}t          |          }t          j        t
          d          5  |                    ddg           d d d            d S # 1 swxY w Y   d S )Nr%   r   zshould be in only one subplotr\   rf  )r   r   rd  rp  r  s      r=   $test_group_subplot_duplicated_columnz7TestDataFramePlots.test_group_subplot_duplicated_column	  s    )B--bimm")B--HHq\\]:-LMMM 	7 	7GGj*5G666	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7 	7s   'BBB)rh  r   r   c                    t          j        d          t          j        d          d}t          |          }t          j        t
          d          5  |                    dg|           d d d            d S # 1 swxY w Y   d S )Nr%   rf  z1When subplots is an iterable, kind must be one ofr\   r`  rp  )r;   rO  r`  r<   s       r=   test_group_subplot_invalid_kindz2TestDataFramePlots.test_group_subplot_invalid_kind	  s    )B--bimm44q\\]Q
 
 
 	6 	6 GGj\G555	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6 	6s   A::A>A>z index_name, old_label, new_label)Nr  new)oldr{  rz  )Nr  r  )Nr  rE   r  )rb   rC  r   c                    t          ddgddggddg          }||j        _        |                    |          }|                                |k    sJ |                                dk    sJ |                    |||	          }|                                t          |          k    sJ |                                t          |          k    sJ d S )
NrE   r#   rq   Type AType Br   r  r  )rO  rg  xlabel)r   r1   r   r9   
get_xlabelr%  str)r;   rO  
index_name	old_label	new_labelr<   rm   s          r=   (test_xlabel_ylabel_dataframe_single_plotz;TestDataFramePlots.test_xlabel_ylabel_dataframe_single_plot	  s     AA'(H1EFFF" WW$W}})++++}}"$$$$ WW$yWCC}}#i..0000}}#i..000000r?   zxlabel, ylabel))NN)X LabelN)NY Label)r  r  c                     d}d}t          ddgddgg||g          }|                    |||||          }|                                ||n|k    sJ |                                ||n|k    sJ d S )Nr}  r~  rE   r#   rq   r   )rO  rZ   r[   r  rg  )r   r9   r  r%  )r;   rO  r  rg  xcolycolr<   rm   s           r=   'test_xlabel_ylabel_dataframe_plane_plotz:TestDataFramePlots.test_xlabel_ylabel_dataframe_plane_plot	
  s     AA'$>>> WW$$$vfWMM}}6>44vFFFF}}6>44vFFFFFFr?   )FTc                 N   t          dg                              |dddg          }|j        j        D ]o}|j                                        rT|                                dk    sJ |                                dk    sJ |                                d         dk    sJ pd S )Nr   r]  )r   rs   r(  )rz  rg  rt   rp   )	r   r9   rO  rK   r   get_visibler%  r  
get_yticks)r;   rz  ax_dfrm   s       r=   test_secondary_yz#TestDataFramePlots.test_secondary_y
  s    1####Cht $ 
 
 ,# 	0 	0Bx##%% 0}}#----{{}}0000}}q)R////		0 	0r?   c           	         t          t          j                            d                              d          t          t          d          t                    t          ddd          	          }t          j
        d
          5  |                                }|j                                        }d d d            d S # 1 swxY w Y   d S )Nr#   r$   r'   r(   r*   r%   r+   r,   r/   F)r   r3   r4   r5   r6   r   r7   r8   r   r  r  r9   r  )r;   r<   r   s      r=   test_plot_no_warningz'TestDataFramePlots.test_plot_no_warning)
  s     I!!!$$44W==$v,,f555\2C@@@
 
 

 '.. 	 			A		A	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   .CC
C)NNNN)__name__
__module____qualname__r_   markslowr>   rL   rP   rU   xfailre   rn   parametrizer{   r   r   r   r   r   r   r7   r   r   r   r   r   r   r   r   r   r  r
  r  r  r  r  r  r%  r3   r*  rh  r.  r   r   r<  r>  rD  rN  rY  r\  r`  rc  r   r   rq  rw  ry  r}  r  r  r  r  r  r  r  r  r  r  r  r  r   r   CategoricalIndexr  r  r  r  r  r  paramtd
skip_if_nor  r  r  r&  r.  r6  r;  r@  rI  rP  rS  r]  rb  rl  rs  rw  filterwarningsr   r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r   r  _common_kindsr$  r&  r+  r.  r1  r7  r:  r=  rF  rI  rM  rP  stdrT  rX  rb  re  rh  rm  r{  r  r  r  r  r  r  r
   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  
_all_kindsr  r  r  r  r  r  r$  r)  r2  rD  rH  rK  rW  r\  r^  ra  rg  rj  rl  rr  ru  rw  ry  r  r  r  r  r  r?   r=   r!   r!   7   s       [/ / / [; ; ; [; ; ; [; ; ; [455[% %  65% [' ' ' [[zzz"zzz" +66!tfEE		
 - -  - [+ + +. [1 1 1 [' ' ' [3 3 32 [[Xg77; ; 87 ; [! ! ! [T']]C%3Zc"3Zc"3Zc"3Zc"3Zc"3Zc"	
 3 3 3 [[V%C%C%CDD1 1 ED 1 [[RLBKRLS#Jc,,-Ss++,	

 
< <
 
 <( ( (
6 6 6' ' '1 1 1
0 
0 
0	N 	N 	N [!M3D#E / / /  [],F,F,FGG
> 
> HG
>	( 	( 	(
( 
( 
(N N N, , ,' ' '
  
  
  []RXrz,BCC
A 
A DC
A [Is00019M9M9MNNNIsCc3<=Cc263<  	
	 	9 9	 	99 9 9
& 
& 
&2 2 2 [Vff%566[VaW--; ; .- 76; [Vff%566C C 76C( ( (  [Vff%566H H 76H [a**[sAFFFG Y Y Y$ [a**[sAFFFG 
T 
T 
T [a**[sAFFFG  [XY,>'?@@H H A@ H& [X]D,A'BCC2 2 DC2
6 
6 
6 [.   
 [Yu66  76 &	0 	0 	0 [Yu66* * 76*. . . [*,BC  [Yu66
2 
2 76 
2 [*,BC 2 2 2. . .) ) )
% 
% 
%" " "	" 	" 	" [UUB,?$@AA. . BA., [Vj&%9::5 5 ;:5# # #; ; ;6 6 6 [V&7%@AA5 5 BA5 [Ty9Q9Q R R RS  [Vj&%9::[Wyyy///&BCC9 9 DC ;: 
9 [Yu66[	.	.	.0U0U0UV U U	  76
U4 [V%I%I%IJJ5 5 KJ5 [Y)(DEEA A FEA8 8 8&D D D.Y Y Y. . .
; 
; 
; [[u!t44		
 1 1  1 [' ' ' [F F F [F F F
6 
6 
6+ + +6 6 6 [ CDD[  GGFOO34   6 6	  ED
6  [ 566[  GGFOO3<   & &	  76
&$ [ CDD[  GGFOO34   6 6	  ED
62 2 2 [],D,D,DEE4 4 FE4' ' 'D D D	; 	; 	;, , ,/ / /, , , 2 2 2
< < <= = =@ @ @ [C'"'////wrwX7N7N7N1NO Q Q Q* U U U U. [ RYxrx88("(CSCSCS:T:TUURYxrx88("(???:S:STTRYxrx88("(CSCSCS:T:TUU  RYBHbfaAq!455xrx@S@S@S7T7T  RYBHaAq!455xrx@R@R@R7S7S  RYBHaArvq!455xrx@S@S@S7T7T 
 
	
 *j
 j
+ *j
X0 0 0 [$$OO#J		
 	5 	5 	5? ? ? [	
 	
 	
 7 7 7R R R. [VX%:%HII! ! JI! [Vi%:;;) ) <;) [VX%:%HII  JI [X*899VHD   . . . [3Zc"US#Jc
+	
 ) ) )< < < [UZ3%$>??  @? [3%#(3*sCj5&/:A(+gx-@A	
 9 9 9 [^q!c3Z.@1a!Q.-QRR- - SR-( ( (; ; ;  [Z$88
( 
( 98
( [L+&4fv&	
 	7 	7 	7   [S3(++/ / ,+/- - -"= = =*4 4 44 [[TN4((t	
 1 1  1 [1 1 1 [1 1 1 [[Vfh%788	1 	1 98 	1 [G G G [! ! ! [[V%<%<%<==[F7272;;$3///IGBGBKK#-GBGBKK#4EFFGG	
 1 1  >= 1 [[V%<%<%<==[ 	c 1c8IJJKK	c 1c8IJJKK VGBGBKK#%C000&&s9JQT2U2U2UV	

 
1 1
 
 >= 1
 [[V%<%<%<==3 3 >= 3 [4ZHH1 1 IH11 1 1 [[Vfe_551 1 65 1 [	1 	1 	1 [[Yi(@AA1 1 BA 1 [V%<%<%<==3 3 >=3B     $' ' '1 1 1,J J J4F F F& & &PI I I4& & &PI I I0 [VX%:%EFF" " GF"HQ Q Qf3 3 3j
 
 
@ @ @H H HA A AA A A [X'>'>'>??B B @?B"3 3 3&3 3 3& [Vff%566  76& & &4* * *  
 [P 4 4 4*( ( (' ' '' ' ' [ 	
 	
 	
 ' ' '6 6 67 7 7 [V%ABB6 6 CB6 [*!21v	
	 	 [V%<%<%<==1 1 >=	 	1" [	
 	
 	
  [Vi%:;;	G 	G <; 	G []M::0 0 ;:0 [
 
 
 
 
r?   r!   c                  6   dd l m}  t          j                            dd          }|                     |d                   }|                     |d                   }|                     |d                   }|                     |d                   }|||||gfS )Nr   r#   r  )rE   r   r  r   )r  r   r   r  r  subplot)r  r  ax_tlax_llax_trax_lrs         r=   r  r  7
  s    ######			q!	$	$BKK4!!EKK4!!EKK4!!EKK4!!EueU+++r?   )6__doc__r   r   r  r  r  rj   r  numpyr3   r_   pandas.util._test_decoratorsutil_test_decoratorsr  pandas.core.dtypes.apir   pandasr   r   r   r   r	   r
   r   r   r   r   pandas._testing_testingr  pandas.tests.plotting.commonr   r   r   r   r   r   r   r   r   r   r   r   r   pandas.util.versionr   pandas.io.formats.printingr   r  r   r  r!   r  r  r?   r=   <module>r     sa   % %        
			     				        ) ) ) ) ) ) ) ) ) / / / / / /    
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                    ( ' ' ' ' ' 3 3 3 3 3 3f,''f-..}' }' }' }' }' }' }' }'@P	, 	, 	, 	, 	,r?   