
    Eg<                    X   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.  e
j/        d          Z0 e
j/        d	          Z1 G d
 d          Z2d Z3d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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 Zbd Zcej        d                    d          d             Zed Zfd Zgej                            dg d          d             Zhd Zid Zjd Zkd Zld Zmd Znd Zod Zpd Zqd Zrej                            dd e'js        d          z  d e'js        d          z  g          d             Zt	 	 	 	 dVdZuej                            d e'jv         e'jw        g d           e'jw        g d                     e'jv         e'jw        g d           e'jw        g d¢                     e'jv         e'jw        g d           e'jw        g dâ                    dĜ e'jv         e'jw        e'j,        dYddd`dg           e'jw        g dȢ                     e'jv         e'jw        dYe'j,        ddd`dg           e'jw        g dɢ                     e'jv         e'jw        dYdde'j,        d`dg           e'jw        g dʢ                    dĜg          d˄             Zxd̄ Zyej                            ddddddddg dѢddgg          d҄             Zzdӄ Z{ej                            dg dբ          dք             Z|dׄ Z}ej                            dVe~j        j                  d؄             Zej                            dVd-d0g          dل             Zej                            dVe~j        j                  dڄ             Zej                            dV ee~j        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             Zd Zej                            d,ddg          d             Zd 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'js        d          dz  d.           e+ e'js        d          dz   e'js        d          dz  d/          g          d                                     Zej        j        ej                            dVg d          ej                            d e+ e'js        d          dz   e'js        d          dz  d/           e+ e'js        d          dz   e'js        d          dz  d/          f e e'js        d          dz  d.           e e'js        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                            dVe~j        j                  d+             Zd, Zd- Zd. Zd/ Zd0 Zd1 Zd2 Zej                            d3g d4          d5             Zd6 Zd7 Zej                            dVd(dWg          d8             Zd9 Zd: Zd; Zej                            dVd<          d=             Zd> Zd? Zd@ Zej                            dAg dB          dC             ZÐdD ZĐdE Zej                            dVdF          dG             Zej                            dHdIdJdKdLddMdYdgfg          ej                            dVg dN          dO                         Zej                            dPg dQ          ej                            dVd-d0g          dR                         Zej                            dhdS          dT             Zej        j        dU             ZdS (W  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     [/var/www/sysmax/venv/lib/python3.11/site-packages/pandas/tests/plotting/frame/test_frame.py	test_plotzTestDataFramePlots.test_plot7   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   r2   r3   r4   r5   r   r6   r7   r   r   r8   r   r:   r;   axess      r<   test_plot_subplotsz%TestDataFramePlots.test_plot_subplots@   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"   )rA   rB   rG   r%   r"   r"   rE   rH   rI   s      r<   "test_plot_subplots_negative_layoutz5TestDataFramePlots.test_plot_subplots_negative_layoutK   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)rA   rB   	use_indexr   xrotr%   rC   rE   )r   r2   r3   r4   r5   r   r6   r7   r   r   r8   r   r   rI   s      r<   test_plot_subplots_use_indexz/TestDataFramePlots.test_plot_subplots_use_indexZ   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 )
NrD   r"      r%   xyz''Line2D' object has no property 'blarg'matchT)blarg)r   pytestraisesAttributeErrorr8   liner:   r;   msgs      r<   test_plot_invalid_argz(TestDataFramePlots.test_plot_invalid_argj   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$   rW   r$   r0   TrQ   r   rR   )
r   r2   r3   r4   r6   stringascii_lettersr   r8   r   r:   r;   axs      r<   test_plot_tick_propsz'TestDataFramePlots.test_plot_tick_propsr   s}    I!!!$$++G44v+CRC011
 
 

 rw$7772A&&&&&&r>   kwargsyticks)rD      r$   xticks)id   )ylimxlimTblah)rA   rB   titlec                     t          t          j                            d                              d          t	          t
          j        d d                             }t          |j        fi | d S )Nr"   rf   r$   rg   	r   r2   r3   r4   r6   ri   rj   r   r8   r:   rn   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"   rf   r$   rg   Tru   )rB   rv   rW   rW   rD   rE   Fvisibleminorr   rR   )r   r2   r3   r4   r6   ri   rj   r8   r   r   xaxisget_xticklabels	get_labelr   )r:   r;   rJ   rl   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"   rf   r$   rg   ru   rv   rx   r9   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"   rf   rg   Trh   r   rR   )zipri   rj   ranger   r2   r3   r4   r   from_tuplesr   r8   r   )r:   tuplesr;   rl   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   rD   )   βr"   )r   rW   )   γr%   )r   rp   )   δ   )r      i0i1)names)baru   Δ)r   u   Εc0c1r"   r   r$   )   r"   r.   u   Σr   )	r   r   r   r2   r3   r4   integersr   r8   )r:   r0   r/   r;   s       r<   test_plot_multiindex_unicodez/TestDataFramePlots.test_plot_multiindex_unicode   s     &	 	 	 ,
 
 
 ( 124,
 
 
 I!!!$$--aV<<
 
 

 	"'222222r>   rG   N)rM   rD   c                     t          dt          j                            d                              d          i          }t	          |j        j        d|          }t          |dd           d S )	NrY   r"   r$   T)rB   rG   rD   rD   rD   rE   )r   r2   r3   r4   r   r8   r   r   )r:   rG   r;   rJ   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 )NrY   r"   r$   TrB   rl   rD   r   )r   r2   r3   r4   mplpyplotrB   r8   r   lenrJ   )r:   r;   _rl   rJ   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rD   r"   rW   r%   rp   r   rp   rW   r"   r'   z%Yformati8T)r   utcr   r*   r   r   r   rX   )
r   r2   arraynanr7   pdto_datetimeviewr   r8   )r:   colsrY   rZ   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>   r8   )ra   r   histpiec                     t          j        g dd          }t          |          }t          t	          |j        |                     d S )NrD   r"   rW   r%   UInt32r'   )r   r   r
   r   getattrr8   )r:   r8   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, kwargsra   r   r   r   rZ   scatterrY   rX   hexbinc                     t          j        g dd          }t          ||d          }t          t	          |j        |          fi | d S )Nr   r   r'   rX   )r   r   r   r   r   r8   )r:   r8   rn   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rY   rZ   zrD   r"   rW   r   r*   rD   )r   r8   r   	get_linesrk   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"   rf   abcr/   r   r   rX   )	r   r2   r3   r4   r5   r8   r   r   r   rk   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"   rN   r   r   r   NAMELABEL)rZ   label)r   r2   r3   r4   r5   r0   namer8   r9   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"   rp   r%   r&   r'   r)   rp   r*   r+   r.   r   rD   rX   r   rY   rZ   )r   r2   r3   r4   r5   r   r6   r7   r   r   r8   	set_indexr*   r9   s     r<   test_plot_xyzTestDataFramePlots.test_plot_xy0  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)   rp   r*   r+   r.   rD   rX   r   r   )r   r2   r3   r4   r5   r   r6   r7   r   aranger   r/   r   r8   r   r9   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)   rp   r*   r+   r.   rD   Test)   r   )rY   rZ   rv   figsizer   )g      0@g       @)rF   rG   r   )r   r2   r3   r4   r5   r   r6   r7   r   r8   r   rv   r   rk   s      r<   test_plot_xy_figsize_and_titlez1TestDataFramePlots.test_plot_xy_figsize_and_titleJ  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   rr   rg   logyyaxis)logxr   loglog)r   r   )r   r2   r   r8   r   
get_yscale
get_xscale)r:   	input_logexpected_logr;   rl   s        r<   test_logscalesz!TestDataFramePlots.test_logscalesX  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   rr   rg   z	keyword 'z*' should be bool, None, or 'sym', not 'sm'r[   smzPiePlot ignores the 'z	' keywordrB   T )r   r2   r   r^   r_   
ValueErrorr8   tmassert_produces_warningUserWarningr   )r:   r  r;   rc   s       r<   test_invalid_logscalez(TestDataFramePlots.test_invalid_logscalek  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      rR   )r   r2   r3   r4   r5   r   r6   r7   r   r8   r   
isinstance	get_xdatar	   r   r:   r;   rl   liness       r<   test_xcompatzTestDataFramePlots.test_xcompatx  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  rR   )r   r2   r3   r4   r5   r   r6   r7   r   r   plot_paramsr8   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   r2   r3   r4   r5   r   r6   r7   r   r   r  r8   r   r  r  r	   r  r  FutureWarningr:   r;   rl   r  rc   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  rR   )r   r2   r3   r4   r5   r   r6   r7   r   r   r  user8   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[   rR   )r   r2   r3   r4   r5   r   r6   r7   r   r8   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"     rD      r   r   r0   r/   r   r   )
r   r2   r3   r4   r   r   r8   r   r   axhliner9   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 )NrZ   rr   c   rM   r'   )r0   r(   r   rD   )r(   r   F)check_index_type)r   r2   r   r   int64r8   r   
get_xydatar
   r  assert_series_equalrZ   )r:   r%  r;   rl   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;                 ?       @      @)r0  r/  r2  r1  rg   r/  r0  r2  g      @g      @g      @r1  c                 d   |                                 }|                                \  }}|                                }|t          j        |d                                         d                   k    sJ |t          j        |d                                         d                   k    sJ d S )Nr   )r8   get_xlimr   r2   nanminget_datananmaxr:   r;   rl   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@)rZ   r   r   rZ   rX   r   )r   r8   r4  r   r2   r5  r6  r7  r8  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   rY   rZ   r   fourr"  z+Log-y scales are not supported in area plotr[   Tr   r   )r   r2   r3   r4   r6   ri   rj   r^   r_   r  r8   arearb   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   rD   )r2   zerosr   r6  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>   kindrB  multrD   rM   c                 .   |t          t          j                            d                              d          g d          z  }t	          |j        |d          }t	          |j        |d          }|                     |j        |j                   d S )Nr"   r?  wrY   rZ   r   r   FrN  stackedTr   r2   r3   r4   r   r8   rM  r  )r:   rN  rO  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   rQ  FrS  TrU  )r:   rN  sep_dfrV  rW  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   rQ  r"  FrT  zWhen stacked is True, each column must be either all positive or all negative. Column 'w' contains both positive and negative valuesr[   T)r   r2   r3   r4   r5   r6   ri   rj   r   r8   r^   r_   r  )r:   mixed_dfrc   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?  rQ  r   rD   T)rN  r   rT  )r   r2   r3   r4   r   r0   r   r8   )r:   rN  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 )NrD   r"   rW   r   r   rg   r   r   r'   )rW   r"   rD   )FFTF)FTFF)r2   r   r   r   r8   r  	get_ydatar   float64r  rF  deletedatamask)	r:   rc  values1values2r;   rl   masked1masked2exps	            r<   test_line_area_nan_dfz(TestDataFramePlots.test_line_area_nan_df3  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 )NrD   r"   rW   re  rg   rD   r"   r   rW   r'   rW   r   r"   rD   Tr]  r   )r2   r   r   r   rg  r   r8   r  rF  r  rf  )r:   rc  rk  rl  r;   	expected1	expected2rl   s           r<   test_line_area_nan_df_stackedz0TestDataFramePlots.test_line_area_nan_df_stackedH  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>   rT  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 )NrD   r"   rW   re  rg   rr  r'   rs  r   Fr]  )r2   r   r   r   rg  r   r8   rB  r  rF  r  rf  )	r:   rc  rn   rk  rl  r;   rt  ru  rl   s	            r<   "test_line_area_nan_df_stacked_areaz5TestDataFramePlots.test_line_area_nan_df_stacked_areaW  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   rW   r   r   r   rM   r  )r   r2   r3   r4   r8   r4  r   r6  )r:   rn   r;   rl   r9  r:  r  s          r<   test_line_limz TestDataFramePlots.test_line_limn  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)ry  rB   rW   r|   rE   left_axright_axr   rM   )
r   r2   r3   r4   r8   r   hasattrr4  r   r6  )r:   r;   rJ   rl   r9  r:  r  s          r<   test_line_lim_subplotsz)TestDataFramePlots.test_line_lim_subplotsw  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.)strictrU   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?  r@  r   r]  r   rM   )r   r2   r3   r4   r   r8   rB  r4  get_ylimr   r6  )
r:   rT  r;   neg_dfrl   r9  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"   rY   rZ   r   rD   T)shareyrB  )rl   rN  )
r   r2   r3   r4   r   r   rB   r8   r   joined)r:   r;   figrV  rW  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"   rp   rp   )rT  	linewidth)	r   r2   r3   r4   r5   r8   r   patchesget_linewidth)r:   rT  r;   rl   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  rB   rp   )rp   rD   rE   )
r   r2   r3   r4   r5   r8   r   r   r  r  )r:   r;   rJ   rl   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  ?)rT  width)
r   r2   r3   r4   r5   r   r8   r  r   r/   )r:   methdimrT  r;   r  rl   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  rB   )r   r2   r3   r4   r5   r   r8   r  )r:   r  r  r;   r  rJ   rl   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  FrD   )rT  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)rM   c                 6    g | ]}|                                 S r  r  r  s     r<   r  zBTestDataFramePlots.test_bar_bottom_left_bottom.<locals>.<listcomp>       444!''))444r>   rp   )r   r2   r3   r4   r8   r   r  r:   r;   rl   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rD   rD   rD   rD   rD   )rT  leftc                 6    g | ]}|                                 S r  get_xr  s     r<   r  z@TestDataFramePlots.test_bar_bottom_left_left.<locals>.<listcomp>  r  r>   rD   r  Tr   c                 6    g | ]}|                                 S r  r  r  s     r<   r  z@TestDataFramePlots.test_bar_bottom_left_left.<locals>.<listcomp>  r  r>   rp   )r   r2   r3   r4   r8   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  TrM   )rB   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>   rp   r  )rB   r  c                 6    g | ]}|                                 S r  r  r  s     r<   r  zDTestDataFramePlots.test_bar_bottom_left_subplots.<locals>.<listcomp>  r  r>   rD   )	r   r2   r3   r4   r8   r   r  r  r   )r:   r;   rJ   rl   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$      rp   r$   r  r   r   r*   r   	r$   r   r  rp   r$   r  rD   r"   rW   c                 6    g | ]}|                                 S r  r  r  s     r<   r  z3TestDataFramePlots.test_bar_nan.<locals>.<listcomp>       555Q!,,..555r>   r   r2   r   r8   r   r  r:   r;   rl   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>   )	r/  r/  r/        $@r/  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   rp   ABCDEFabcder"  )r   rD   r"   rW   r%   rp   )g      g      @r   g      пrM   g@Tr]  g      @)r   r2   r3   r4   r5   r6   r8   r   r   get_ticklocsr  rF  r   r4  r  r  )r:   rc  r;   rl   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rD   r"   c                    t          t          j                            d                              d          t          t          j        d d                   g d          }t          |j	        j
        ||           d S )Nr"   r?  r   r@  r"  rX   )r   r2   r3   r4   r5   r6   ri   rj   r   r8   r   r:   rY   rZ   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   r@  r"  z5scatter() missing 1 required positional argument: 'y'r[   rY   r   z5scatter() missing 1 required positional argument: 'x'rZ   r   )r   r2   r3   r4   r5   r6   ri   rj   reescaper^   r_   	TypeErrorr8   r   rb   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   r@  r"  rY   rZ   r   T)rY   rZ   rN  rB   rD   r   rE   )
r   r2   r3   r4   r5   r6   ri   rj   r8   r   rI   s      r<   test_plot_scatter_shapez*TestDataFramePlots.test_plot_scatter_shape5  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   )rN  rY   rZ   )r   r2   r3   r4   r5   r   timer^   r_   r  r8   rb   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   rD   c                 &   t          t          ddd          dd          }t          j                            d                              ddt          |                    }t          ||d          }t          |j	        j
        ||	           d S )
Ni  rD      W)r  r,   r-   r"   r   r  rX   )r   r   r2   r3   r4   normalr   r   r   r8   r   )r:   rY   rZ   r   r  r;   s         r<   test_scatterplot_datetime_dataz1TestDataFramePlots.test_scatterplot_datetime_dataH  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)marksre  b_colr"   rW   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  re  rX   )r   r   r   r8   r   )r:   r  rY   rZ   r  r;   s         r<   test_scatterplot_object_dataz/TestDataFramePlots.test_scatterplot_object_dataQ  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@r2  g      @g	@g@g@lengthr  r   )r  r  r  r  r  )r  r  speciesr   rD   rY   rZ   r   )      ?g      ?g      @r.  c                 6    g | ]}|                                 S r  get_text)r  is     r<   r  zLTestDataFramePlots.test_scatterplot_color_by_categorical.<locals>.<listcomp>y  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>z  s*      TTda16TTTTTTr>   )r   r   Categoricalr8   r   collectionscolorbarr2   r   	get_ticksr  rF  _boundariesrl   get_ymajorticklabelsallr   )r:   r  r  r;   rl   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>   )rX   )rZ   rY   )rZ   rZ   c                     t          g dt          j        g d          d          }t          |j        j        ||           d S )Nr   )r   r   r   r   rX   )r   r   r  r   r8   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   rD   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   rr   r?  lowhighsizer   r@  r"  r  Greysr   )r   r2   r3   r4   r   r6   ri   rj   r8   r   r  cmapr   r  rl   
get_ylabel)r:   rY   rZ   r   r;   rl   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   rr   r?  r  r   r@  r"  	cubehelixrY   rZ   r   )rY   rZ   r   colormapF)rY   rZ   r   r  rD   redr  r  
facecolors)r   r2   r3   r4   r   r6   ri   rj   r8   r   r  r#  r   r  r   )r:   r;   cmrl   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 )NrD   r"   rW   r%   r   )r0  r/  r/  r0  )r/  r0  r/  r0  r   r*   r  r   r/  r0  spring)rY   rZ   r   r#  )	r   r2   r   r8   r   r  rF  r  get_facecolor)r:   r;   red_rgba
green_rgba
rgba_arrayrl   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"   rf   rr   r   r   r   r   r   )rY   rZ   r   r   )right)r   r2   r3   r4   r8   r   r  rF  valuesr  	get_sizesrk   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"   rf   rr   r   r   r   r   r   )rY   rZ   r   normr   )r   r2   r3   r4   r   colorsLogNormr8   r   r  r<  )r:   r;   r<  rl   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"   rf   rr   r   r   r   r   r   r  r   )r   r2   r3   r4   r8   r   r  r<  r   minmaxr   r=  	Normalize)r:   r;   rl   	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>   legendr@   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threerA  r"  )r   r2   r3   r4   r5   r6   ri   rj   r   r8   r   ry   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$   rQ  r"  )r   r2   r3   r4   r5   r6   ri   rj   r   r   r8   r   r9   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   rD   re  Z   rR   #   r$   rotfontsizerS   
xlabelsize
ylabelsize)r   r   r8   r   r   rk   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   rD   re  )yrot7      rV  )r^  r[  rZ  )r   r   r8   r  r   rk   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>   rD   r   )_get_numeric_datar/   r   r8   boxr   r   r  rF  r   r  r2   r   r   r  r:   hist_dfr;   numeric_colslabelsrl   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(   rW  r   rS   r^  )r8   rg  r   r   )r:   ri  r;   seriesrJ   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)rD   r   r   )	positionsc                 ,    g | ]}t          |          S r  r   rd  s     r<   r  zDTestDataFramePlots.test_boxplot_series_positions.<locals>.<listcomp>   re  r>   r   )r2   r   r8   rg  rf  r/   r   r   r  rF  r   r  r   r  )r:   ri  r;   ru  rl   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>   c                 L   |}|                                 j        }d |D             }|j                            ddd          }t	          |ddd           t          |                                |           t          |j                  dt          |          z  k    sJ d S )	Nc                 ,    g | ]}t          |          S r  r   rd  s     r<   r  z<TestDataFramePlots.test_boxplot_vertical.<locals>.<listcomp>(  re  r>   2   r   F)rW  rX  vertr   rS   r^  r[  r   )	rf  r/   r8   rg  r   r   get_yticklabelsr   r  rh  s         r<   test_boxplot_verticalz(TestDataFramePlots.test_boxplot_vertical%  s    ++--588<888 W[[R!%[882AB1====2--//88828}}C$5$5 5555555r>   zignore:Attempt:UserWarningc                 |   |}|                                 j        }d |D             }t          |j        j        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   rd  s     r<   r  zETestDataFramePlots.test_boxplot_vertical_subplots.<locals>.<listcomp>4  re  r>   TF)rA   rB   r{  r   rW   )rD   rW   rE   r   r   r   )rf  r/   r   r8   rg  r   r   r   r   r}  r   r  )r:   ri  r;   rj  rk  rJ   rl   r   s           r<   test_boxplot_vertical_subplotsz1TestDataFramePlots.test_boxplot_vertical_subplots0  s    ++--588<888 GK
 
 
 	$6::::U++++T6** 	& 	&IBr1133eW===rx==A%%%%%	& 	&r>   c                    |}|                                 j        }d |D             }t          j        g d          }|j                            |d          }t          |                                |           t          j	        |j
                                        |           t          |j                  dt          |          z  k    sJ d S )Nc                 ,    g | ]}t          |          S r  r   rd  s     r<   r  zFTestDataFramePlots.test_boxplot_vertical_positions.<locals>.<listcomp>E  re  r>   )rW   r"   r   F)ru  r{  r   )rf  r/   r2   r   r8   rg  r   r}  r  rF  r   r  r   r  )r:   ri  r;   rj  rk  ru  rl   s          r<   test_boxplot_vertical_positionsz2TestDataFramePlots.test_boxplot_vertical_positionsB  s    ++--588<888HYYY''	W[[95[99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   rK  r"  z2return_type must be {None, 'axes', 'dict', 'both'}r[   
not_a_typereturn_type)r   r2   r3   r4   r5   r6   ri   rj   r^   r_   r  r8   rg  rb   s      r<    test_boxplot_return_type_invalidz3TestDataFramePlots.test_boxplot_return_type_invalidL  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  )dictrJ   bothc                 "   t          t          j                            d                              d          t          t          j        d d                   g d          }|j        	                    |          }t          ||           d S )Nr"   r?  r   rK  r"  r  )r   r2   r3   r4   r5   r6   ri   rj   r8   rg  r   )r:   r  r;   r   s       r<   %test_boxplot_return_type_invalid_typez8TestDataFramePlots.test_boxplot_return_type_invalid_typeV  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"   rr   r%   kderN  c                 ,    g | ]}t          |          S r  r   rd  s     r<   r  z2TestDataFramePlots.test_kde_df.<locals>.<listcomp>d      888LOO888r>   rk  r   rR   )r^   importorskipr   r2   r3   r4   r5   r   r8   r/   r   r   )r:   r;   rl   r  s       r<   test_kde_dfzTestDataFramePlots.test_kde_df`  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  rp   )rN  rW  rX  rY  )	r^   r  r   r2   r3   r4   r5   r8   r   rk   s      r<   test_kde_df_rotz"TestDataFramePlots.test_kde_df_roth  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  )rA   rN  rB   r%   rC   rE   )
r^   r  r   r2   r3   r4   r5   r   r8   r   rI   s      r<   test_kde_df_subplotsz'TestDataFramePlots.test_kde_df_subplotsn  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)rN  r   rB   r   r   )	r^   r  r   r2   r3   r4   r5   r8   r   rI   s      r<   test_kde_df_logyz#TestDataFramePlots.test_kde_df_logyy  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   r2   r3   r4   uniformr   locr   r8   r9   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   rd  s     r<   r  z3TestDataFramePlots.test_hist_df.<locals>.<listcomp>  r  r>   r  T)rA   rB   r   r%   rC   rE   r   r   )r   r2   r3   r4   r5   r   r8   r   r/   r   r   r   )r:   r;   rl   r  rJ   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
   r2   r3   r4   r8   r   r   )r:   rr  rJ   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  rY   r  s     r<   r  zMTestDataFramePlots.test_hist_df_series_cumulative_density.<locals>.<listcomp>  (    JJJqAy1I1IJJJJr>   rM   r0  matplotlib.patchesr  r
   r2   r3   r4   r8   r   get_childrenr  assert_almost_equalr  r:   rr  rl   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#   rz  r   
horizontal)rW  rX  orientationr   r|  )r   r2   r3   r4   r5   r8   r   r   rI   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皙?)rr   )shape)rr   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"   rr   r   )rN  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   r2   r3   r4   r5   r   r8   r  r  r  )r:   r  r;   rV  rW  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)r2   r   r  rF  )
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>   ri  r   r$   	   r   r   r   r   r   r   r   r   r   r   r   r  r$   r  r"   rW   rp   )rW   r$   r  r   r   r   )r   rW   r   r   r   r   )r   r   r   rW   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 )Nrp   )r  )r   r   r   r   r   r  )r  r  r$   r  r  T)r  rT  )      r   rQ     )r  rT  rB   r   rD   r"   r  )r  r  )r  r  )r  rT  r  )r  rT  rB   r  )r   r8   r   r  r  r2   r   )r:   ri  r;   rl   rJ   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rI  )r   r2   r3   r4   r5   cumsumr   r8   r9   s     r<   test_plot_int_columnsz(TestDataFramePlots.test_plot_int_columns_  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"   rf   )style)matplotlib.pyplotr   gcfclfadd_subplotr   r2   r3   r4   r5   r8   	enumerater   r   
get_marker)r:   r  pltr  r;   rl   rc  ra   s           r<   test_style_by_columnz'TestDataFramePlots.test_style_by_columnc  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 )NrD   r"   Tr  r    )r
   r8   
