
    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 Z3y)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                  j                  d      ej                  j
                  d               Zej                  j
                  d        Zej                  j
                  ej                  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                  j                  dddg      d               Zej                  j
                  d        Zej                  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                  j                  d$g d%      d&               Zej                  j
                  ej                  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                  j                  d8d9d:g      d;        Zej                  j                  d<g d=      d>        Z d? Z!d@ Z"dA Z#dB Z$dC Z%dD Z&ej                  j                  dEe'jP                  e'jR                  g      dF        Z*ej                  j                  dG e+d,g dHig dIJ       e+d,dKdLe'jX                  dMdNdOdPgidLdKdMdQe'jX                  dMdQgJ      g      dR        Z-dS Z.dT Z/dU Z0ej                  j                  dVd(dWg      ej                  j                  dXdYdZg      d[               Z1ej                  j                  dVd(dWg      d\        Z2d] Z3ej                  j                  dVd(dWg      d^        Z4ej                  j                  d_ e5d`       e6dad!d`b      g      dc        Z7ej                  j                  d_ e5d`       e6dad!d`b      g      dd        Z8ej                  j                  d_ e5d`       e6dad!d`b      g      ej                  j                  d	i dedfig      dg               Z9ej                  j                  d	i dhdig      di        Z:dj Z;ej                  j                  dfdkl      ej                  j                  deddfg      dm               Z<dn Z=ej                  j                  deddfg      do        Z>dp Z?ej                  j                  dqdrdsg      ej                  j                  deddfg      dt               Z@ej                  j                  dqdrdsg      du        ZAdv ZBdw ZCdx ZDdy ZEdz ZFej                  j                  d_eGeHj                  g      d{        ZJej                  j                  d|d/d}g      d~        ZKd ZLd ZMd ZNej                  j                  d|ddg      d        ZOej                  j                  ddf ej                  d eQj                  d            g      ej                  j                  d|ddg      ej                  j                  dg dg dg      d                      ZSej                  j                  dddfg      ej                  j                  dg dg df      d               ZTej                  j                  d|g d      d        ZUej                  j                  dddg      d        ZVd ZWd ZXd ZYd ZZd Z[ej                  j
                  ej                  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                  j                  d      d        Zed Zfd Zgej                  j                  dg d      d        Zhd Zid Zjd Zkd Zld Zmd Znd Zod Zpd Zqd Zrej                  j                  dd e'j                  d      z  d e'j                  d      z  g      d        Zt	 	 	 	 dVdZuej                  j                  d e'j                   e'j                  g d       e'j                  g d             e'j                   e'j                  g d       e'j                  g d¢             e'j                   e'j                  g d       e'j                  g dâ            dĜ e'j                   e'j                  e'jX                  dYddd`dg       e'j                  g dȢ             e'j                   e'j                  dYe'jX                  ddd`dg       e'j                  g dɢ             e'j                   e'j                  dYdde'jX                  d`dg       e'j                  g dʢ            dĜg      d˄        Zxd̄ Zyej                  j                  ddddddddg dѢddgg      d҄        Zzdӄ Z{ej                  j                  dg dբ      dք        Z|dׄ Z}ej                  j                  dVe~j                  j                         d؄        Zej                  j                  dVd-d0g      dل        Zej                  j                  dVe~j                  j                         dڄ        Zej                  j                  dV ee~j                  j                         dWgz         dۄ        Zd܄ Zej                  j                  ddd gddfdgdd gddgfg      d        Zd Zej                  j                  dddgdfg      d        Zej                  j                  dddgdgdgfddd gddgddgfddYdgddgddgfg      d        Zej                  j                  dddYddgfdYdddYgfg      d        Zd Zd Zej                  j                  dde'j                  g      d        Zej                  j                  di dfddidfddidfg      d        Zd Zej                  j                  d,ddg      d        Zd Zd  Zd Zej                  j
                  ej                  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                  j                  ddd	g      d
               Zej                  j
                  d        Zej                  j
                  d        Zej                  j
                  ej                  j                  dVg d      ej                  j                  d e e'j                  d      dz  d.       e+ e'j                  d      dz   e'j                  d      dz  d/      g      d                      Zej                  j
                  ej                  j                  dVg d      ej                  j                  d e+ e'j                  d      dz   e'j                  d      dz  d/       e+ e'j                  d      dz   e'j                  d      dz  d/      f e e'j                  d      dz  d.       e e'j                  d      dz  d.      fdg      d                      Zej                  j
                  ej                  j                  dVg d      d               Zej                  j                  de      d        Zd Zej                  j
                  ej                  j                  dVd(d)g      d               Zej                  j
                  d        Zej                  j
                  ej                  j                  dd e+g      d                Zej                  j                  dVg d      d!        Zd" Zd# Zd$ Zd% Zd& Zd' Zd( Zd) Zd* Zej                  j                  dVe~j                  j^                        d+        Zd, Zd- Zd. Zd/ Zd0 Zd1 Zd2 Zej                  j                  d3g d4      d5        Zd6 Zd7 Zej                  j                  dVd(dWg      d8        Zd9 Zd: Zd; Zej                  j                  dVd<      d=        Zd> Zd? Zd@ Zej                  j                  dAg dB      dC        ZÐdD ZĐdE Zej                  j                  dVdF      dG        Zej                  j                  dHdIdJdKdLddMdYdgfg      ej                  j                  dVg dN      dO               Zej                  j                  dPg dQ      ej                  j                  dVd-d0g      dR               Zej                  j                  dhdS      dT        Zej                  j
                  dU        Zy(W  TestDataFramePlotsc           	          t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        |j                  d
       y )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     c/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/pandas/tests/plotting/frame/test_frame.py	test_plotzTestDataFramePlots.test_plot7   sS    II!!!$44W=$v,f5\2C@

 	"''.    c           	         t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        |j                  d
d
      }t        |dd       y )Nr!   r"   r%   r&   r(   r#   r)   r*   r-   Tdefault_axessubplotsr$   r$      axes_numlayoutr   r1   r2   r3   r4   r   r5   r6   r   r   r7   r   r9   r:   axess      r;   test_plot_subplotsz%TestDataFramePlots.test_plot_subplots@   sc    II!!!$44W=$v,f5\2C@
 !tdK$6:r=   c           	         t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        |j                  d
d
d      }t        |dd       y )Nr!   r"   r%   r&   r(   r#   r)   r*   r-   T)r!   )r@   rA   rF   r$   r!   r!   rD   rG   rH   s      r;   "test_plot_subplots_negative_layoutz5TestDataFramePlots.test_plot_subplots_negative_layoutK   sm    II!!!$44W=$v,f5\2C@

 !GG	
 	$6:r=   c           	      (   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        |j                  d
d
d      }t        |d       t        |dd       y )Nr!   r"   r%   r&   r(   r#   r)   r*   r-   TF)r@   rA   	use_indexr   xrotr$   rB   rD   )r   r1   r2   r3   r4   r   r5   r6   r   r   r7   r   r   rH   s      r;   test_plot_subplots_use_indexz/TestDataFramePlots.test_plot_subplots_use_indexZ   sw    II!!!$44W=$v,f5\2C@

 !GG	
 	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                  j                  d	       d d d        y # 1 sw Y   y xY w)
NrC   r!      r$   xyz''Line2D' object has no property 'blarg'matchT)blarg)r   pytestraisesAttributeErrorr7   liner9   r:   msgs      r;   test_plot_invalid_argz(TestDataFramePlots.test_plot_invalid_argj   sU     aV1a&127]]>5 	%GGLLtL$	% 	% 	%s   AAc                     t        t        j                  j                  d      j                  d      t	        t
        j                  d d             }t        |j                  d      }t        |d       y )	Nr!   r#   rV   r#   r/   TrP   r   rQ   )
r   r1   r2   r3   r5   stringascii_lettersr   r7   r   r9   r:   axs      r;   test_plot_tick_propsz'TestDataFramePlots.test_plot_tick_propsr   sZ    II!!!$++G4v++CR01

 rww$72A&r=   kwargsyticks)rC      r#   xticks)id   )ylimxlimTblah)r@   rA   titlec                     t        t        j                  j                  d      j                  d      t	        t
        j                  d d             }t        |j                  fi | y )Nr!   re   r#   rf   	r   r1   r2   r3   r5   rh   ri   r   r7   r9   rm   r:   s      r;   test_plot_other_argsz'TestDataFramePlots.test_plot_other_args|   sS     II!!!$++G4v++CR01
 	"'',V,r=   c                    t        t        j                  j                  d      j                  d      t	        t
        j                  d d             }|j                  dd      }t        |dd	
       |d d D ]u  }t        |j                         t        |j                         d       t        |j                  d      d       t        |j                  j                         gd       w |d   fD ]a  }t        |j                         t        |j                                t        |j                  j                         g       t        |d       c y )Nr!   re   r#   rf   Trt   )rA   ru   rV   rV   rC   rD   Fvisibleminorr   rQ   )r   r1   r2   r3   r5   rh   ri   r7   r   r   xaxisget_xticklabels	get_labelr   )r9   r:   rI   rk   s       r;   test_plot_visible_axz'TestDataFramePlots.test_plot_visible_ax   s   II!!!$++G4v++CR01
 wwFw3$6:r( 	BB288$2--/?2--D-95IBHH..015A		B
 7) 	+B288$2--/0BHH..012r*		+r=   c                     t        t        j                  j                  d      j                  d      t	        t
        j                  d d             }t        |j                  d       y )Nr!   re   r#   rf   rt   ru   rw   r8   s     r;   test_plot_titlez"TestDataFramePlots.test_plot_title   sN    II!!!$++G4v++CR01
 	"''0r=   c                 0   t        t        j                  d d t        d            }t	        t
        j                  j                  d      j                  d      t        j                  |            }t        |j                  d      }t        |d       y )	Nr#   r!   re   rf   Trg   r   rQ   )ziprh   ri   ranger   r1   r2   r3   r   from_tuplesr   r7   r   )r9   tuplesr:   rk   s       r;   test_plot_multiindexz'TestDataFramePlots.test_plot_multiindex   sp    V))#2.b	:II!!!$++G4((0
 rww$72A&r=   c                    t        j                  g dddg      }t        j                  ddgddg      }t        t        j                  j                  d	      j                  d
dd      ||      }t        |j                  d       y )N))   αr   )r   rC   )   βr!   )r   rV   )   γr$   )r   ro   )   δ   )r      i0i1)names)baru   Δ)r   u   Εc0c1r!   r   r#   )   r!   r-   u   Σr   )	r   r   r   r1   r2   r3   integersr   r7   )r9   r/   r.   r:   s       r;   test_plot_multiindex_unicodez/TestDataFramePlots.test_plot_multiindex_unicode   s     &&	 ,
 (( 124,
 II!!!$--aV<

 	"''2r=   rF   N)rL   rC   c                     t        dt        j                  j                  d      j                  d      i      }t	        |j
                  j                  d|      }t        |dd       y )	NrX   r!   r#   T)rA   rF   rC   rC   rC   rD   )r   r1   r2   r3   r   r7   r   r   )r9   rF   r:   rI   s       r;   test_plot_single_column_barz.TestDataFramePlots.test_plot_single_column_bar   sO    
 RYY2215<<R@AB tFK$6:r=   c                 <   t        dt        j                  j                  d      j                  d      i      }t        j
                  j                         \  }}|j                  j                  d|      }t        |      dk(  sJ |j                  }||d   u sJ y )NrX   r!   r#   TrA   rk   rC   r   )r   r1   r2   r3   mplpyplotrA   r7   r   lenrI   )r9   r:   _rk   rI   results         r;   test_plot_passed_axz&TestDataFramePlots.test_plot_passed_ax   s     RYY2215<<R@AB

##%2ww{{DR{04yA~~a   r=   z
cols, x, yABCDEAr)   CDEc                 V   g d}t        g dg dt        j                  ddt        j                  ddgt              t        j                  |d	      j                  d
      t        j                  |dd      j                  d
      d      }t        ||   j                  ||       y )N)20082009N20112012rC   r!   rV   r$   ro   r   ro   rV   r!   r&   z%Yformati8T)r   utcr   r)   r   r   r   rW   )
r   r1   arraynanr6   pdto_datetimeviewr   r7   )r9   colsrX   rY   datesr:   s         r;   test_nullable_int_plotz)TestDataFramePlots.test_nullable_int_plot   s     7$$XXq!RVVQ2&A^^E$7<<TB^^E$DAFFtL
 	"T(--12r=   r7   )r`   r   histpiec                     t        j                  g dd      }t        |      }t        t	        |j
                  |             y )NrC   r!   rV   r$   UInt32r&   )r   r   r
   r   getattrr7   )r9   r7   arrss       r;   test_integer_array_plot_seriesz1TestDataFramePlots.test_integer_array_plot_series   s0     hh|843K'!&&$/0r=   zplot, kwargsr`   r   r   r   rY   scatterrX   rW   hexbinc                     t        j                  g dd      }t        ||d      }t        t	        |j
                  |      fi | y )Nr   r   r&   rW   )r   r   r   r   r   r7   )r9   r7   rm   r   r:   s        r;   test_integer_array_plot_dfz-TestDataFramePlots.test_integer_array_plot_df	  s;     hh|84Ss+,'"''40;F;r=   c                     t        g dg dd      }|j                         }t        |j                               dk(  sJ y )NrX   rY   zrC   r!   rV   r   r)   rC   )r   r7   r   	get_linesrj   s      r;   test_nonnumeric_excludez*TestDataFramePlots.test_nonnumeric_exclude  s5    _9=>WWY2<<>"a'''r=   c                     t        t        j                  j                  d      j	                  d      g d      }|j                  dd      }t        |j                  j                         d       y )Nr!   re   abcr.   r   r   rW   )	r   r1   r2   r3   r4   r7   r   r   r   rj   s      r;   test_implicit_labelz&TestDataFramePlots.test_implicit_label   sV    II!!!$44W=
 WWscW"288--/5r=   c                     t        t        j                  j                  d      j	                  d      ddg      }d|j
                  _        |j                  dd       |j
                  j                  dk(  sJ y )	Nr!   rM   r   r   r   NAMELABEL)rY   label)r   r1   r2   r3   r4   r/   namer7   r8   s     r;   test_donot_overwrite_index_namez2TestDataFramePlots.test_donot_overwrite_index_name'  sb    II!!!$44V<sCj
 
#W%xx}}&&&r=   c           	      v   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        |j                  d
d      |j                  d      d   j                                t        |j                  d
      |j                  d      j                                t        |j                  d
      |j                  j                                t        |j                  dd      |j                  d      j                  j                                t        |j                  d      |j                  d      j                                t        |j                  d      |j                  j                                y )Nr!   ro   r$   r%   r&   r(   ro   r)   r*   r-   r   rC   rW   r   rX   rY   )r   r1   r2   r3   r4   r   r5   r6   r   r   r7   	set_indexr)   r8   s     r;   test_plot_xyzTestDataFramePlots.test_plot_xy0  s*   II!!!$44V<$v,f5\13?

 	BGGa1G%r||C'8'='B'B'DEBGGaGL",,s"3"8"8":;BGGaGL"$$))+.BGGcSG)2<<+<+>+>+C+C+EFBGGcGNBLL$5$:$:$<=BGGcGNBDDIIK0r=   c           	      h   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        j                  d