get_legend	get_textsr  )r:   r   rl   s      r<   test_line_label_nonez'TestDataFramePlots.test_line_label_nonew  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  )r2   r3   r4   )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   r8   rg  	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$   rD   r  r   )r2  r1  r0  testr"  r   r'   c                 B    g | ]}|                                 d          S )r   )get_positionr  rY   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   r2   r   r8   r  r  r  rF  r7   rf  r   get_ticklabelsr   is_monotonic_increasingr   r   )	r:   r0   r8  r;   rl   rq   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  rY   r   r  r^   r  r   r8   r   r:   rN  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   r6   r^   r_   r  r8   r:   rN  r;   rc   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   r2   r3   r4   r5   r7   r  r^   r_   r  r8   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   r2   r3   r4   r5   r^   r_   r  r8   rb   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 )NrD   r"   rW   r%   rp   r   r  x must be a label or positionr[   rY   rZ   r   r   r^   r_   r  r8   )r:   rY   rZ   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 )NrD   r"   rW   r%   rp   r   r  z.label should be list-like and same length as yr[   r   r*   r   	bad_labelr2  r3  rb   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)rD   rW   rp   )r"   r%   r   AABr   r1  r[   rX   )r   r6   r^   r_   r  r8   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 )NrD   r"   rW   r%   rp   r   r  r   r2  )rY   rZ   r   r  
linecolors)r   r   r8   r   r  r   r   )r:   rY   rZ   r4  r=  r;   rl   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 )NrD   r"   rW   r%   r   rX   )r   r/   r   r8   )r:   rY   rZ   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$   )rY   rZ   gridsizerD   
r   r2   r3   r4   r  r   r8   r   r   r  rk   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)rY   rZ   rB   r   rD   r   rE   )r   r2   r3   r4   r  r   r8   r   r   figurerJ   r   rI   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   )rY   rZ   r   reduce_C_functionrD   rJ  )r:   rO  r;   rl   s       r<   test_hexbin_with_cz%TestDataFramePlots.test_hexbin_with_c  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*   rX   r   r  )r   r2   r3   r4   r  r   r8   r   r  r#  r   )r:   rn   r  r;   rl   s        r<   test_hexbin_cmapz#TestDataFramePlots.test_hexbin_cmap+  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"   rp   rW   XYZr   r   r   der.   z/pie requires either y column or 'subplots=True'r[   )	r   r2   r3   r4   r^   r_   r  r8   r   rb   s      r<   test_pie_df_errz"TestDataFramePlots.test_pie_df_err>  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"   rX  rY  r]  r.   r   )
r   r2   r3   r4   r   r8   r   r   textsr0   )r:   rZ   r;   rl   s       r<   test_pie_dfzTestDataFramePlots.test_pie_dfH  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"   rX  rY  r]  r.   Tr@   )r   r2   r3   r4   r   r8   r   r   r/   r   rb  r0   r   r$  )r:   r;   rJ   rl   ylabels        r<   test_pie_df_subplotsz'TestDataFramePlots.test_pie_df_subplotsR  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"   rX  rY  r]  r.   r   )r  gr   r   mT)rA   rB   rk  r=  r*  )r   r2   r3   r4   r   r8   r   r   r/   r   rb  r   r  )r:   r;   rk  
color_argsrJ   rl   s         r<   test_pie_df_labels_colorsz,TestDataFramePlots.test_pie_df_labels_colorsc  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)rB   rl   rI  )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>   rD   r  )r   r2   r3   r4   r   r   ilocr   r   rB   r  r  r8   r   r  r6   rb  r  r  )r:   r;   r  r   rJ   rn   base_expectedrl   r  r   result_labelsexpected_labelss               r<   test_pie_df_nanz"TestDataFramePlots.test_pie_df_nanx  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   rM   rX   皙?皙?yerrr"   xerrr}  r2   r   r   onesr   r8   r   )r:   rn   r^  r;   d_errdf_errrl   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   rM   rX   r{  r|  rD   r   T)r}  r  rN  r   r"   r~  r  )r:   r^  r;   r  r  rl   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   rM   rX   rZ   r|  r}  rD   r~  )r"   r  r"   )r2   r   r   r   r8   r  r   r:   r^  r;   rl   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   rM   rX   r{  r  r"   r~  rZ   rY   )rZ   rY   r}  rD   r  )r:   r}  r^  r;   rl   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   rM   rX   r"   r`  r  )
r2   r   r   r  external_error_raisedr  r8   r3   r4   r5   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   rM   rX   zzzr  )r2   r   r   r  r  r  r8   )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)ra   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   rM   rX   r}  rN  r"   r~  r   r2   r   r   r8   r   )r:   rN  r  r;   rl   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   rM   rX   )r}  r  rN  r"   r~  r  )r:   rN  r  x_errr;   rl   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   rM   rX   r{  r|  T)rA   r}  r  rB   rN  rD   r~  )r   r2   r   r  r   r8   r   )r:   rN  r;   r  rJ   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)rU   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   rM   rX   r  r  r"   r~  )	r2   r   r   r   r8   	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~  rD   )rZ   r}  	r   r2   absr3   r4   r5   r   r8   r   r:   r;   r  rl   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"   rf   r+  r   r   r  r~  r  )r:   rN  r;   r  rl   s        r<   'test_errorbar_with_partial_columns_kindz:TestDataFramePlots.test_errorbar_with_partial_columns_kind  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"   rf   r+  r   r   1/1/2000r$   MEr+   T)inplacera   r  r~  )r   r2   r  r3   r4   r5   r   r   r   r8   r   )r:   r;   r  ixrl   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>0  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   rM   rX   r{  r|  )rY   r   r  rD   r~  r  )r:   r  r^  r;   errrl   s         r<   &test_errorbar_with_partial_columns_boxz9TestDataFramePlots.test_errorbar_with_partial_columns_box/  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   rM   rX   r{  r|  r  z1/1/2001r  )r-   rg   r  r"   r~  rZ   rY   )rZ   r}  rN  rD   T)rA   rN  r}  rB   )r2   r   r  r   r   r   r8   r   )	r:   rN  r^  r  r  tdftdf_errrl   rJ   s	            r<   test_errorbar_timeseriesz+TestDataFramePlots.test_errorbar_timeseries8  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"   )rW   r"   rp   rQ  rW   rp   )r}  r  rD   r   rM   zCAsymmetrical error bars should be provided with the shape (3, 2, 5)r[   r  )r2   r3   r4   r   r   reshapeTr8   r  	get_pathsverticesr   r  r  r  r  r^   r_   r  )r:   r  r;   rl   yerr_0_0expected_0_0rc   s          r<   test_errorbar_asymmetricalz-TestDataFramePlots.test_errorbar_asymmetricalZ  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"   rf   r$   rg   T)tabler   rD   )r   r2   r3   r4   r6   ri   rj   r   r8   r  r  r   tablesr   r  r  rk   s      r<   
test_tablezTestDataFramePlots.test_tablel  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"   )rp   r"   rp   rY   rZ   r"  rX   r   r~  )rY   rZ   r  rD   )rY   rZ   r}  )rY   rZ   r  r}  )r   r2   r  r3   r4   r5   r   r   r8   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  rY   rl   s     r<   r  zaTestDataFramePlots.test_errorbar_scatter_color.<locals>._check_errorbar_color.<locals>.<listcomp>  s%    AAAqQ".-@-@-@-@-@r>   rB  )	next
containersr   extendappendr   r2   r   r   )r  r  r  r  errsel	err_linesrl   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$   rp   r]  r   r   r   r^  r_  r)  )rY   rZ   r  r}  r   rD   r~  )r  has_yerrr?  )rY   rZ   r}  r  r   )r  )
r   r2   r  r3   r4   r5   r8   r   r   r  )r:   r  r;   rl   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%   re  z'unknown' is not ar[   r   r   unknownr   )rY   rZ   r(  rN  )r   r^   r_   r  KeyErrorr8   r9   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  rD   r"   rW   r%   rp   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 )	NrD   Tr}   r   r"   Fr   rW   )r   r  r   r}  r   rJ   rl   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   rv   T)rY   rZ   rv   rl   sharex)rB   rl   r  )r  r   close_generate_4_axes_via_gridspecr   r8   tight_layoutr  r  r  r  r:   r  gsrJ   r;   r  rl   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   rv   )rY   rZ   rv   rl   rD   Tr}   r   r  r   r   r  r8   r  r  r   r  r   r}  r   r:   r  r;   r  rJ   rl   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 )	NrD   Tr}   r   r   r"   rW   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   rv   T)rY   rZ   rv   rl   r  r  )rB   rl   r  )r  r   r  r   r8   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_tight  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*   rX   rB  r#   r&   r'   r)   r$   r+   r.   rN  r  Nr  )r^   r  r   r2   r3   r4   r  r   r5   r   r6   r7   r   r  weakrefrefr8   r  r  gccollect)r:   rN  argsr;   r  s        r<   test_memory_leakz#TestDataFramePlots.test_memory_leak3  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,   rg   r+  ABr"  c                                           dd          }                                 }|                    | d dd d f                   }|                    | dd d f                   }||fS )NrW   rD   r"   GridSpecrM  r  r  r  rV  rW  r  r  s       r<   _get_vertical_gridzSTestDataFramePlots.test_df_gridspec_patterns_vert_horiz.<locals>._get_vertical_gridh  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 )NrD   rW   r"   r  r  s       r<   _get_horizontal_gridzUTestDataFramePlots.test_df_gridspec_patterns_vert_horiz.<locals>._get_horizontal_grido  sl    ""1a((B**,,C//"QQQU),,C//"QQQT(++C8Or>   rl   rD   Tr}   r   r  r   rB   rl   r  r  Fr   r  r  r   r
   r2   r3   r4   r5   r   r   r0   r6   r8   r   r  r   r}  r   r  r  r  r  )r:   tsr;   r  r  rV  rW  rl   rJ   r  r  s            @@r<   $test_df_gridspec_patterns_vert_horizz7TestDataFramePlots.test_df_gridspec_patterns_vert_horizX  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  rg   c                  X                        dd          }                                 }|                    | d dd df                   }|                    | d ddf                   }|                    | dd df                   }|                    | d                   }||||fS )NrW   r"   rN   r  )r  r  rV  rW  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   rD   r}   r   r  r  rW   Fr  )r:   r  r  rJ   r;   rl   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  re  r   r   rX   )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   rB   add_axesr
   r2   r3   r4   r8   )r:   r  rl   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   re  )r   r   rD   rD   r   r   r   hsv)rN  rl   rY   rZ   r   r#  )