t        |j                        d
z         |_        t        |j                  d
d      |j                  d
      d   j                                t        |j                  d
      |j                  d
      j                                t        |j                  d
      |d
   j                                y )Nr!   r   r%   r&   r(   ro   r)   r*   r-   rC   rW   r   r   )r   r1   r2   r3   r4   r   r5   r6   r   aranger   r.   r   r7   r   r8   s     r;   test_plot_xy_int_colsz(TestDataFramePlots.test_plot_xy_int_cols>  s    II!!!$44V<$v,f5\13?
 YYq#bjj/A"56
BGGa1G%r||Aq'9'>'>'@ABGGaGL",,q/"6"6"89BGGaGL"Q%**,/r=   c           	      4   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }|j                  d
ddd      }t        |j                  d       t        |d
dd       y )Nr!   r   r%   r&   r(   ro   r)   r*   r-   rC   Test)   r   )rX   rY   ru   figsizer   )g      0@g       @)rE   rF   r   )r   r1   r2   r3   r4   r   r5   r6   r   r7   r   ru   r   rj   s      r;   test_plot_xy_figsize_and_titlez1TestDataFramePlots.test_plot_xy_figsize_and_titleJ  sw    II!!!$44V<$v,f5\13?
 WWqAVWW=288V,"qMr=   zinput_log, expected_log)Tlog)symsymlogc                    t        dt        j                  d      it        j                  d            }|j                  |      }t	        ||       |j                         |k(  sJ |j                  |      }t	        ||       |j                         |k(  sJ |j                  |      }t	        |||	       |j                         |k(  sJ |j                         |k(  sJ y )
Nr   rq   rf   logyyaxis)logxr   loglog)r   r   )r   r1   r   r7   r   
get_yscale
get_xscale)r9   	input_logexpected_logr:   rk   s        r;   test_logscalesz!TestDataFramePlots.test_logscalesX  s     RYYs^,BIIcNCWW)W$<0}},...WW)W$<0}},...WWIW&<|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        d| d	}t        j                  t        |      5   |j                  j                  dd
di|di d d d        y # 1 sw Y   TxY w# 1 sw Y   y xY w)Nr   rq   rf   z	keyword 'z*' should be bool, None, or 'sym', not 'sm'rZ   smzPiePlot ignores the 'z	' keywordrA   T )r   r1   r   r]   r^   
ValueErrorr7   tmassert_produces_warningUserWarningr   )r9   r   r:   rb   s       r;   test_invalid_logscalez(TestDataFramePlots.test_invalid_logscalek  s     RYYs^,BIIcNC+&PQ]]:S1 	+BGG*{D)*	+ &k])<''3? 	>BGGKK==+t)<=	> 	>		+ 	+	> 	>s   B?!C?CCc           	      d   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }|j                  d
      }|j                         }t        |d   j                         t              rJ t        |d       y )Nr!   r"   r%   r&   r(   r#   r)   r*   r-   T)x_compatr      rQ   )r   r1   r2   r3   r4   r   r5   r6   r   r7   r   
isinstance	get_xdatar	   r   r9   r:   rk   liness       r;   test_xcompatzTestDataFramePlots.test_xcompatx  s    II!!!$44W=$v,f5\2C@

 WWdW#eAh002K@@@2B'r=   c           	         t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }d
t        j                  d<   |j                         }|j                         }t        |d   j                         t              rJ t!        |d       y )Nr!   r"   r%   r&   r(   r#   r)   r*   r-   Tzxaxis.compatr   r  rQ   )r   r1   r2   r3   r4   r   r5   r6   r   r   plot_paramsr7   r   r  r  r	   r   r  s       r;   test_xcompat_plot_paramsz+TestDataFramePlots.test_xcompat_plot_params  s    II!!!$44W=$v,f5\2C@

 04^,WWYeAh002K@@@2B'r=   c           	      *   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }d
t        j                  d<   |j                         }|j                         }t        |d   j                         t              rJ d}t!        j"                  t$        |      5  t        t        |d   j                               t              sJ 	 d d d        y # 1 sw Y   y xY w)Nr!   r"   r%   r&   r(   r#   r)   r*   r-   Fr
  r   zPeriodDtype\[B\] is deprecatedrZ   )r   r1   r2   r3   r4   r   r5   r6   r   r   r  r7   r   r  r  r	   r  r  FutureWarningr9   r:   rk   r  rb   s        r;   !test_xcompat_plot_params_x_compatz4TestDataFramePlots.test_xcompat_plot_params_x_compat  s    II!!!$44W=$v,f5\2C@

 ,1Z(WWYeAh002K@@@/''SA 	Nk%(*<*<*>?MMM	N 	N 	Ns   -D		Dc           	         t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        j                  j                  d
d      5  |j                         }|j                         }t        |d   j                         t               rJ t#        |d       d d d        y # 1 sw Y   y xY w)Nr!   r"   r%   r&   r(   r#   r)   r*   r-   r
  Tr   r  rQ   )r   r1   r2   r3   r4   r   r5   r6   r   r   r  user7   r   r  r  r	   r   r  s       r;   (test_xcompat_plot_params_context_managerz;TestDataFramePlots.test_xcompat_plot_params_context_manager  s    II!!!$44W=$v,f5\2C@
 !!%%j$7 	,BLLNE!%("4"4"6DDDr+		, 	, 	,s   ?ACC"c           	         t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }|j                         }|j                         }t        |d
   j                         t              rJ d}t        j                  t         |      5  t        t        |d
   j                               t              sJ 	 d d d        t#        |d
       y # 1 sw Y   xY w)Nr!   r"   r%   r&   r(   r#   r)   r*   r-   r   zPeriodDtype\[B\] is deprecated rZ   rQ   )r   r1   r2   r3   r4   r   r5   r6   r   r7   r   r  r  r	   r  r  r  r   r  s        r;   test_xcompat_plot_periodz+TestDataFramePlots.test_xcompat_plot_period  s    II!!!$44W=$v,f5\2C@

 WWYeAh002K@@@0''SA 	Nk%(*<*<*>?MMM	N2A&	N 	Ns   ?-DDc                    t        t        j                  j                  d      j                  d      t	        t        ddd      t        ddd            ddg      }|j                          t        j                  j                  d	
       y )Nr!   )   r!     rC      r   r   r/   r.   r   r   )
r   r1   r2   r3   r   r   r7   r   r   axhliner8   s     r;   test_period_compatz%TestDataFramePlots.test_period_compat  sn     II!!!$++G4htQ2HT1b4IJ#J
 		

Qr=   index_dtypec           
         t        dt        j                  d      it        t        j                  ddd      |      t        j                        }|j                         }|j                         d   }|j                         }t        |d d df   |d d df   t        j                  d	      }t        j                  ||j                  d
       y )NrY   rq   c   rL   r&   )r/   r'   r   rC   )r'   r   F)check_index_type)r   r1   r   r   int64r7   r   
get_xydatar
   r  assert_series_equalrY   )r9   r$  r:   rk   r  rss         r;   test_unsorted_indexz&TestDataFramePlots.test_unsorted_index  s    "))C.!		"b"-[A((

 WWYq!Bq!tHbAhbhhSA
r244%@r=   r:                 ?       @      @)r/  r.  r1  r0  rf   r.  r/  r1  g      @g      @g      @r0  c                 "   |j                         }|j                         \  }}|j                         }|t        j                  |d   j                         d         k  sJ |t        j                  |d   j                         d         k\  sJ y )Nr   )r7   get_xlimr   r1   nanminget_datananmaxr9   r:   rk   xminxmaxr  s         r;   test_unsorted_index_limsz+TestDataFramePlots.test_unsorted_index_lims  s{     WWY[[]
dryyq!2!2!4Q!78888ryyq!2!2!4Q!78888r=   c                 L   t        g dg dd      }|j                  dd      }|j                         \  }}|j                         }|t	        j
                  |d   j                         d         k  sJ |t	        j                  |d   j                         d         k\  sJ y )Nr-  )g     V@g     V@g     @W@g      W@)rY   r   r   rY   rW   r   )r   r7   r3  r   r1   r4  r5  r6  r7  s         r;   test_unsorted_index_lims_x_yz/TestDataFramePlots.test_unsorted_index_lims_x_y  s    18PQRWWscW"[[]
dryyq!2!2!4Q!78888ryyq!2!2!4Q!78888r=   c                    t        t        j                  j                  d      j                  d      t	        t
        j                  d d       g d       }d}t        j                  t        |      5  |j                  j                  d	       d d d        t        j                  t        |      5  |j                  j                  d
       d d d        y # 1 sw Y   JxY w# 1 sw Y   y xY w)Nr!   r   r$   r   rX   rY   r   fourr!  z+Log-y scales are not supported in area plotrZ   Tr   r   )r   r1   r2   r3   r5   rh   ri   r]   r^   r  r7   areara   s      r;   test_negative_logz$TestDataFramePlots.test_negative_log  s    II!!!$++F3v++BQ/0+
 

 <]]:S1 	$GGLLdL#	$]]:S1 	&GGLLL%	& 	&	$ 	$	& 	&s   5C5C'C$'C0c                    t        j                  t        |d   j                         d               }t	        ||      D ]D  \  }}||j                         d   z  }|j                         d   }t        j                  ||       F y )Nr   rC   )r1   zerosr   r5  r   r  assert_numpy_array_equal)r9   normal_linesstacked_linesbasenlslsys          r;   _compare_stacked_y_coodz*TestDataFramePlots._compare_stacked_y_cood  sv    xxLO446q9:;,6 	2FBBKKM!$$Dq!B''b1	2r=   kindrA  multrC   rL   c                 ,   |t        t        j                  j                  d      j                  d      g d      z  }t	        |j
                  |d      }t	        |j
                  |d      }| j                  |j                  |j                         y )Nr!   r>  wrX   rY   r   r   FrM  stackedTr   r1   r2   r3   r   r7   rL  r  )r9   rM  rN  r:   ax1ax2s         r;   test_line_area_stackedz)TestDataFramePlots.test_line_area_stacked  ss     III!!!$++F3=Q
 
  dEBdDA$$SYY		:r=   c                    t        t        j                  j                  d      j                  d      t        j                  j                  d      j                  d      t        j                  j                  d      j                  d       t        j                  j                  d      j                  d       d      }t	        |j
                  |d      }t	        |j
                  |d      }| j                  |j                  d d |j                  d d        | j                  |j                  dd  |j                  dd         y )Nr!   r   rP  FrR  TrT  )r9   rM  sep_dfrU  rV  s        r;   test_line_area_stacked_sep_dfz0TestDataFramePlots.test_line_area_stacked_sep_df	  s     YY**1-44Q7YY**1-44Q7ii++A.55a88ii++A.55a88	
  $F$E$$SYYr]CIIbqMB$$SYYqr]CIIabMBr=   c                 f   t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }t        |j                  d       d}t        j                  t        |	      5  |j                  d
       d d d        y # 1 sw Y   y xY w)Nr!   r>  r   rP  r!  FrS  zWhen stacked is True, each column must be either all positive or all negative. Column 'w' contains both positive and negative valuesrZ   T)r   r1   r2   r3   r4   r5   rh   ri   r   r7   r]   r^   r  )r9   mixed_dfrb   s      r;   test_line_area_stacked_mixedz/TestDataFramePlots.test_line_area_stacked_mixed  s    II!!!$44V<v++BQ/0(

 	(--7 	
 ]]:S1 	(MM$M'	( 	( 	(s   B''B0c                     t        t        j                  j                  d      j                  d      g d      }|j	                  |j
                  dz         }t        |j                  |dd       y )Nr!   r>  rP  r   rC   T)rM  r   rS  )r   r1   r2   r3   r   r/   r   r7   )r9   rM  r:   df2s       r;   #test_line_area_stacked_positive_idxz6TestDataFramePlots.test_line_area_stacked_positive_idx)  sV    II!!!$++F3=Q

 ll288a<(#((D$Gr=   idxr$   z	2023-01-1)r,   r+   c                 R   ddt         j                  dg}dt         j                  ddg}t        ||d|      }t        |j                        }|j
                  d   j                         }|j
                  d   j                         }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             y )NrC   r!   rV   r   r   rf   r   r   r&   )rV   r!   rC   )FFTF)FTFF)r1   r   r   r   r7   r  	get_ydatar   float64r  rE  deletedatamask)	r9   rb  values1values2r:   rk   masked1masked2exps	            r;   test_line_area_nan_dfz(TestDataFramePlots.test_line_area_nan_df3  s    a#bffa#W733?rww'((1+'')((1+'') hhy

3
##BIIgllA$>Dhhy

3
##BIIgllA$>D
##GLL"((;V2WX
##GLL"((;V2W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   j                         |       t        j                  |j                  d   j                         ||z          y )NrC   r!   rV   rd  rf   rC   r!   r   rV   r&   rV   r   r!   rC   Tr\  r   )r1   r   r   r   rf  r   r7   r  rE  r  re  )r9   rb  rj  rk  r:   	expected1	expected2rk   s           r;   test_line_area_nan_df_stackedz0TestDataFramePlots.test_line_area_nan_df_stackedH  s     a#bffa#W733?HH\<	HH\<	rww5
##BHHQK$9$9$;YG
##BHHQK$9$9$;Y=RSr=   rS  Fc                    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	   j                         |       |r2t        j                  |j                  d   j                         |       n4t        j                  |j                  d   j                         ||z          t        |j                  j                  d
      }t        j                  |j                  d	   j                         |       t        j                  |j                  d   j                         |       y )NrC   r!   rV   rd  rf   rq  r&   rr  r   Fr\  )r1   r   r   r   rf  r   r7   rA  r  rE  r  re  )	r9   rb  rm   rj  rk  r:   rs  rt  rk   s	            r;   "test_line_area_nan_df_stacked_areaz5TestDataFramePlots.test_line_area_nan_df_stacked_areaW  s9   
 a#bffa#W733?HH\<	HH\<	rww||6v6