r   r2   r3   r4   r5   r   r   rM  r  r8   )r:   r;   r  rl   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_locatabler7  z5%g?)r!  padr"   r$   r  )r   r   rB   mpl_toolkits.axes_grid1r  append_axesr
   r2   r3   r4   r8   )r:   r  rl   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%r0  rW   )r  rn  r  r"   r$   r  )
r   r   rB   %mpl_toolkits.axes_grid1.inset_locatorr$  r
   r2   r3   r4   r8   )r:   r  rl   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)ra   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"   )rQ  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>	  s     r>   )r   r  r   r   T)ry  rX  
mark_right)rJ   r[  r  )r   r2   r3   r4   r5   r6   assignr   r8   r   r  )r:   r(  r;   rX  rL  rn   rl   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)rW   r"   rW   )r  *      )MondayTuesday	Wednesday)salesvisitsdayr9  r   rM   rW   c                 6    g | ]}|                                 S r  r  r  ts     r<   r  zATestDataFramePlots.test_x_string_values_ticks.<locals>.<listcomp>,	       BBBqzz||BBBr>   r4  r/  r5  r0  r6  r1  )r   r8   rB  set_xlimr   r  r   
get_xticks)r:   r;   rl   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  rD   r"   r  r   r*   r.   rM   r%   c                 6    g | ]}|                                 S r  r  r;  s     r<   r  zETestDataFramePlots.test_x_multiindex_values_ticks.<locals>.<listcomp>>	  r=  r>   z	(2012, 1)r/  z	(2012, 2)r0  z	(2013, 1)r1  z	(2013, 2)r2  )r   from_productr   r2   r3   r4   r5   r8   r>  r   r  r   r?  )r:   r0   r;   rl   r@  rA  s         r<   test_x_multiindex_values_ticksz1TestDataFramePlots.test_x_multiindex_values_ticks3	  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%   rD   rg   r  r   )r   r8   r4  )r:   rN  r;   rl   xlimss        r<   test_xlim_plot_linez&TestDataFramePlots.test_xlim_plot_lineF	  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  )rO  rO  i@  i  )rD   rW   r%   rW   )s1s2s3ry  rg   )rP  rQ  rR  F)rl   rT  ry  T)rl   ry  r   rD   rW   c                 6    g | ]}|                                 S r  r  r;  s     r<   r  zWTestDataFramePlots.test_xlim_plot_line_correctly_in_mixed_plot_type.<locals>.<listcomp>g	  r=  r>   )r   r   rB   r   r8   r   r4  r   )r:   r  rl   indexesr;   rH  r@  s          r<   0test_xlim_plot_line_correctly_in_mixed_plot_typezCTestDataFramePlots.test_xlim_plot_line_correctly_in_mixed_plot_typeP	  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)r/   r(   rD   r   )r   intemptyr8   r   r   r  rf  )r:   r;   rl   ra   s       r<   test_plot_no_rowsz$TestDataFramePlots.test_plot_no_rowsj	  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  r8   r9   s     r<   test_plot_no_numeric_dataz,TestDataFramePlots.test_plot_no_numeric_datat	  s    '']9,EFFF 	 	GGIII	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   AAA)ra   r   r  r   r  r  rB  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$   rD   r]  )r   r_  )r   r^  rB   rN  rW   r   r_  r   r^  r   r   r  ra   )
r^   r  r2   r   r   r8   r   r   r   r  )r:   rN  r^  r;   rJ   rx  rl   rk  s           r<   test_group_subplotz%TestDataFramePlots.test_group_subploty	  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 )NrD   z!An iterable subplots for a Seriesr[   r   rB   )r
   r   r^   r_   NotImplementedErrorr8   )r:   serrc   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[   rb  )	r   r2   eyer   r   r^   r_   rc  r8   rb   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[   ra  rb  )r   r2   rg  r^   r_   rc  r8   rb   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))rD   rl  )ra  rl  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$   re  r[   rb  r2   r   r   r^   r_   r  r8   )r:   rB   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          j        t
          d          5  |                    dg           d d d            d S # 1 swxY w Y   d S )Nr$   re  z Column label\(s\) \['bad_name'\]r[   )r   bad_namerb  rn  r  s      r<   &test_group_subplot_invalid_column_namez9TestDataFramePlots.test_group_subplot_invalid_column_name	  s    )B--bimm44q\\]:-PQQQ 	2 	2GG/0G111	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2 	2s   A99A= A=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[   re  )r   r   rb  rn  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)rg  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$   re  z1When subplots is an iterable, kind must be one ofr[   r^  rn  )r:   rN  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)oldry  rx  )Nr  r  )Nr  rD   r  )ra   rB  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 )