##BHHQK$9$9$;YG''(=(=(?K''(=(=(?YAVWrww||U;
##BHHQK$9$9$;YG
##BHHQK$9$9$;YGr=   secondary_yc                 \   t        t        j                  j                  d      j                  d      g d      } |j                  di |}|j                         \  }}|j                         }||d   j                         d   d   k  sJ ||d   j                         d   d   k\  sJ y )Nr!   r   rV   r   r   r   rL   r  )r   r1   r2   r3   r7   r3  r   r5  )r9   rm   r:   rk   r8  r9  r  s          r;   test_line_limz TestDataFramePlots.test_line_limn  s    ryy,,Q/66v>XRWWv[[]
duQx((*1-a0000uQx((*1-b1111r=   c                    t        t        j                  j                  d      j                  d      g d      }|j	                  dd      }t        |dd	       |D ]}  }t        |d
      sJ t        |d      rJ |j                         \  }}|j                         }||d   j                         d   d   k  sJ ||d   j                         d   d   k\  r}J  y )Nr!   rz  r   r   T)rx  rA   rV   r{   rD   left_axright_axr   rL   )
r   r1   r2   r3   r7   r   hasattrr3  r   r5  )r9   r:   rI   rk   r8  r9  r  s          r;   test_line_lim_subplotsz)TestDataFramePlots.test_line_lim_subplotsw  s    ryy,,Q/66v>Xww4$w7$6: 	6B2y)))r:...JD$LLNE58,,.q1!444458,,.q1"5555	6r=   zX2020-12-01 this has been failing periodically on the ymin==0 assertion for a week or so.)strictrT   c                 *   t        t        j                  j                  d      j                  d      g d      }| }t	        |j
                  j                  |      }|j                         \  }}|j                         \  }}|j                         }	||	d   j                         d   d   k  sJ ||	d   j                         d   d   k\  sJ |dk(  sJ t	        |j
                  j                  |      }|j                         \  }}|dk(  sJ y )Nr!   r>  r?  r   r\  r   rL   )r   r1   r2   r3   r   r7   rA  r3  get_ylimr   r5  )
r9   rS  r:   neg_dfrk   r8  r9  yminymaxr  s
             r;   test_area_limz TestDataFramePlots.test_area_lim  s     II!!!$++F3=T
 rww||W=[[]
d[[]
duQx((*1-a0000uQx((*1-b1111qyyv{{//A[[]
dqyyr=   c                    t        t        j                  j                  d      j                  d      ddg      }t        j
                  j                  ddd      \  }\  }}|j                  |d	
       |j                  |d	
       t        |      j                  ||      sJ t        |      j                  ||      sJ y )Nr!   r$   r!   rX   rY   r   rC   T)shareyrA  )rk   rM  )
r   r1   r2   r3   r   r   rA   r7   r   joined)r9   r:   figrU  rV  s        r;   test_area_sharey_dont_overwritez2TestDataFramePlots.test_area_sharey_dont_overwrite  s    ryy,,Q/66v>c
S**--a4-@Zc3
3V$
3V$#%%c3///#%%c3///r=   c                     t        t        j                  j                  d      j	                  d            }|j
                  j                  |d      }|j                  D ]  }|j                         dk(  rJ  y )Nr!   ro   ro   )rS  	linewidth)	r   r1   r2   r3   r4   r7   r   patchesget_linewidth)r9   rS  r:   rk   rs        r;   test_bar_linewidthz%TestDataFramePlots.test_bar_linewidth  sd    ryy,,Q/??GHWW[[A[6 	*A??$)))	*r=   c                 "   t        t        j                  j                  d      j	                  d            }|j
                  j                  dd      }t        |dd       |D ](  }|j                  D ]  }|j                         dk(  rJ  * y )Nr!   r  T)r  rA   ro   )ro   rC   rD   )
r   r1   r2   r3   r4   r7   r   r   r  r  )r9   r:   rI   rk   r  s        r;   test_bar_linewidth_subplotsz.TestDataFramePlots.test_bar_linewidth_subplots  s    ryy,,Q/??GHww{{Q{6$6: 	.BZZ .(A---.	.r=   z	meth, dim)r   	get_width)barh
get_heightc                 ^   t        t        j                  j                  d      j	                  d            }d} t        |j                  |      ||      }|j                  D ]G  }|s- t        ||             |t        |j                        z  k(  r0J  t        ||             |k(  rGJ  y )Nr!   r  ?)rS  width)
r   r1   r2   r3   r4   r   r7   r  r   r.   )r9   methdimrS  r:   r  rk   r  s           r;   test_bar_barwidthz$TestDataFramePlots.test_bar_barwidth  s    
 ryy,,Q/??GH#WRWWd#G5A 	2A&wq#(EC

O,CCCC&wq#(E111		2r=   c                    t        t        j                  j                  d      j	                  d            }d} t        |j                  |      |d      }|D ])  }|j                  D ]  } t        ||             |k(  rJ  + y )Nr!   r  r  T)r  rA   )r   r1   r2   r3   r4   r   r7   r  )r9   r  r  r:   r  rI   rk   r  s           r;   test_barh_barwidth_subplotsz.TestDataFramePlots.test_barh_barwidth_subplots  s     ryy,,Q/??GH%wrww%EDA 	2BZZ 2&wq#(E1112	2r=   c                    t        t        j                  j                  d      j                  d            }|j                  j                  dd      }|j                  D cg c]  }|j                          }}|dgdz  k(  sJ |j                  j                  dg d      }|j                  d d	 D cg c]  }|j                          }}|g dk(  sJ y c c}w c c}w )
Nr!   r  FrC   )rS  bottom   T)rL   ro   )r   r1   r2   r3   r7   r   r  get_yr9   r:   rk   pr   s        r;   test_bar_bottom_left_bottomz.TestDataFramePlots.test_bar_bottom_left_bottom  s    ryy,,Q/66v>?WW[[q[1%'ZZ0!'')00!r!!!WW[[.B[C%'ZZ^4!'')44---- 1 5s   #C7Cc                    t        t        j                  j                  d      j                  d            }|j                  j                  dt        j                  g d            }|j                  D cg c]  }|j                          }}|dgdz  k(  sJ |j                  j                  dg d	      }|j                  d d
 D cg c]  }|j                          }}|g d	k(  sJ y c c}w c c}w )Nr!   r  FrC   rC   rC   rC   rC   )rS  leftrC   r  Tr   ro   )	r   r1   r2   r3   r7   r  r   r  get_xr  s        r;   test_bar_bottom_left_leftz,TestDataFramePlots.test_bar_bottom_left_left  s    ryy,,Q/66v>?WW\\%bhh.G\H%'ZZ0!'')00!r!!!WW\\$_\=%'ZZ^4!'')44((( 1 5s   8C/C4c                    t        t        j                  j                  d      j                  d            }|j                  j                  dd      }|D ]4  }|j                  D cg c]  }|j                          }}|dgdz  k(  r4J  |j                  j                  dt        j                  g d            }|D ]4  }|j                  D cg c]  }|j                          }}|d	gdz  k(  r4J  y c c}w c c}w )
Nr!   r  TrL   )rA   r  ro   r  )rA   r  rC   )r   r1   r2   r3   r7   r   r  r  r  r   r  )r9   r:   rI   rk   r  r   s         r;   test_bar_bottom_left_subplotsz0TestDataFramePlots.test_bar_bottom_left_subplots  s    ryy,,Q/66v>?ww{{D{4 	&B)+4Aaggi4F4bTAX%%%	& ww||T0I|J 	%B)+4Aaggi4F4aS1W$$$	%	 5
 5s   (C:C?c                     t        dt        j                  dgg dg dd      }|j                  j	                         }g d}|j
                  D cg c]  }|j                          }}||k(  sJ y c c}w )Nr#      ro   r#   r  r   r   r)   r   	r#   r   r  ro   r#   r  rC   r!   rV   )r   r1   r   r7   r   r  r  r9   r:   rk   expectedr  r   s         r;   test_bar_nanzTestDataFramePlots.test_bar_nan  sb    b"&&"-KiPQWW[[]2*,**5Q!,,.55!!! 6s   A2c                 `   t        dt        j                  dgg dg dd      }|j                  j	                  d      }g d}|j
                  D cg c]  }|j                          }}||k(  sJ |j
                  D cg c]  }|j                          }}g d	}||k(  sJ y c c}w c c}w )
Nr#   r  r  r   r  Tr\  r  )	r.  r.  r.        $@r.  g      4@g      .@r  g      D@)r   r1   r   r7   r   r  r  r  r  s         r;   test_bar_nan_stackedz'TestDataFramePlots.test_bar_nan_stacked  s    b"&&"-KiPQWW[[[&2*,**5Q!,,.55!!!%'ZZ0!'')00E!!! 6 1s   B&B+c           	      d   t        t        j                  j                  d      j	                  d       |t        d             |t        d                  }|j                  j                         }|j                  j                         }t        j                  |t        j                  g d             |j                         dk(  sJ |j                  d   j                         d	k(  sJ |j                  d
   j                         dk(  sJ |j                  j                  d      }t        j                  |t        j                  g d             |j                         dk(  sJ |j                  d   j                         d	k(  sJ |j                  d
   j                         dk(  sJ y )Nr!   )r   ro   ABCDEFabcder!  )r   rC   r!   rV   r$   ro   )g      g      @r   g      пrL   g@Tr\  g      @)r   r1   r2   r3   r4   r5   r7   r   r   get_ticklocsr  rE  r   r3  r  r  )r9   rb  r:   rk   tickss        r;   test_bar_categoricalz'TestDataFramePlots.test_bar_categorical  sR    II!!!$44V<d8n%W&
 WW[[]%%'
##E2884F+GH{{}+++zz!}""$---zz"~##%---WW[[[&
##E2884F+GH{{}+++zz!}""$---zz"~##%---r=   zx, yrC   r!   c                     t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }t        |j                  j                  ||       y )Nr!   r>  r   r?  r!  rW   )r   r1   r2   r3   r4   r5   rh   ri   r   r7   r   r9   rX   rY   r:   s       r;   test_plot_scatterz$TestDataFramePlots.test_plot_scatter  sW    II!!!$44V<v++BQ/0+
 	"''//Q!4r=   c                 4   t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }t        j                  d      }t        j                  t        |      5  |j                  j                  d	       d d d        t        j                  d
      }t        j                  t        |      5  |j                  j                  d       d d d        y # 1 sw Y   _xY w# 1 sw Y   y xY w)Nr!   r>  r   r?  r!  z5scatter() missing 1 required positional argument: 'y'rZ   rX   r   z5scatter() missing 1 required positional argument: 'x'rY   r   )r   r1   r2   r3   r4   r5   rh   ri   reescaper]   r^   	TypeErrorr7   r   ra   s      r;   test_plot_scatter_errorz*TestDataFramePlots.test_plot_scatter_error(  s    II!!!$44V<v++BQ/0+

 iiOP]]9C0 	#GGOOcO"	#iiOP]]9C0 	#GGOOcO"	# 	#	# 	#	# 	#s   DDDDc                     t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }|j                  dddd	
      }t        |dd       y )Nr!   r>  r   r?  r!  rX   rY   r   T)rX   rY   rM  rA   rC   r   rD   )
r   r1   r2   r3   r4   r5   rh   ri   r7   r   rH   s      r;   test_plot_scatter_shapez*TestDataFramePlots.test_plot_scatter_shape5  se    II!!!$44V<v++BQ/0+
 ww)dwC$6:r=   c                 :   t        t        j                  j                  d      j	                  d      dg      }t        ddd      j                  |d<   d	}t        j                  t        |
      5  |j                  ddd       d d d        y # 1 sw Y   y xY w)Nr!   r#   r   r   z
2014-01-01h)startr,   r+   dtimez9must be a string or a (real )?number, not 'datetime.time'rZ   r   )rM  rX   rY   )r   r1   r2   r3   r4   r   timer]   r^   r  r7   ra   s      r;   &test_raise_error_on_datetime_time_dataz9TestDataFramePlots.test_raise_error_on_datetime_time_data?  s|    ryy,,Q/??CcUS |#rJOO7I]]9C0 	6GGgG5	6 	6 	6s   3BBr   valsr   rC   c                    t        t        ddd      dd      }t        j                  j	                  d      j                  ddt        |            }t        ||d      }t        |j                  j                  ||	       y )
Ni  rC      W)r  r+   r,   r!   r   r  rW   )r   r   r1   r2   r3   normalr   r   r   r7   r   )r9   rX   rY   r   r  r:   s         r;   test_scatterplot_datetime_dataz1TestDataFramePlots.test_scatterplot_datetime_dataH  se     dAq!12CHyy$$Q'..q!SZ@56"''//Q!4r=   infer_stringpyarrow)marksrd  b_colr!   rV   r$   r   c                     t        d|      5  t        g d|d      }t        |j                  j                  ||       d d d        y # 1 sw Y   y xY w)Nzfuture.infer_stringr  rd  rW   )r   r   r   r7   r   )r9   r  rX   rY   r  r:   s         r;   test_scatterplot_object_dataz/TestDataFramePlots.test_scatterplot_object_dataQ  sG     1<@ 	9u=>Bbggooa8	9 	9 	9s   3A		Aordered
categories)setosa
versicolor	virginica)r  r  r  c                    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                  j	                  ddd      }|j
                  \  }|j                  }t        j                  g d      }|j                         }t        j                  ||       t        j                  g d      }	|j                  }
t        j                  |
|	       |}|j                  j                         D cg c]  }|j                          }}t!        d t#        ||      D              sJ y c c}w )Ngffffff@g      @g@r1  g      @g	@g@g@lengthr  r   )r  r  r  r  r  )r  r  speciesr   rC   rX   rY   r   )      ?g      ?g      @r-  c              3   ,   K   | ]  \  }}||k(    y wNr  ).0ijs      r;   	<genexpr>zKTestDataFramePlots.test_scatterplot_color_by_categorical.<locals>.<genexpr>z  s     Tda16Ts   )r   r   Categoricalr7   r   collectionscolorbarr1   r   	get_ticksr  rE  _boundariesrk   get_ymajorticklabelsget_textallr   )r9   r  r  r:   rk   colorbar_collectionr  expected_ticksresult_ticksexpected_boundariesresult_boundariesexpected_yticklabelsr  result_yticklabelss                 r;   %test_scatterplot_color_by_categoricalz8TestDataFramePlots.test_scatterplot_color_by_categorical]  s1    3Z#sc3Z#sc3ZHw'
 H!
9
 WW__qA_3!#	&///2))+
##L.A hh';<$00
##$57JK)4<KK4T4T4VWqajjlWWTc*<>R&STTTT Xs   E )rW   )rY   rX   )rY   rY   c                     t        g dt        j                  g d      d      }t        |j                  j
                  ||       y )Nr   )r   r   r   r   rW   )r   r   r  r   r7   r   r  s       r;   'test_plot_scatter_with_categorical_dataz:TestDataFramePlots.test_plot_scatter_with_categorical_data|  s1     \?S0TUV"''//Q!4r=   zx, y, cr   )r   rC   r!   c                    t        t        j                  j                  d      j	                  ddd      t        t        j                  d d       g d      }|j                  j                  |||	      }|j                  d   j                  j                  d
k(  sJ |j                  d   j                  j                  j                         dk(  sJ y )Nr!   r   rq   r>  lowhighsizer   r?  r!  r  Greysr   )r   r1   r2   r3   r   r5   rh   ri   r7   r   r  cmapr   r  rk   
get_ylabel)r9   rX   rY   r   r:   rk   s         r;   test_plot_scatter_with_cz+TestDataFramePlots.test_plot_scatter_with_c  s    II!!!$--!#F-Kv++BQ/0+
 WW__qA_+~~a %%**g555~~a )),,779S@@@r=   c                 ^   t        t        j                  j                  d      j	                  ddd      t        t        j                  d d       g d      }d	}|j                  j                  d
dd|      }|j                  d   j                  j                  |k(  sJ |j                  j                  d
ddd      }|j                  d   j                  J |j                  j                  ddd      }|j                  d   j                  J t        |j                  dg       y )Nr!   r   rq   r>  r  r   r?  r!  	cubehelixrX   rY   r   )rX   rY   r   colormapF)rX   rY   r   r  rC   redr  r  
facecolors)r   r1   r2   r3   r   r5   rh   ri   r7   r   r  r  r   r  r   )r9   r:   cmrk   s       r;   test_plot_scatter_with_c_propsz1TestDataFramePlots.test_plot_scatter_with_c_props  s   II!!!$--!#F-Kv++BQ/0+

 WW__scS2_>~~a %%**b000 WW__scS5_A~~a ))111 WW__qA_/~~a ))111bnn#7r=   c                 p   t        ddgddgd      }g d}g d}t        j                  ||g      }|j                  j	                  dd	|
      }t        j                  |j                  d   j                         |       t        j                  ddg      }|j                  j	                  dd	|d       y )NrC   r!   rV   r$   r   )r/  r.  r.  r/  )r.  r/  r.  r/  r   r)   r  r   r.  r/  spring)rX   rY   r   r  )	r   r1   r   r7   r   r  rE  r  get_facecolor)r9   r:   red_rgba
green_rgba
rgba_arrayrk   float_arrays          r;   test_plot_scatter_with_c_arrayz1TestDataFramePlots.test_plot_scatter_with_c_array  s     aV1a&12')
XXx45
WW__scZ_8
 	##BNN1$5$C$C$EzR hhSz*
#(Cr=   c                 :   t        t        j                  j                  d      j                  d      dz  g d      }|j                  j                  ddd	      }t        j                  |d   j                  |j                  d
   j                                y )Nr!   re   rq   r   r   r   r   r   )rX   rY   r   r   )right)r   r1   r2   r3   r7   r   r  rE  valuesr  	get_sizesrj   s      r;   test_plot_scatter_with_sz+TestDataFramePlots.test_plot_scatter_with_s  st    II!!!$++G4s:O
 WW__scS_1
##BsGNN"..:K:U:U:WXr=   c                 4   t        t        j                  j                  d      j                  d      dz  g d      }t        j
                  j                         }|j                  j                  ddd|	      }|j                  d
   j                  |u sJ y )Nr!   re   rq   r   r   r   r   r   )rX   rY   r   normr   )r   r1   r2   r3   r   colorsLogNormr7   r   r  r&  )r9   r:   r&  rk   s       r;   test_plot_scatter_with_normz.TestDataFramePlots.test_plot_scatter_with_norm  s{    II!!!$++G4s:O
 zz!!#WW__scSt_<~~a %%---r=   c                    t        t        j                  j                  d      j                  d      dz  g d      }|j                  j                  ddd	      }|j                  d
   j                  }|j                  j                         |j                  j                         f}t        j                  j                  | }|j                  D ]  } ||       ||      k(  rJ  y )Nr!   re   rq   r   r   r   r   r   r  r   )r   r1   r2   r3   r7   r   r  r&  r   minmaxr   r'  	Normalize)r9   r:   rk   	plot_normcolor_min_maxdefault_normvalues          r;   test_plot_scatter_without_normz1TestDataFramePlots.test_plot_scatter_without_norm  s    II!!!$++G4s:O
 WW__scS_1NN1%**	RTTXXZ0zz++];TT 	;EU#|E'::::	;r=   legendr?   c                     t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }t        |j                  j                  fi | y )Nr!   r>  r   onetwothreer@  r!  )r   r1   r2   r3   r4   r5   rh   ri   r   r7   r   rx   s      r;   test_plot_barz TestDataFramePlots.test_plot_bar  sZ     II!!!$44V<v++BQ/03
 	"''++00r=   c                     t        t        j                  j                  d      j	                  d      t        t        j                  d d       t        d            }t        |j                  j                         y )Nr!   )r#      r#   r;  r!  )r   r1   r2   r3   r4   r5   rh   ri   r   r   r7   r   r8   s     r;   test_plot_bar_int_colz(TestDataFramePlots.test_plot_bar_int_col  sW    II!!!$44X>v++CR01"I

 	"''++&r=   c                     t        ddgddgd      }t        |j                  j                        }t	        |d       |j                  j                  dd      }t	        |ddd	       y )
Nr   rC   rd  Z   rQ   #   r#   rotfontsizerR   
xlabelsize
ylabelsize)r   r   r7   r   r   rj   s      r;   test_plot_bar_ticksz&TestDataFramePlots.test_plot_bar_ticks  sY    aV1a&12rww{{+2B'WW[[R"[-2B2"Er=   c                     t        ddgddgd      }t        |j                  j                        }t	        |d       |j                  j                  dd      }t	        |ddd       y )	Nr   rC   rd  )yrot7      r@  )rH  rE  rD  )r   r   r7   r  r   rj   s      r;   test_plot_barh_ticksz'TestDataFramePlots.test_plot_barh_ticks  sY    aV1a&12rww||,2A&WW\\b2\.2B2"Er=   c           	         |}|j                         j                  }|D cg c]  }t        |       }}t        |j                  j
                        }t        |j                         |       t        j                  |j                  j                         t        j                  dt        |      dz                t        |j                        dt        |      z  k(  sJ y c c}w )NrC   r   )_get_numeric_datar.   r   r   r7   boxr   r   r  rE  r   r  r1   r   r   r  r9   hist_dfr:   numeric_colsr   labelsrk   s          r;   test_boxplotzTestDataFramePlots.test_boxplot  s    ++-55+78a,q/88rww{{+2--/8
##HH!!#RYYq#l2Ca2G%H	
 288}C$5 5555 9s   C#c                     |}|d   }|j                   j                  d      }t        |dd       t        |j                   j                         y )Nheight(   rA  r   rR   rH  )r7   rN  r   r   )r9   rP  r:   seriesrI   s        r;   test_boxplot_seriesz&TestDataFramePlots.test_boxplot_series  s@    H{{2&4bq1&++//*r=   c                    |}t        j                  g d      }|j                  j                  |      }|j	                         j
                  }|D cg c]  }t        |       }}t        |j                         |       t        j                  |j                  j                         |       t        |j                        dt        |      z  k(  sJ y c c}w )N)rC   r   r   )	positionsr   )r1   r   r7   rN  rM  r.   r   r   r   r  rE  r   r  r   r  )r9   rP  r:   r\  rk   rQ  r   rR  s           r;   test_boxplot_series_positionsz0TestDataFramePlots.test_boxplot_series_positions  s    HHY'	WW[[9[-++-55+78a,q/882--/8
##BHH$9$9$;YG288}C$5 5555 9s   Cc                 P   |}|j                         j                  }|D cg c]  }t        |       }}|j                  j	                  ddd      }t        |ddd       t        |j                         |       t        |j                        dt        |      z  k(  sJ y c c}w )N2   r   F)rA  rB  vertr   rR   rH  rE  r   )
rM  r.   r   r7   rN  r   r   get_yticklabelsr   r  rO  s          r;   test_boxplot_verticalz(TestDataFramePlots.test_boxplot_vertical%  s    ++-55+78a,q/88 WW[[R!%[82AB1=2--/8288}C$5 5555 9s   B#zignore:Attempt:UserWarningc                    |}|j                         j                  }|D cg c]  }t        |       }}t        |j                  j
                  dddd      }t        |dd       t        |d       t        ||      D ]:  \  }}t        |j                         |g       t        |j                        d	k(  r:J  y c c}w )
NTF)r@   rA   r`  r   rV   )rC   rV   rD   r   r   r   )rM  r.   r   r   r7   rN  r   r   r   r   rb  r   r  )	r9   rP  r:   rQ  r   rR  rI   rk   r   s	            r;   test_boxplot_vertical_subplotsz1TestDataFramePlots.test_boxplot_vertical_subplots0  s    ++-55+78a,q/88 GGKK
 	$6:U+T6* 	&IBr113eW=rxx=A%%%	& 9s   B>c                    |}|j                         j                  }|D cg c]  }t        |       }}t        j                  g d      }|j
                  j                  |d      }t        |j                         |       t        j                  |j                  j                         |       t        |j                        dt        |      z  k(  sJ y c c}w )N)rV   r!   r   F)r\  r`  r   )rM  r.   r   r1   r   r7   rN  r   rb  r  rE  r   r  r   r  )r9   rP  r:   rQ  r   rR  r\  rk   s           r;   test_boxplot_vertical_positionsz2TestDataFramePlots.test_boxplot_vertical_positionsB  s    ++-55+78a,q/88HHY'	WW[[95[92--/8