NrD   r"   rp   Type AType Br   r  r  )rN  re  xlabel)r   r0   r   r8   
get_xlabelr$  str)r:   rN  
index_name	old_label	new_labelr;   rl   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|  rD   r"   rp   r   )rN  rY   rZ   r}  re  )r   r8   r~  r$  )r:   rN  r}  re  xcolycolr;   rl   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   rr   r'  )ry  re  rs   ro   )	r   r8   rM  rJ   r   get_visibler$  r  
get_yticks)r:   ry  ax_dfrl   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   r2   r3   r4   r5   r   r6   r7   r   r  r  r8   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=   rK   rO   rT   xfailrd   rm   parametrizerz   r   r   r   r   r   r   r6   r   r   r   r   r   r   r   r   r   r   r	  r  r  r  r  r  r$  r2   r)  rg  r-  r   r   r;  r=  rC  rM  rX  r[  r_  rb  r   r   rp  rv  rx  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-  r5  r:  r?  rH  rO  rR  r\  ra  rl  rs  rw  r~  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  _common_kindsr"  r$  r)  r,  r/  r5  r8  r;  rD  rG  rK  rN  stdrR  rV  r`  rc  rf  rk  ry  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'  r0  rB  rF  rI  rU  rZ  r\  r_  re  rh  rj  rp  rs  ru  rw  r  r  r  r  r  r>   r<   r    r    6   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	6 	6 	6 [ <==& & >=&"6 6 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*( ( (' ' '' ' ' [ 	
 	
 	
 ' ' '2 2 2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  )rD   r   r  r   )r  r   r   r  r   subplot)r  r  ax_tlax_llax_trax_lrs         r<   r  r  
  s    ######			q!	$	$BKK4!!EKK4!!EKK4!!EKK4!!EueU+++r>   )4__doc__r   r   r  r  r  ri   r  numpyr2   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.io.formats.printingr   r  r   r  r    r  r  r>   r<   <module>r     sO   % %        
			     				        ) ) ) ) ) ) ) ) ) / / / / / /    
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                     4 3 3 3 3 3f,''f-..^' ^' ^' ^' ^' ^' ^' ^'BO	, 	, 	, 	, 	,r>   