##BHH$9$9$;YG288}C$5 5555 9s   Cc                 L   t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }d}t        j                  t        |      5  |j                  j                  d	       d d d        y # 1 sw Y   y xY w)
Nr!   r>  r   r5  r!  z2return_type must be {None, 'axes', 'dict', 'both'}rZ   
not_a_typereturn_type)r   r1   r2   r3   r4   r5   rh   ri   r]   r^   r  r7   rN  ra   s      r;    test_boxplot_return_type_invalidz3TestDataFramePlots.test_boxplot_return_type_invalidL  s~    II!!!$44V<v++BQ/03

 C]]:S1 	2GGKKLK1	2 	2 	2s   4BB#rk  )dictrI   bothc                     t        t        j                  j                  d      j	                  d      t        t        j                  d d       g d      }|j                  j                  |      }t        ||       y )Nr!   r>  r   r5  r!  rj  )r   r1   r2   r3   r4   r5   rh   ri   r7   rN  r   )r9   rk  r:   r   s       r;   %test_boxplot_return_type_invalid_typez8TestDataFramePlots.test_boxplot_return_type_invalid_typeV  sa    II!!!$44V<v++BQ/03

 5v{3r=   c                 L   t        j                  d       t        t        j                  j                  d      j                  d            }t        |j                  d      }|j                  D cg c]  }t        |       }}t        ||       t        |d       y c c}w )	Nscipyr!   rq   r$   kderM  rR  r   rQ   )r]   importorskipr   r1   r2   r3   r4   r   r7   r.   r   r   r   )r9   r:   rk   r   r  s        r;   test_kde_dfzTestDataFramePlots.test_kde_df`  sx    G$ryy,,Q/??IJrwwU3-/ZZ8LO88R12A& 9s   2B!c                     t        j                  d       t        t        j                  j                  d      j                  d            }|j                  ddd      }t        |ddd       y )	Nrr  r!   r"   rt  r  ro   )rM  rA  rB  rC  )	r]   rw  r   r1   r2   r3   r4   r7   r   rj   s      r;   test_kde_df_rotz"TestDataFramePlots.test_kde_df_roth  sV    G$ryy,,Q/??HIWW%R!W42B1Cr=   c                     t        j                  d       t        t        j                  j                  d      j                  d            }t        |j                  ddd      }t        |dd	       y )
Nrr  r!   r"   Trt  )r@   rM  rA   r$   rB   rD   )
r]   rw  r   r1   r2   r3   r4   r   r7   r   rH   s      r;   test_kde_df_subplotsz'TestDataFramePlots.test_kde_df_subplotsn  s\    G$ryy,,Q/??HI GG	
 	$6:r=   c                     t        j                  d       t        t        j                  j                  d      j                  d            }|j                  ddd      }t        |d       y )	Nrr  r!   r"   rt  T)rM  r   rA   r   r   )	r]   rw  r   r1   r2   r3   r4   r7   r   rH   s      r;   test_kde_df_logyz#TestDataFramePlots.test_kde_df_logyy  sR    G$ryy,,Q/??HIwwEtw<U+r=   c                    t        j                  d       t        t        j                  j                  d      j                  d            }t        j                  |j                  d<   t        |j                  d       y )Nrr  r!   rs  r  r   r   rt  ru  )r]   rw  r   r1   r2   r3   uniformr   locr   r7   r8   s     r;   test_kde_missing_valsz(TestDataFramePlots.test_kde_missing_vals  sV    G$ryy,,Q/77X7FGvvt"''.r=   c                    t        t        j                  j                  d      j	                  d            }t        |j                  j                        }|j                  D cg c]  }t        |       }}t        ||       t        |j                  j                  ddd      }t        |dd       t        |d	
       y c c}w )Nr!   rs  rv  T)r@   rA   r   r$   rB   rD   r   r   )r   r1   r2   r3   r4   r   r7   r   r.   r   r   r   r   )r9   r:   rk   r   r  rI   s         r;   test_hist_dfzTestDataFramePlots.test_hist_df  s    ryy,,Q/??IJrww||,-/ZZ8LO88R1 GGLL	
 	$6:U+ 9s   %Cc                     t        t        j                  j                  d      j                  d            }|j                  j                  d      }t        |dd       y )Nr!   r#   rV  rW  r   rX  )r
   r1   r2   r3   r7   r   r   )r9   rY  rI   s      r;   test_hist_df_seriesz&TestDataFramePlots.test_hist_df_series  sI    		--a077;<{{B'4bq1r=   c                 f   ddl m} t        t        j                  j                  d      j	                  d            }|j                  j                  ddd      }|j                         D cg c]  }t        ||      s| }}t        j                  |d   j                         d	       y c c}w )
Nr   	Rectangler!   r#   Tr$   )
cumulativebinsdensityrL   r/  matplotlib.patchesr  r
   r1   r2   r3   r7   r   get_childrenr  r  assert_almost_equalr  r9   r  rY  rk   rX   rectss         r;   &test_hist_df_series_cumulative_densityz9TestDataFramePlots.test_hist_df_series_cumulative_density  s    0		--a077;<[[AtDOO-JqAy1IJJ
uRy335s; Ks   .B. B.c                 d   ddl m} t        t        j                  j                  d      j	                  d            }|j                  j                  dd      }|j                         D cg c]  }t        ||      s| }}t        j                  |d   j                         d	       y c c}w )
Nr   r  r!   r#   Tr$   )r  r  r  r  r  r  s         r;   test_hist_df_series_cumulativez1TestDataFramePlots.test_hist_df_series_cumulative  s    0		--a077;<[[A6OO-JqAy1IJJ
uRy335t< Ks   -B-?B-c                     t        t        j                  j                  d      j	                  d            }|j
                  j                  ddd      }t        |ddd       y )	Nr!   r"   r_  r   
horizontal)rA  rB  orientationr   ra  )r   r1   r2   r3   r4   r7   r   r   rH   s      r;   test_hist_df_orientationz+TestDataFramePlots.test_hist_df_orientation  sL    ryy,,Q/??HIww||QL|I4abQ?r=   weights皙?)rq   )shape)rq   r!   c           
         t        t        t        ddgt        j                  j                  d      j                  d                        }t        |j                  d|      }t        |j                  d      }|j                  D cg c]  }|j                          }}|j                  D cg c]  }d|j                         z   }}t        j                  ||       y c c}w c c}w )	Nr   r)   r!   )r!   rq   r   )rM  r  ru  r  )r   rm  r   r1   r2   r3   r4   r   r7   r  r  r  r  )r9   r  r:   rU  rV  patchpatch_height_with_weightsexpected_patch_heights           r;   test_hist_weightsz$TestDataFramePlots.test_hist_weights  s     c3Z!6!6q!9!I!I(!STU
  fgFf5EH[[$QEU%5%5%7$Q!$Q HK{{ Seu'7'7'9!9 S S
8:OP %R !Ts   
C$1C)c                    t        j                  |D cg c]  }|j                          c}      }t        j                  |D cg c]  }|j                          c}      }t        j                  |D cg c]  }|j	                          c}      }	t        j                  |D cg c]  }|j                          c}      }
|t        j                  ||d       |t        j                  ||d       |t        j                  |	|d       |t        j                  |
|d       y y c c}w c c}w c c}w c c}w )NF)check_dtype)r1   r   r  r  r  r  r  rE  )r9   r  
expected_y
expected_h
expected_x
expected_wr  result_yresult_heightresult_xresult_widths              r;   _check_box_coordz#TestDataFramePlots._check_box_coord  s     8881QWWY89'!BQ!,,.!BC8881QWWY89xx @1 @A !''*%P!''zuU!''*%P!''jeT " 9!B8 @s   D/D46D9'D>rh  r   r#   	   r   r   r   r   r   r   r   r   r   r   r   r  r#   r  r!   rV   ro   )rV   r#   r  r   r   r   )r   rV   r   r   r   r   )r   r   r   rV   r  r#   c                    t        |      }|j                  j                  d      }| j                  |j                  d d t        j                  g d      t        j                  g d             | j                  |j                  dd t        j                  g d      t        j                  g d             | j                  |j                  dd  t        j                  g d      t        j                  g d             |j                  j                  dd	
      }| j                  |j                  d d t        j                  g d      t        j                  g d             | j                  |j                  dd t        j                  g d      t        j                  g d             | j                  |j                  dd  t        j                  g d      t        j                  g d             |j                  j                  dd	d	      }| j                  |d   j                  t        j                  g d      t        j                  g d             | j                  |d   j                  t        j                  g d      t        j                  g d             | j                  |d   j                  t        j                  g d      t        j                  g d             |j                  j                  dd      }| j                  |j                  d d t        j                  g d      t        j                  g d             | j                  |j                  dd t        j                  g d      t        j                  g d             | j                  |j                  dd  t        j                  g d      t        j                  g d             |j                  j                  dd	d      }| j                  |j                  d d t        j                  g d      t        j                  g d             | j                  |j                  dd t        j                  g d      t        j                  g d             | j                  |j                  dd  t        j                  g d      t        j                  g d             |j                  j                  dd	d	d      }| j                  |d   j                  t        j                  g d      t        j                  g d             | j                  |d   j                  t        j                  g d      t        j                  g d             | j                  |d   j                  t        j                  g d      t        j                  g d             y )Nro   )r  )r   r   r   r   r   r  )r  r  r#   r  r  T)r  rS  )      r   r;     )r  rS  rA   r   rC   r!   r  )r  r  )r  r  )r  rS  r  )r  rS  rA   r  )r   r7   r   r  r  r1   r   )r9   rh  r:   rk   rI   s        r;   test_hist_df_coordz%TestDataFramePlots.test_hist_df_coord  s   , t_WW\\q\!JJrNxx0xx 01 	 	

 	JJqxx0xx0 	 	

 	JJrsOxx0xx 01 	 	
 WW\\q$\/JJrNxx0xx 01 	 	

 	JJqxx 01xx0 	 	

 	JJrsOxx 45xx 01 	 	
 ww||D4|@GOOxx0xx 01 	 	

 	GOOxx0xx0 	 	

 	GOOxx0xx 01 	 	
 WW\\ql\;JJrNxx0xx 01 	 	

 	JJqxx0xx0 	 	

 	JJrsOxx0xx 01 	 	
 WW\\q$L\IJJrNxx0xx 01 	 	

 	JJqxx 01xx0 	 	

 	JJrsOxx 45xx 01 	 	
 ww||D4\  
 	GOOxx0xx 01 	 	

 	GOOxx0xx0 	 	

 	GOOxx0xx 01 	 	
r=   c                     t        t        j                  j                  d      j	                  d            j                         }t        |j                  d       y )Nr!   rs  Tr3  )r   r1   r2   r3   r4   cumsumr   r7   r8   s     r;   test_plot_int_columnsz(TestDataFramePlots.test_plot_int_columns_  s=    ryy,,Q/??IJQQS"''$/r=   markers^+o)r  r  r  c                    dd l m} |j                         }|j                          |j	                  d       t        t        j                  j                  d      j                  d            }|j                  |      }t        |j                         d t        |             D ]  \  }}|j                         ||   k(  rJ  y )Nr   o   r!   re   )style)matplotlib.pyplotr   gcfclfadd_subplotr   r1   r2   r3   r4   r7   	enumerater   r   
get_marker)r9   r  pltr  r:   rk   rb  r`   s           r;   test_style_by_columnz'TestDataFramePlots.test_style_by_columnc  s     	(ggi	ryy,,Q/??HIWW7W#"2<<>.CL#AB 	5IC??$444	5r=   c                     t        ddg      }|j                         }|j                         J |j                  d      }|j                         j                         d   j	                         dk(  sJ y )NrC   r!   Tr  r    )r
   r7   
get_legend	get_textsr  )r9   r   rk   s      r;   test_line_label_nonez'TestDataFramePlots.test_line_label_nonew  sg    Aq6NVVX}}&&&VV4V }}((*1-668B>>>r=   zprops, expected))boxpropsboxes)whiskerpropswhiskers)cappropscaps)medianpropsmediansc           	         t        dD ci c]1  }|t        j                  j                  d      j                  d      3 c}      }|ddii} |j                  j
                  d	ddi|}||   d   j                         dk(  sJ y c c}w )
NABCr!   rq   colorC1rk  rm  r   r  )r   r1   r2   r3   r7   rN  	get_color)r9   propsr  kr:   kwdr   s          r;   !test_specified_props_kwd_plot_boxz4TestDataFramePlots.test_specified_props_kwd_plot_box  s     OA299003::3??OPwo&7737h",,.$666	 Ps   6Bc                    t        ddd      t        ddd      t        ddd      g}g d}t        t        j                  |      |dg      }|j	                         }|j
                  d	   j                         }t        j                  |t        j                  |t        
             |j
                  d	   j                         }t        j                  |t        j                  |             |j                  j                         }|D cg c]  }|j                         d	    }}t        |      j                  sJ |D cg c]  }|j!                          }	}t#        j$                  |	d      j                  sJ y c c}w c c}w )N  r#   rC   r  r   )r1  r0  r/  testr!  r   r&   z%Y-%m-%dr   )r   r   r1   r   r7   r  r  r  rE  r6   re  r   get_ticklabelsget_positionr   is_monotonic_increasingr  r   r   )
r9   r/   r"  r:   rk   rp   ydatarX   xlocsxlabelss
             r;   test_unordered_tsz$TestDataFramePlots.test_unordered_ts  s:   dB"Dq!$4d4A6FG HHVH

 WWY!&&(
##FBHHU&,IJ%%'
##E288F+;< ((*.45!!$55U|3333)/0A1::<00~~gj9QQQQ 60s   FFc                     t        j                  d       t        dg di      }|j                  |        t	        |j                  |              y Nrr  rX   r   ru  r]   rw  r   r7   r   r9   rM  r:   s      r;   test_kind_both_waysz&TestDataFramePlots.test_kind_both_ways  s@    G$Y'(
T r=   c                     t        j                  d       t        dg di      }|j                  dd|        t	        |j                  |      dd       y r  r  r  s      r;   test_kind_both_ways_x_yz*TestDataFramePlots.test_kind_both_ways_x_y  sH    G$Y'(
St$sC(r=   c                     t        t        d            }d}t        j                  t        |      5  |j                  |       d d d        y # 1 sw Y   y xY w)Nabcdno numeric data to plotrZ   ru  )r   r5   r]   r^   r  r7   r9   rM  r:   rb   s       r;   test_all_invalid_plot_dataz-TestDataFramePlots.test_all_invalid_plot_data  sF    tF|$']]9C0 	GGG	 	 	s   AAc                    t        t        j                  j                  d      j	                  d      t
              }d|t        j                  j                  d      j                  |j                  d         dkD  <   d}t        j                  t        |      5  |j                  |	       d d d        y # 1 sw Y   y xY w)
Nr!   r#   r!   r&   r   r   r  r  rZ   ru  )r   r1   r2   r3   r4   r6   r  r]   r^   r  r7   r  s       r;   (test_partially_invalid_plot_data_numericz;TestDataFramePlots.test_partially_invalid_plot_data_numeric  s     II!!!$44W=
 BE299  #**288A;7#=>']]9C0 	GGG	 	 	s   B88Cc                     t        t        j                  j                  d      j	                  d            }d}t        j                  t        |      5  |j                  d       d d d        y # 1 sw Y   y xY w)Nr!   r  z*invalid_plot_kind is not a valid plot kindrZ   invalid_plot_kindru  )	r   r1   r2   r3   r4   r]   r^   r  r7   ra   s      r;   test_invalid_kindz$TestDataFramePlots.test_invalid_kind  s]    ryy,,Q/??HI:]]:S1 	.GG,G-	. 	. 	.s   A11A:zx,y,lblr   r   r   c                     t        ddgddgddgd      }t        j                  t        d	      5  |j	                  |||
       d d d        y # 1 sw Y   y xY w)NrC   r!   rV   r$   ro   r   r  x must be a label or positionrZ   rX   rY   r   r   r]   r^   r  r7   )r9   rX   rY   lblr:   s        r;   test_invalid_xy_argsz'TestDataFramePlots.test_invalid_xy_args  sW     aV1a&1v>?]]:-LM 	)GGa1CG(	) 	) 	)s   AAc                     t        ddgddgddgd      }d}t        j                  t        |	      5  |j	                  d
ddgd       d d d        y # 1 sw Y   y xY w)NrC   r!   rV   r$   ro   r   r  z.label should be list-like and same length as yrZ   r   r)   r   	bad_labelr  r   ra   s      r;   test_bad_labelz!TestDataFramePlots.test_bad_label  s]    aV1a&1v>?>]]:S1 	<GGcc3Z{G;	< 	< 	<s   AAzx,yr   c                     t        g dg dgt        d            }t        j                  t        d      5  |j                  ||       d d d        y # 1 sw Y   y xY w)N)rC   rV   ro   )r!   r$   r   AABr   r  rZ   rW   )r   r5   r]   r^   r  r7   r  s       r;   test_invalid_xy_args_dup_colsz0TestDataFramePlots.test_invalid_xy_args_dup_cols  sM     	9-tE{C]]:-LM 	GGa1G	 	 	s   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||	       |j                  ||||
      }t        |j                        t        |      k(  sJ t        |j                         |       y )NrC   r!   rV   r$   ro   r   r  r   r  )rX   rY   r   r  
linecolors)r   r   r7   r   r  r   r   )r9   rX   rY   r  r'  r:   rk   s          r;   test_y_listlikez"TestDataFramePlots.test_y_listlike  ss     aV1a&1v>?"''SAS9WWqASW7288}A&&&blln8r=   zx,y,colnamesc                 f    t        ddgddgd      }||_        t        |j                  ||       y )NrC   r!   rV   r$   r   rW   )r   r.   r   r7   )r9   rX   rY   colnamesr:   s        r;   test_xy_args_integerz'TestDataFramePlots.test_xy_args_integer  s2     aV1a&12
"''Q!,r=   c                    t        t        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      t        j
                  d      t        j                  j                  d      j	                  d      z   d      }|j                  j                  ddd      }t        |j                        d	k(  sJ y )
Nr!   r  r  r  r   r)   r#   )rX   rY   gridsizerC   
r   r1   r2   r3   r  r   r7   r   r   r  rj   s      r;   test_hexbin_basicz$TestDataFramePlots.test_hexbin_basic  s    YY**1-5525>YY**1-5525>YYr]RYY%:%:1%=%E%E2%E%NN
 WW^^cS2^62>>"a'''r=   c                    t        t        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      t        j
                  d      t        j                  j                  d      j	                  d      z   d      }|j                  j                  ddd      }t        |d	   j                  j                        dk(  sJ t        |d
d       y )Nr!   r  r  r  r   r)   T)rX   rY   rA   r   rC   r   rD   )r   r1   r2   r3   r  r   r7   r   r   figurerI   r   rH   s      r;   test_hexbin_basic_subplotsz-TestDataFramePlots.test_hexbin_basic_subplots  s    YY**1-5525>YY**1-5525>YYr]RYY%:%:1%=%E%E2%E%NN
 ww~~sT~: 47>>&&'1,,,$6:r=   reduce_Cc                    t        t        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      t        j
                  d      t        j                  j                  d      j	                  d      z   d      }|j                  j                  ddd|      }t        |j                        d	k(  sJ y )
Nr!   r  r  r  r   r)   r   )rX   rY   r   reduce_C_functionrC   r  )r9   r  r:   rk   s       r;   test_hexbin_with_cz%TestDataFramePlots.test_hexbin_with_c  s    YY**1-5525>YY**1-5525>YYr]RYY%:%:1%=%E%E2%E%NN
 WW^^cSC8^L2>>"a'''r=   zkwargs, expectedBuGnr  r  r  YlGnc                    t        t        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      t        j
                  d      t        j                  j                  d      j	                  d      z   d      } |j                  j                  d	ddd|}|j                  d   j                  j                  |k(  sJ y )
Nr!   r  r  r  r   r)   rW   r   r  )r   r1   r2   r3   r  r   r7   r   r  r  r   )r9   rm   r  r:   rk   s        r;   test_hexbin_cmapz#TestDataFramePlots.test_hexbin_cmap+  s     YY**1-5525>YY**1-5525>YYr]RYY%:%:1%=%E%E2%E%NN
 RWW^^3cS3F3~~a %%**h666r=   c                    t        t        j                  j                  d      j                  d      g dg d      }d}t	        j
                  t        |      5  |j                  j                          d d d        y # 1 sw Y   y xY w)Nr!   ro   rV   XYZr   r   r   der-   z/pie requires either y column or 'subplots=True'rZ   )	r   r1   r2   r3   r]   r^   r  r7   r   ra   s      r;   test_pie_df_errz"TestDataFramePlots.test_pie_df_err>  sg    II!!!$++F3#+

 @]]:S1 	GGKKM	 	 	s   B  B	r(  c                    t        t        j                  j                  d      j                  d      g dg d      }t	        |j
                  j                  |      }t        |j                  |j                         y )Nr!   r%  r&  r*  r-   r   )
r   r1   r2   r3   r   r7   r   r   textsr/   )r9   rY   r:   rk   s       r;   test_pie_dfzTestDataFramePlots.test_pie_dfH  sW    II!!!$++F3#+

 rww{{a0288RXX.r=   c                    t        t        j                  j                  d      j                  d      g dg d      }t	        |j
                  j                  dd      }t        |      t        |j                        k(  sJ |D ]"  }t        |j                  |j                         $ t        ||j                        D ]  \  }}|j                         |k(  rJ  y )Nr!   r%  r&  r*  r-   Tr?   )r   r1   r2   r3   r   r7   r   r   r.   r   r/  r/   r   r  )r9   r:   rI   rk   ylabels        r;   test_pie_df_subplotsz'TestDataFramePlots.test_pie_df_subplotsR  s    II!!!$++F3#+

 !GGKK

 4yC

O+++ 	3Brxx2	3dBJJ/ 	-JB==?f,,,	-r=   c                    t        t        j                  j                  d      j                  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                  |
       1 y )Nr!   r%  r&  r*  r-   r   )r  gr   r   mT)r@   rA   rR  r'  r  )r   r1   r2   r3   r   r7   r   r   r.   r   r/  r   r  )r9   r:   rR  
color_argsrI   rk   s         r;   test_pie_df_labels_colorsz,TestDataFramePlots.test_pie_df_labels_colorsc  s    II!!!$++F3#+

 +.
 GGKK
 4yC

O+++ 	=Brxx0"**<	=r=   c                    t        t        j                  j                  d      j                  d            }t	        d      D ]!  }t        j
                  |j                  ||f<   # t        j                  j                  d      \  }}ddi}t        j                  d       5   |j                  j                  dd|dd| d d d        g d}t        |      D ]  \  }}t        |      }d	||<   |j                   D 	cg c]  }	|	j#                          }
}	|
|k(  sJ |j%                         j'                         D 	cg c]  }	|	j#                          }}	|d | ||d
z   d  z   }||k(  rJ  y # 1 sw Y   xY wc c}	w c c}	w )Nr!   )r$   r$   r$   )ncols	normalizeT)rA   rk   r3  )0123r  rC   r  )r   r1   r2   r3   r   r   ilocr   r   rA   r  r  r7   r   r  r5   r/  r  r  r  )r9   r:   r  r   rI   rm   base_expectedrk   r  rX   r   result_labelsexpected_labelss                r;   test_pie_df_nanz"TestDataFramePlots.test_pie_df_nanx  st   ryy,,Q/66v>?q 	#AFFBGGAqDM	#**%%A%.4 t$''- 	GBGGKKF$tFvF	G -t_ 	4EArM*HHQK,.HH5qajjl5F5X%%%
 46==?3L3L3NOaQZZ\OMO+BQ/-A2HHO O333	4		G 	G 6 Ps   #!E0?E<?F0E9r   )r   r   r   c                 8   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	       y )
Nr  r   rL   rW   皙?皙?yerrr!   xerrrH  r1   r   r   onesr   r7   r   )r9   rm   r+  r:   d_errdf_errrk   s          r;   test_errorbar_plotz%TestDataFramePlots.test_errorbar_plot  s     ))B-biiAr&:;q\ggbkC'bggbkC.?@5! rww>V>v>Raa0r=   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	        |dz   j
                  ||dd	
      }t        |dd       y )Nr  r   rL   rW   rF  rG  rC   r   T)rH  rJ  rM  r   r!   rI  rK  )r9   r+  r:   rM  rN  rk   s         r;   test_errorbar_plot_barz)TestDataFramePlots.test_errorbar_plot_bar  s    ))B-biiAr&:;q\ggbkC'bggbkC.?@5!!VMMV%T
 	Raa0r=   c                 f   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	       y )Nr  r   rL   rW   rY   rG  rH  rC   rI  )r!   r  r!   )r1   r   r   r   r7   rL  r   r9   r+  r:   rk   s       r;   test_errorbar_plot_yerr_arrayz0TestDataFramePlots.test_errorbar_plot_yerr_array  s    ))B-biiAr&:;q\r#w||"''"+2CDRaa0rwwRWWW-=-CDRaa0r=   rH  u   誤差c                 B   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       y )Nr  r   rL   rW   rF  rS  r!   rI  rY   rX   )rY   rX   rH  rC   rK  )r9   rH  r+  r:   rk   s        r;   test_errorbar_plot_column_namez1TestDataFramePlots.test_errorbar_plot_column_name  s~     ))B-biiAr&:;q\772;$4rwwT2Raa0rww#4@Raa0r=   c                 L   t        j                  d      t        j                  ddd      d}t        |      }t        j                  t
              5  |j                  t         j                  j                  d      j                  d             d d d        y # 1 sw Y   y xY w)Nr  r   rL   rW   r!   rJ  rS  )
r1   r   r   r  external_error_raisedr  r7   r2   r3   r4   r9   r+  r:   s      r;   &test_errorbar_plot_external_valueerrorz9TestDataFramePlots.test_errorbar_plot_external_valueerror  sy    ))B-biiAr&:;q\%%j1 	GGG..q1AA"EGF	G 	G 	Gs   ?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  |j                  |       d d d        y # 1 sw Y   y xY w)Nr  r   rL   rW   zzzrS  )r1   r   r   r  rY  r  r7   )r9   r+  r:   rN  s       r;   %test_errorbar_plot_external_typeerrorz8TestDataFramePlots.test_errorbar_plot_external_typeerror  sv    ))B-biiAr&:;q\%2UGbLAB%%i0 	!GGG 	! 	! 	!s   (BB)r`   r   r  y_errr  rF  )r   rG  c                     t        t        j                  d      t        j                  ddd      d      }t        |j                  ||      }t        |dd       y )Nr  r   rL   rW   rH  rM  r!   rI  r   r1   r   r   r7   r   )r9   rM  r_  r:   rk   s        r;   !test_errorbar_plot_different_yerrz4TestDataFramePlots.test_errorbar_plot_different_yerr  sF     RYYr]2q"1EFGrwwU>Raa0r=   zy_err, x_err)rF  rF  c                     t        t        j                  d      t        j                  ddd      d      }t        |j                  |||      }t        |dd       y )Nr  r   rL   rW   )rH  rJ  rM  r!   rI  rb  )r9   rM  r_  x_errr:   rk   s         r;   &test_errorbar_plot_different_yerr_xerrz9TestDataFramePlots.test_errorbar_plot_different_yerr_xerr  sH     RYYr]2q"1EFGrwwUTJRaa0r=   c                 6   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	
       y )Nr  r   rL   rW   rF  rG  T)r@   rH  rJ  rA   rM  rC   rI  )r   r1   r   rL  r   r7   r   )r9   rM  r:   rN  rI   s        r;   /test_errorbar_plot_different_yerr_xerr_subplotszBTestDataFramePlots.test_errorbar_plot_different_yerr_xerr_subplots  s     RYYr]2q"1EFGs!2s9JKL GG
 	T2r=   zIterator is consumed)rT   r^   c           	          t        j                  d      t        j                  ddd      d}t        |      }t        |j                  t        j                  dt        |                  }t        |dd       y )	Nr  r   rL   rW   r  rS  r!   rI  )	r1   r   r   r   r7   	itertoolsrepeatr   r   rT  s       r;   test_errorbar_plot_iteratorz.TestDataFramePlots.test_errorbar_plot_iterator  sY    ))B-biiAr&:;q\ rwwY-=-=c3r7-KLRaa0r=   c                    t        t        j                  t        j                  j	                  d      j                  d                  }t        t        j                  t        j                  j	                  d      j                  d                  }t        |j                  |      }t        |dd       t        |j                  dd      }t        |dd       y )Nr!   r  rS  r   rI  rC   )rY   rH  	r   r1   absr2   r3   r4   r   r7   r   r9   r:   rN  rk   s       r;   'test_errorbar_with_integer_column_namesz:TestDataFramePlots.test_errorbar_with_integer_column_names  s    rvvbii33A6FFwOPQ266"))"7"7":"J"J7"STUrwwV4Raa0rww!!4Raa0r=   c                    t        t        j                  t        j                  j	                  d      j                  d                  }t        t        j                  t        j                  j	                  d      j                  d            ddg      }t        |j                  ||      }t        |dd       y )Nr!   re   r  r   r   ra  rI  rn  )r9   rM  r:   rN  rk   s        r;   'test_errorbar_with_partial_columns_kindz:TestDataFramePlots.test_errorbar_with_partial_columns_kind  s     rvvbii33A6FFwOPQFF299((+;;GDEPQSTv
 rwwV$?Raa0r=   c                    t        t        j                  t        j                  j	                  d      j                  d                  }t        t        j                  t        j                  j	                  d      j                  d            ddg      }t        ddd	      }|j                  |d
       |j                  |d
       t        |j                  |d      }t        |dd       y )Nr!   re   r  r   r   1/1/2000r#   MEr*   T)inplacer`   ra  rI  )r   r1   ro  r2   r3   r4   r   r   r   r7   r   )r9   r:   rN  ixrk   s        r;   &test_errorbar_with_partial_columns_dtiz9TestDataFramePlots.test_errorbar_with_partial_columns_dti#  s    rvvbii33A6FFwOPQFF299((+;;GDEPQSTv
 
BT:
R&T*rwwV&ARaa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	
       y )Nr  r   rL   rW   rF  rG  )rX   r   rS  rC   rI  rK  )r9   rz  r+  r:   errrk   s         r;   &test_errorbar_with_partial_columns_boxz9TestDataFramePlots.test_errorbar_with_partial_columns_box/  sq     ))B-biiAr&:;q\BGGBK#-BGGBK#4EFGrwwS1Raa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       y )Nr  r   rL   rW   rF  rG  ru  z1/1/2001rv  )r,   rf   ra  r!   rI  rY   rX   )rY   rH  rM  rC   T)r@   rM  rH  rA   )r1   r   rL  r   r   r   r7   r   )	r9   rM  r+  rM  rx  tdftdf_errrk   rI   s	            r;   test_errorbar_timeseriesz+TestDataFramePlots.test_errorbar_timeseries8  s6   ))B-biiAr&:;ggbkC'bggbkC.?@ 
JT:$E,sxxgDARaa0sxxe$?Raa0sxx3WS\MRaa0sxx3StDRaa0sxxgDARaa0 HH
 	T2r=   c                    t         j                  j                  d      j                  d      }t        t        j                  d      j                  dd            j                  }|j                  ||dz        }|j                  d   j                         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                  |j                         d d d        y # 1 sw Y   y xY w)Nr!   )rV   r!   ro   r;  rV   ro   )rH  rJ  rC   r   rL   zCAsymmetrical error bars should be provided with the shape (3, 2, 5)rZ   rS  )r1   r2   r3   r   r   reshapeTr7   r  	get_pathsverticesr   r  r  r  r  r]   r^   r  )r9   r~  r:   rk   yerr_0_0expected_0_0rb   s          r;   test_errorbar_asymmetricalz-TestDataFramePlots.test_errorbar_asymmetricalZ  s   ii##A&--i8 ryy},,Q2355WW#C!GW,>>!$..03<<QTB1a7|bhhAw&77
x6iiQ
 ]]:S1 	 GGG	  	  	 s   D<<Ec                 $   t        t        j                  j                  d      j                  d      t	        t
        j                  d d             }t        |j                  d       t        |j                  |       t        j                  d       5  |j                         }t        |j                        dk(  sJ t        j                  ||j                         t        |j                        dk(  sJ 	 d d d        y # 1 sw Y   y xY w)	Nr!   re   r#   rf   T)tabler   rC   )r   r1   r2   r3   r5   rh   ri   r   r7   r  r  r   tablesr   r  r  rj   s      r;   
test_tablezTestDataFramePlots.test_tablel  s    II!!!$++G4v++CR01
 	"''."'', ''- 	'Bryy>Q&&&NN2rtt$ryy>Q&&&		' 	' 	's   A%DDc                    t        t        j                  t        j                  j	                  d      j                  d            t        d      ddg      }t        t        j                  t        j                  j	                  d      j                  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	       y )Nr!   )ro   r!   ro   rX   rY   r!  rW   r   rI  )rX   rY   rJ  rC   )rX   rY   rH  )rX   rY   rJ  rH  )r   r1   ro  r2   r3   r4   r   r   r7   r   r   rp  s       r;   test_errorbar_scatterz(TestDataFramePlots.test_errorbar_scatter{  s   FF299((+;;FCD(#J

 FF299((+;;FCDqH(#J
 rww#=Raa0rww#6JRaa0rww#6JRaa0rww#6PVWRaa0r=   c                    dfd	}t        t        j                  t        j                  j	                  d      j                  d            g d      }|j                  j                  ddd	d
d      t        dd        |j                  dd        |j                  dd       |j                  j                  ddd
d      t        dd        |j                  dd       y )Nhas_xerrc           	      R   g }t        fdj                  D              }|D ]0  }t        |      r|j                  |        |j	                  |       2 |D cg c]  }|j
                  v s| }}t        |t        j                  |gt        |      z               y c c}w )Nc              3   R   K   | ]  }t        |d       s|j                     yw)FN)r   r  )r  r   has_errs     r;   r  z`TestDataFramePlots.test_errorbar_scatter_color.<locals>._check_errorbar_color.<locals>.<genexpr>  s      UA'!We:TUs   ''r  )
next
containersr   extendappendr  r   r1   r   r   )	r  r  r  r  errselrX   	err_linesrk   s	     `     r;   _check_errorbar_colorzMTestDataFramePlots.test_errorbar_scatter_color.<locals>._check_errorbar_color  s    EUUUD %#LL$LL$	%
 %*AqQ"..-@AIA)(c)n9T0UV Bs   B$0B$r!   )r#   ro   r*  r   r   r   r+  r,  r  )rX   rY   rJ  rH  r   rC   rI  )r  has_yerrr  )rX   rY   rH  r  r   )r  )
r   r1   ro  r2   r3   r4   r7   r   r   r  )r9   r  r:   rk   s      @r;   test_errorbar_scatter_colorz.TestDataFramePlots.test_errorbar_scatter_color  s    		W FF299((+;;GDE-
 WW__sc#_GRaa0bmmUJGbmmUJGWW__sc7_CRaa0bmmWjIr=   c                     t        g ddd      }t        j                  t        t        fd      5  |j                  dddd	
       d d d        y # 1 sw Y   y xY w)Nr   r$   rd  z'unknown' is not arZ   r   r   unknownr   )rX   rY   r  rM  )r   r]   r^   r  KeyErrorr7   r8   s     r;   test_scatter_unknown_colormapz0TestDataFramePlots.test_scatter_unknown_colormap  sR    YQ/0]]J19MN 	FGGcS99GE	F 	F 	Fs   AAc                    dd l m} |j                  d       t               \  }}t	        g dg dg dg dd      }d }|D ]  }|j                  ddd|d	
        |j                  |j                                 ||       |j                  d       t               \  }}t        j                  t              5  |j                  d	|d	      }d d d         ||       y # 1 sw Y   xY w)Nr   r  rC   r!   rV   r$   ro   r   r   r   r   r+  c                    | D ]7  }t        |j                        dk(  sJ t        |j                         d       9 | d   | d   fD ]:  }t        |j	                         d       t        |j	                  d      d       < | d   | d   fD ]:  }t        |j	                         d       t        |j	                  d      d       < y )	NrC   Tr|   r   r!   Fr~   rV   )r   r  r   rb  r   rI   rk   s     r;   _checkz5TestDataFramePlots.test_sharex_and_ax.<locals>._check  s     C288})))r113TBC AwQ( Nr113UCr111=uMN AwQ( Mr113TBr111=tLMr=   r   r   ru   T)rX   rY   ru   rk   sharex)rA   rk   r  )r  r   close_generate_4_axes_via_gridspecr   r7   tight_layoutr  r  r  r  r9   r  gsrI   r:   r  rk   s          r;   test_sharex_and_axz%TestDataFramePlots.test_sharex_and_ax  s     	(		%02D''''	
		M  	EBGGcSBtGD	E
	"t		%02D''4 	@77DT$7?D	@t	@ 	@s   ;C!!C*c                    dd l m} t        g dg dg dg dd      }t               \  }}|D ]  }|j	                  ddd|        |j                  |j                                |D ]o  }t        |j                        dk(  sJ t        |j                         d	
       t        |j                         d	
       t        |j                  d	      d	
       q y Nr   r  r  r   r   ru   )rX   rY   ru   rk   rC   Tr|   r~   r  r   r   r  r7   r  r  r   r  r   rb  r   r9   r  r:   r  rI   rk   s         r;   test_sharex_false_and_axz+TestDataFramePlots.test_sharex_false_and_ax  s     	(''''	
 12D 	8BGGcSBG7	8 		" 	IBrxx=A%%%2--/>2--/>2--D-94H		Ir=   c                    dd l m} t               \  }}t        g dg dg dg dd      }d }|D ]  }|j	                  ddd|d	        |j                  |j                                 ||       |j                  d
       t               \  }}t        j                  t              5  |j	                  d|d      }d d d        |j                  |j                                 ||       y # 1 sw Y   1xY w)Nr   r  r  c                 ^   | D ]T  }t        |j                        dk(  sJ t        |j                         d       t        |j                  d      d       V | d   | d   fD ]  }t        |j	                         d        | d   | d   fD ]  }t        |j	                         d        y )	NrC   Tr|   r~   r   r!   rV   F)r   r  r   r   rb  r  s     r;   r  z5TestDataFramePlots.test_sharey_and_ax.<locals>._check  s     M288})))r113TBr111=tLM AwQ( Cr113TBCAwQ( Dr113UCDr=   r   r   ru   T)rX   rY   ru   rk   r  r  )rA   rk   r  )r  r   r  r   r7   r  r  r  r  r  r  r  s          r;   test_sharey_and_axz%TestDataFramePlots.test_sharey_and_ax  s     	(02D''''	
	D  	EBGGcSBtGD	E
	"t		%02D''4 	@77DT$7?D	@ 		"t		@ 	@s   *C//C8c                    dd l m} t        g dg dg dg dd      }t               \  }}|D ]  }|j	                  ddd|        |j                  |j                                |D ]o  }t        |j                        dk(  sJ t        |j                         d	
       t        |j                         d	
       t        |j                  d	      d	
       q y r  r  r  s         r;   test_sharey_and_ax_tightz+TestDataFramePlots.test_sharey_and_ax_tight  s    '''''	
 12D 	8BGGcSBG7	8 		" 	IBrxx=A%%%2--/>2--/>2--D-94H		Ir=   c           	         t        j                  d       i }|dv rt        t        j                  j                  d      j                  d      t        j                  j                  d      j                  d      t        j                  d      t        j                  j                  d      j                  d      z   d      }ddd	}n|d
k(  rmt        t        j                  j                  d      j                  d      t        t        d      t              t        ddd            j                         }n^t        t        j                  j                  d      j                  d      t        t        d      t              t        ddd            }t        j                   |j                   dd|i|      }t"        j%                  d       t'        j(                           |       J y)z3Check that every plot type gets properly collected.rr  )r   r   r   r!   r  r  r  r   r)   rW   rA  r"   r%   r&   r(   r#   r*   r-   rM  r  Nr  )r]   rw  r   r1   r2   r3   r  r   r4   r   r5   r6   r   ro  weakrefrefr7   r  r  gccollect)r9   rM  argsr:   r  s        r;   test_memory_leakz#TestDataFramePlots.test_memory_leak3  s    	G$//..q199r9B..q199r9B2)>)>q)A)I)Ir)I)RRB 3'DV^		%%a(88Ad6l&9 rD ce	  		%%a(88Ad6l&9 rDB kk'"''4t4t45 			%


u}}r=   c                 H	  	
 ddl m	 dd lm
 t	        t
        j                  j                  d      j                  d      t        dd            }t        t
        j                  j                  d      j                  d      |j                  t        d	      
      }	
fd}	
fd} |        |       fD ]  \  }}|j                  |      }t        |j                        dk(  sJ |j                  |      }t        |j                        dk(  sJ ||fD ]U  }t!        |j#                         d       t!        |j%                         d       t!        |j%                  d      d       W 
j'                  d         |        |       fD ]  \  }}|j                  d||g      }t        |j                        dk(  sJ t        |j                        dk(  sJ |D ]U  }t!        |j#                         d       t!        |j%                         d       t!        |j%                  d      d       W 
j'                  d         |       \  }}t)        j*                  t,              5  |j                  d||gdd      }d d d        t        d   j                        dk(  sJ t        |d   j                        dk(  sJ ||fD ]  }t!        |j#                         d        t!        |d   j%                         d       t!        |d   j%                  d      d       t!        |d   j%                         d       t!        |d   j%                  d      d       
j'                  d        |       \  }}t)        j*                  t,              5  |j                  d||gdd      }d d d        t        |d   j                        dk(  sJ t        |d   j                        dk(  sJ t!        |d   j#                         d       t!        |d   j#                         d       ||fD ]:  }t!        |j%                         d       t!        |j%                  d      d       < 
j'                  d       y # 1 sw Y   xY w# 1 sw Y   xY w)Nr   gridspecr!   r#   ru  r+   rf   r  ABr!  c                      j                  dd      } j                         }|j                  | d dd d f         }|j                  | dd d f         }||fS )NrV   rC   r!   GridSpecr  r  r  r  rU  rV  r  r  s       r;   _get_vertical_gridzSTestDataFramePlots.test_df_gridspec_patterns_vert_horiz.<locals>._get_vertical_gridh  sY    ""1a(B**,C//"RaRU),C//"QT(+C8Or=   c                      j                  dd      } j                         }|j                  | d d d df         }|j                  | d d df         }||fS )NrC   rV   r!   r  r  s       r;   _get_horizontal_gridzUTestDataFramePlots.test_df_gridspec_patterns_vert_horiz.<locals>._get_horizontal_grido  sY    ""1a(B**,C//"QU),C//"QT(+C8Or=   rk   rC   Tr|   r~   r  r   rA   rk   r  r  Fr   r  r  r   r
   r1   r2   r3   r4   r   r   r/   r5   r7   r   r  r   rb  r   r  r  r  r  )r9   tsr:   r  r  rU  rV  rk   rI   r  r  s            @@r;   $test_df_gridspec_patterns_vert_horizz7TestDataFramePlots.test_df_gridspec_patterns_vert_horizX  s'   ''II!!!$44R8Z4

 II!!!$44W=((J
		 ,-/C/EF 		HC''S'/Csyy>Q&&&''S'/Csyy>Q&&&Cj Mr113TBr113TBr111=tLM IIe		 ,-/C/EF 	HC77Dc3Z78Dsyy>Q&&&syy>Q&&& Mr113TBr113TBr111=tLM IIe	 &'S''4 	S77Dc3ZT7RD	S47==!Q&&&47==!Q&&&* 	?B2--/>	? 	tAw..0%@tAw..T.:EJtAw..0$?tAw..T.:DI		% ()S''4 	S77Dc3ZT7RD	S47==!Q&&&47==!Q&&&tAw..0$?tAw..0%@* 	IB2--/>2--D-94H	I 			%7	S 	S 	S 	Ss   4R"RRR!c                 J   ddl m dd lm t	        t
        j                  j                  d      j                  d      t        dd            }fd} |       }t        t
        j                  j                  d      j                  d	      |j                  t        d
            }|j                  d|      }|D ]o  }t        |j                        dk(  sJ t!        |j#                         d       t!        |j%                         d       t!        |j%                  d      d       q j'                  d        |       }t)        j*                  t,              5  |j                  d|dd      }d d d        |D ]  }t        |j                        dk(  rJ  |d   |d   fD ]  }t!        |j#                         d        |d   |d   fD ]  }t!        |j#                         d        |d   |d   fD ]:  }t!        |j%                         d       t!        |j%                  d      d       < |d   |d   fD ]:  }t!        |j%                         d       t!        |j%                  d      d       < j'                  d       y # 1 sw Y   xY w)Nr   r  r!   r#   ru  r  rf   c                     j                  dd      } j                         }|j                  | d dd df         }|j                  | d ddf         }|j                  | dd df         }|j                  | d         }||||fS )NrV   r!   rM   r  )r  r  rU  rV  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   rC   r|   r~   r  r  rV   Fr  )r9   r  r  rI   r:   rk   r  r  s         @@r;   test_df_gridspec_patterns_boxedz2TestDataFramePlots.test_df_gridspec_patterns_boxed  ss   ''II!!!$44R8Z4
	&  II!!!$44W=((L

 www. 	IBrxx=A%%%2--/>2--/>2--D-94H	I 			%  ''4 	M77DT$t7LD	M 	&Brxx=A%%%	&7DG$ 	?B2--/>	?7DG$ 	@B2--/?	@7DG$ 	JB2--/?2--D-95I	J 7DG$ 	IB2--/>2--D-94H	I 			%	M 	Ms   %JJ"c                 v    t        t        g dg dd      t        j                  j                  ddd       y )Nr   r  rd  r   r   rW   )kws)r   r   r   PlotAccessor_dataframe_kinds)r9   s    r;   test_df_grid_settingsz(TestDataFramePlots.test_df_grid_settings  s.    II67!!22$	
r=   c                     t         j                  j                         \  }}|j                  g d       t	        t
        j                  j                  d      j                  d            j                  |       y )N)rF  rF  rF  rF  r!   r#   r  )	r   r   rA   add_axesr
   r1   r2   r3   r7   )r9   r  rk   s      r;   test_plain_axesz"TestDataFramePlots.test_plain_axes  sW     **%%'R)*ryy$$Q'..r2388B8?r=   c                 \   t        t        j                  j                  d      j	                  d      t        j                  j                  d      j	                  d      d      }t
        j                  j                         }|j                  d      }|j                  d|dddd	       y )
Nr!   r   rd  )r   r   rC   rC   r   r   r   hsv)rM  rk   rX   rY   r   r  )
r   r1   r2   r3   r4   r   r   r  r  r7   )r9   r:   r  rk   s       r;   test_plain_axes_dfz%TestDataFramePlots.test_plain_axes_df  s     YY**1-==a@YY**1-==a@
 jj!\\,'
Y2sGr=   c                    t         j                  j                         \  }}ddlm}  ||      }|j                  ddd      }t        t        j                  j                  d      j                  d            j                  |	       t        t        j                  j                  d      j                  d            j                  |	       y )
Nr   )make_axes_locatabler!  z5%g?)r  padr!   r#   r  )r   r   rA   mpl_toolkits.axes_grid1r  append_axesr
   r1   r2   r3   r7   )r9   r  rk   r  dividercaxs         r;   #test_plain_axes_make_axes_locatablez6TestDataFramePlots.test_plain_axes_make_axes_locatable  s    **%%'R?%b)!!'$!?ryy$$Q'..r2388B8?ryy$$Q'..r2388C8@r=   c                    t         j                  j                         \  }}ddlm}  ||ddd      }t        t        j                  j                  d      j                  d            j                  |	       t        t        j                  j                  d      j                  d            j                  |	       y )
Nr   )
inset_axesz30%r/  rV   )r  rU  r  r!   r#   r  )
r   r   rA   %mpl_toolkits.axes_grid1.inset_locatorr  r
   r1   r2   r3   r7   )r9   r  rk   r  iaxs        r;   test_plain_axes_make_inset_axesz2TestDataFramePlots.test_plain_axes_make_inset_axes	  s    **%%'RD5!<ryy$$Q'..r2388B8?ryy$$Q'..r2388C8@r=   method)r`   r  r   c                 J   t        t        j                  j                  d      j	                  d      t        d            j                  d       j                  d       }d	}d
dg}||dd} t        |j                  |      di |}t        |j                  |       y )Nr!   )r;  r!   r  r   c                 6    | j                   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)rx  rB  
mark_right)rI   rE  r  )r   r1   r2   r3   r4   r5   assignr   r7   r   r~  )r9   r  r:   rB  rK  rm   rk   s          r;   test_secondary_axis_font_sizez0TestDataFramePlots.test_secondary_axis_font_size	  s     		%%a(88A4PT: V.V/V+V, 	 3Z!#N%WRWWf%//Ar=   c                 l   t        g dg dg dd      }|j                  j                  d      }|j                  dd       |j	                         D cg c]  }|j                          }}t        t        ||j                                     }|d	   d
k(  sJ |d   dk(  sJ |d   dk(  sJ y c c}w )N)rV   r!   rV   )r  *      )MondayTuesday	Wednesday)salesvisitsdayr  r   rL   rV   r  r.  r  r/  r   r0  )	r   r7   rA  set_xlimr   r  rm  r   
get_xticks)r9   r:   rk   txticklabelslabels_positions         r;   test_x_string_values_ticksz-TestDataFramePlots.test_x_string_values_ticks 	  s     "&9
 WW\\E\"
B-/-?-?-ABqzz|BBs;@Ax(C///y)S000{+s222 Cs   B1c                    t        j                  ddgddgg      }t        t        j                  j                  d      j                  d      ddg|      }|j                         }|j                  d	d
       |j                         D cg c]  }|j                          }}t        t        ||j                                     }|d   dk(  sJ |d   dk(  sJ |d   dk(  sJ |d   dk(  sJ y c c}w )Nr  i  rC   r!   r  r   r)   r-   rL   r$   z	(2012, 1)r.  z	(2012, 2)r/  z	(2013, 1)r0  z	(2013, 2)r1  )r   from_productr   r1   r2   r3   r4   r7   r  r   r  rm  r   r  )r9   r/   r:   rk   r  r  r  s          r;   test_x_multiindex_values_ticksz1TestDataFramePlots.test_x_multiindex_values_ticks3	  s     ''$1v(>?II!!!$44V<#J

 WWY
B-/-?-?-ABqzz|BBs;@A{+s222{+s222{+s222{+s222 Cs   C1c                     t        ddgddg      }|j                  |      }|j                         }|d   dk  sJ |d   dkD  sJ y )Nr!   r$   rC   rf   ru  r   )r   r7   r3  )r9   rM  r:   rk   xlimss        r;   test_xlim_plot_linez&TestDataFramePlots.test_xlim_plot_lineF	  sS     1vaV,WW$WQx!||Qx!||r=   c                    t         j                  j                         \  }}g d}t        g dg dg dg dd|      }|g d   j                  j                  |d	
       |dg   j	                  |d       |j                         }|d   dk  sJ |d   dkD  sJ |j                         D cg c]  }|j                          }}||k(  sJ y c c}w )N)k1k2k3k4)i  r    r  )i  ix  r  i  )r  r  i@  i  )rC   rV   r$   rV   )s1s2s3rx  rf   )r  r  r  F)rk   rS  rx  T)rk   rx  r   rC   rV   )	r   r   rA   r   r7   r   r3  r   r  )r9   r  rk   indexesr:   r  r  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Qx!||Qx!|| .0-?-?-ABqzz|BBg%%% Cs   /Cc                 >   t        dgt              }|j                  sJ |j                         }t	        |j                               dk(  sJ |j                         d   }t	        |j                               dk(  sJ t	        |j                               dk(  sJ y )Nfoo)r.   r'   rC   r   )r   intemptyr7   r   r   r  re  )r9   r:   rk   r`   s       r;   test_plot_no_rowsz$TestDataFramePlots.test_plot_no_rowsj	  s    wc2xxxWWY2<<>"a'''||~a 4>>#$)))4>>#$)))r=   c                     t        g d      }t        j                  t        d      5  |j	                          d d d        y # 1 sw Y   y xY w)Nr   r  rZ   )r   r]   r^   r  r7   r8   s     r;   test_plot_no_numeric_dataz,TestDataFramePlots.test_plot_no_numeric_datat	  s9    ']]9,EF 	GGI	 	 	s   AA)r`   r   r  r   rt  r  rA  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	        |      }|j                  ddg|      }t        |      dk(  sJ d	d
gddgdgf}t        ||      D ]@  \  }}|dk7  rt        ||       |dk(  st        |j                        t        |      k(  r@J  y )Nrr  r#   rC   r*  )r   r,  )r   r+  rA   rM  rV   r   r,  r   r+  r   r   rv  r`   )
r]   rw  r1   r   r   r7   r   r   r   r  )r9   rM  r+  r:   rI   rC  rk   rR  s           r;   test_group_subplotz%TestDataFramePlots.test_group_subploty	  s     	G$22"2"22
 q\wwZ 8twD4yA~~:SzC59dO4 	4JBu}$R7v~288}F333		4r=   c                     t        t        d            }d}t        j                  t        |      5  |j                  dg       d d d        y # 1 sw Y   y xY w)NrC   z!An iterable subplots for a SeriesrZ   r   rA   )r
   r   r]   r^   NotImplementedErrorr7   )r9   serrb   s      r;   (test_group_subplot_series_notimplementedz;TestDataFramePlots.test_group_subplot_series_notimplemented	  sI    U1X1]].c: 	(HHvhH'	( 	( 	(s   AAc                     t        t        j                  d      t        j                  ddg            }d}t        j                  t        |      5  |j                  dg       d d d        y # 1 sw Y   y xY w)Nr!   r  r  r   z6An iterable subplots for a DataFrame with a MultiIndexrZ   r'  )	r   r1   eyer   r   r]   r^   r(  r7   ra   s      r;   ,test_group_subplot_multiindex_notimplementedz?TestDataFramePlots.test_group_subplot_multiindex_notimplemented	  s_    rvvay**@*@&&AQ*RSF]].c: 	'GGfXG&	' 	' 	's   A00A9c                     t        t        j                  d      ddg      }d}t        j                  t
        |      5  |j                  dg       d d d        y # 1 sw Y   y xY w)Nr!   r   r   z4An iterable subplots for a DataFrame with non-uniquerZ   r&  r'  )r   r1   r,  r]   r^   r(  r7   ra   s      r;   0test_group_subplot_nonunique_cols_notimplementedzCTestDataFramePlots.test_group_subplot_nonunique_cols_notimplemented	  sS    rvvay3*5D]].c: 	'GGfXG&	' 	' 	's    AA&zsubplots, expected_msg)){   z(subplots should be a bool or an iterable)r   !each entry should be a list/tuple))rC   r1  )r&  r1  c                     t        j                  d      t        j                  d      d}t        |      }t        j                  t
        |      5  |j                  |       d d d        y # 1 sw Y   y xY w)Nr#   rd  rZ   r'  r1   r   r   r]   r^   r  r7   )r9   rA   expected_msgr+  r:   s        r;   test_group_subplot_bad_inputz/TestDataFramePlots.test_group_subplot_bad_input	  sX     ))B-biim4q\]]:\: 	'GGXG&	' 	' 	's   A..A7c                     t        j                  d      t        j                  d      d}t        |      }t        j                  t
        d      5  |j                  dg       d d d        y # 1 sw Y   y xY w)Nr#   rd  z Column label\(s\) \['bad_name'\]rZ   )r   bad_namer'  r3  rZ  s      r;   &test_group_subplot_invalid_column_namez9TestDataFramePlots.test_group_subplot_invalid_column_name	  s[    ))B-biim4q\]]:-PQ 	2GG/0G1	2 	2 	2s   A//A8c                     t        j                  d      t        j                  d      t        j                  d      d}t        |      }t        j                  t
        d      5  |j                  ddg       d d d        y # 1 sw Y   y xY w)Nr#   r   zshould be in only one subplotrZ   rd  )r   r   r'  r3  rZ  s      r;   $test_group_subplot_duplicated_columnz7TestDataFramePlots.test_group_subplot_duplicated_column	  sf    ))B-biim"))B-Hq\]]:-LM 	7GGj*5G6	7 	7 	7s   &BB)rN  r   r   c                     t        j                  d      t        j                  d      d}t        |      }t        j                  t
        d      5  |j                  dg|       d d d        y # 1 sw Y   y xY w)Nr#   rd  z1When subplots is an iterable, kind must be one ofrZ   r#  r3  )r9   rM  r+  r:   s       r;   test_group_subplot_invalid_kindz2TestDataFramePlots.test_group_subplot_invalid_kind	  s`    ))B-biim4q\]]Q
 	6 GGj\G5	6 	6 	6s   A00A9z index_name, old_label, new_label)Nr  new)oldr>  r=  )Nr  r  )Nr  rC   r  )r`   rA  r   c                 h   t        ddgddggddg      }||j                  _        |j                  |      }|j	                         |k(  sJ |j                         dk(  sJ |j                  |||	      }|j                         t        |      k(  sJ |j	                         t        |      k(  sJ y )
NrC   r!   ro   Type AType Br   ru  r  )rM  r2  xlabel)r   r/   r   r7   
get_xlabelr  str)r9   rM  
index_name	old_label	new_labelr:   rk   s          r;   (test_xlabel_ylabel_dataframe_single_plotz;TestDataFramePlots.test_xlabel_ylabel_dataframe_single_plot	  s     AA'(H1EF" WW$W}})+++}}"$$$ WW$yWC}}#i.000}}#i.000r=   zxlabel, ylabel))NN)X LabelN)NY Label)rI  rJ  c                     d}d}t        ddgddgg||g      }|j                  |||||      }|j                         ||n|k(  sJ |j                         ||n|k(  sJ y )Nr@  rA  rC   r!   ro   r   )rM  rX   rY   rB  r2  )r   r7   rC  r  )r9   rM  rB  r2  xcolycolr:   rk   s           r;   'test_xlabel_ylabel_dataframe_plane_plotz:TestDataFramePlots.test_xlabel_ylabel_dataframe_plane_plot	  sy     AA'$> WW$$$vfWM}}6>4vFFF}}6>4vFFFr=   )FTc                 4   t        dg      j                  |dddg      }|j                  j                  D ]_  }|j                  j                         s|j                         dk(  sJ |j                         dk(  sJ |j                         d   dk(  r_J  y )Nr   r(  )r   rq   r&  )rx  r2  rr   rn   )	r   r7   r  rI   r   get_visibler  r  
get_yticks)r9   rx  ax_dfrk   s       r;   test_secondary_yz#TestDataFramePlots.test_secondary_y	  s    1####Cht $ 
 ,,## 	0Bxx##%}}#---{{}000}}q)R///		0r=   c           	      h   t        t        j                  j                  d      j	                  d      t        t        d      t              t        ddd      	      }t        j                  d
      5  |j                         }|j                  j                         }d d d        y # 1 sw Y   y xY w)Nr!   r"   r%   r&   r(   r#   r)   r*   r-   F)r   r1   r2   r3   r4   r   r5   r6   r   r  r  r7   r  )r9   r:   r   s      r;   test_plot_no_warningz'TestDataFramePlots.test_plot_no_warning	
  s     II!!!$44W=$v,f5\2C@

 ''. 		A		A	 	 	s   4+B((B1)NNNN)__name__
__module____qualname__r]   markslowr<   rJ   rN   rS   xfailrc   rl   parametrizery   r   r   r   r   r   r   r5   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r#  r1   r(  rf  r,  r   r   r:  r<  rB  rL  rW  rZ  r^  ra  r   r   ro  ru  rw  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  r  r$  r)  r2  r9  r<  rF  rK  rS  rZ  r]  rc  filterwarningsre  rg  rl  rp  rx  rz  r|  r~  r  r  r  r  r  r  rL  r  r  rk  r   r  r  r  r  r  r  r   r  _common_kindsr  r  r  r  r  r  r  r  r  r  r  r  stdr  r#  r-  r0  r3  r8  rD  rO  rQ  rU  rW  r[  r^  r
   rc  rf  rh  r  rl  rq  rs  ry  r  r  r  r  r  r  r  r  r  r  r  
_all_kindsr  r  r  r  r  r  r  r  r  r	  r  r  r  r  r!  r$  r*  r-  r/  r5  r8  r:  r<  rH  rN  rS  rU  r  r=   r;   r   r   6   s   [[/ / [[; ; [[; ; [[; ; [[45[[%  6% [[' ' [[[[z"z" +6!tfE		
- - [[+ +. [[1 1 [[' ' [[3 32 [[[[Xg7; 8 ; [[! ! [[']C%3Zc"3Zc"3Zc"3Zc"3Zc"3Zc"	
33 [[[[V%CD1 E 1 [[[[RLBKRLS#Jc,-Ss+,	

<
 <(
6'1
0	N [[!M3D#E//  [[],FG
> H
>	(
(N,'
  [[]RXXrzz,BC
A D
A [[s019MNsCc3<=Cc2663<	
	9	99
&2 [[Vff%56[[VaW-; . 7; [[Vff%56C 7C(  [[Vff%56H 7H [[a*[sAFGYY$ [[a*[sAFG
T
T [[a*[sAFG [[XY,>'?@H AH& [[X]D,A'BC2 D2
6 [[.  
 [[Yu6 7&	0 [[Yu6* 7*. [[*,BC [[Yu6
2 7
2 [[*,BC22.)
%"	" [[UUB,?,?$@A. B., [[Vj&%9:5 ;5#;6 [[V&7%@A5 B5 [[Ty9Q RS [[Vj&%9:[[Wy/&BC9 D ;
9 [[Yu6[[	.0UVU	 7
U4 [[V%IJ5 K5 [[Y)(DEA FA8&D.Y.
; [[[[u!t4		
1 1 [[' ' [[F F [[F F
6+6	6 [[ <=& >&"62 [[],DE4 F4'D	;,/, 2
<=@ [[C'"''//wrwwX7N1NOQQ* U. [[ RYYxrxx8("((CS:TURYYxrxx8("((?:STRYYxrxx8("((CS:TU RYYBHHbffaAq!45xrxx@S7T RYYBHHaAq!45xrxx@R7S RYYBHHaArvvq!45xrxx@S7T
	
*j
+*j
X0 [[$#J		
	5	5? [[	
77R. [[VX%:%:%H%HI! J! [[Vi%:;) <) [[VX%:%:%H%HI J [[X**889VHD. [[3Zc"US#Jc
+	
))< [[UZ3%$>? @ [[3%#(3*sCj5&/:A(+gx-@A	
99 [[^q!c3Z.@1a!Q.-QR- S-(;  [[Z$8
( 9
( [[L+&4fv&	
	7	7 [[S3(+/ ,/-"=*44 [[[[TN4(t	
1 1 [[1 1 [[1 1 [[[[Vfh%78	1 9 	1 [[G G [[! ! [[[[V%<=[[72772;$3/GBGGBK#-GBGGBK#4EFG	
1 > 1 [[[[V%<=[[ c 1c8IJKc 1c8IJK GBGGBK#%C0&s9JQT2UV	

1
 > 1
 [[[[V%<=3 > 3 [[4ZH1 I11 [[[[Vfe_51 6 1 [[	1 	1 [[[[Yi(@A1 B 1 [[V%<=3 >3B $'1,J4F&PI4&PI0 [[VX%:%:%E%EF" G"HQf3j
@HAA [[X'>?B @B"3&3& [[Vff%56 7&4*
 [[P44*('' [[ 	
''27 [[V%AB6 C6 [[*!21v	
	 [[V%<=1 >	1" [[	
 [[Vi%:;	G <	G [[]M:0 ;0 [[
 
r=   r   c                      dd l m}  t        j                  j	                  dd      }| j                  |d         }| j                  |d         }| j                  |d         }| j                  |d         }|||||gfS )Nr   r!   r  )rC   r   r  r   )r  r   r   r  r  subplot)r  r  ax_tlax_llax_trax_lrs         r;   r  r  
  sw    #			q!	$BKK4!EKK4!EKK4!EKK4!EueU+++r=   )4__doc__r   r   r  rj  r  rh   r  numpyr1   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   rw  r   r  r   r  r  r=   r;   <module>rv     s    % 
  	     ) ) / 
 
 
      4f,'f-.^' ^'BO	,r=   