§
    tŠtjÎD  ã                  ó  — d Z ddlmZ ddlmZ ddlZddlmZ ddl	Z
ddl	mZ ddlmZ erddlmZ ddlmZ d*d
„Zd*d„Zd„ Zd+d„Zd+d,d„Zd„ Zd-d„Zd„ Zd.d„Zd/d„Zd-d„Zd0d„Zd1d„Z	 d*d„Z d2d „Z!d3d"„Z"d#„ Z#d$„ Z$d4d%„Z%d5d'„Z&d(„ Z'd)„ Z(dS )6zF
Module consolidating common testing functions for checking plotting.
é    )Úannotations)ÚTYPE_CHECKINGN)Úis_list_like)ÚSeries)ÚSequence©ÚAxesTc                ó  — |r|€t          d¦  «        ‚t          | ¦  «        } | D ]e}|rK|                     ¦   «         €J ‚t          |                     ¦   «                              ¦   «         |¦  «         ŒO|                     ¦   «         �J ‚ŒfdS )a)  
    Check each axes has expected legend labels

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like
    labels : list-like
        expected legend labels
    visible : bool
        expected legend visibility. labels are checked only when visible is
        True
    Nz-labels must be specified when visible is True)Ú
ValueErrorÚ_flatten_visibleÚ
get_legendÚ_check_text_labelsÚ	get_texts)ÚaxesÚlabelsÚvisibleÚaxs       úZ/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pandas/tests/plotting/common.pyÚ_check_legend_labelsr      s    € ð ð J�F�NÝÐHÑIÔIÐIÝ˜DÑ!Ô!€DØð +ð +ˆØð 	+Ø—=’=‘?”?Ð.Ð.Ð.Ý˜rŸ}š}™œ×8Ò8Ñ:Ô:¸FÑCÔCÐCÐCà—=’=‘?”?Ð*Ð*Ð*Ð*ð+ð +ó    c                ó¶   — |r|€t          d¦  «        ‚|r-|                      ¦   «         \  }}d„ |D ¦   «         }||k    sJ ‚dS |                      ¦   «         �J ‚dS )a  
    Check ax has expected legend markers

    Parameters
    ----------
    ax : matplotlib Axes object
    expected_markers : list-like
        expected legend markers
    visible : bool
        expected legend visibility. labels are checked only when visible is
        True
    Nz.Markers must be specified when visible is Truec                ó6   — g | ]}|                      ¦   «         ‘ŒS © )Ú
get_marker)Ú.0Úhandles     r   ú
<listcomp>z(_check_legend_marker.<locals>.<listcomp>@   s$   € Ð=Ð=Ð=¨6�6×$Ò$Ñ&Ô&Ð=Ð=Ð=r   )r   Úget_legend_handles_labelsr   )r   Úexpected_markersr   ÚhandlesÚ_Úmarkerss         r   Ú_check_legend_markerr#   /   s„   € ð ð KÐ$Ð,ÝÐIÑJÔJÐJØð 'Ø×1Ò1Ñ3Ô3‰
ˆ�Ø=Ð=°WÐ=Ñ=Ô=ˆØÐ*Ò*Ð*Ð*Ð*Ð*Ð*à�}Š}‰ŒÐ&Ð&Ð&Ð&Ð&r   c                óD  — |                       ¦   «         }|                      ¦   «         }t          |¦  «        t          |¦  «        k    sJ ‚t          ||d¬¦  «        D ]B\  }}|                     ¦   «         }|                     ¦   «         }t	          j        ||¦  «         ŒCdS )zŒ
    Check each axes has identical lines

    Parameters
    ----------
    xp : matplotlib Axes object
    rs : matplotlib Axes object
    T©ÚstrictN)Ú	get_linesÚlenÚzipÚ
get_xydataÚtmÚassert_almost_equal)ÚxpÚrsÚxp_linesÚrs_linesÚxplÚrslÚxpdataÚrsdatas           r   Ú_check_datar5   F   s›   € ð �|Š|‰~Œ~€HØ�|Š|‰~Œ~€Håˆx‰=Œ=�C ™MœMÒ)Ð)Ð)Ð)Ý˜ (°4Ð8Ñ8Ô8ð /ð /‰ˆˆSØ—’Ñ!Ô!ˆØ—’Ñ!Ô!ˆÝ
Ô˜v vÑ.Ô.Ð.Ð.ð/ð /r   c                ó”   — ddl m} t          | |¦  «        st          | ¦  «        s| g} | D ]}|                     ¦   «         |k    sJ ‚ŒdS )zà
    Check each artist is visible or not

    Parameters
    ----------
    collections : matplotlib Artist or its list-like
        target Artist or its list or collection
    visible : bool
        expected visibility
    r   )Ú
CollectionN)Úmatplotlib.collectionsr7   Ú
isinstancer   Úget_visible)Úcollectionsr   r7   Úpatchs       r   Ú_check_visibler=   Y   sw   € ð 2Ð1Ð1Ð1Ð1Ð1å�k :Ñ.Ô.ð $µ|ÀKÑ7PÔ7Pð $Ø"�mˆàð .ð .ˆØ× Ò Ñ"Ô" gÒ-Ð-Ð-Ð-Ð-ð.ð .r   r   úAxes | Sequence[Axes]ÚfilledÚboolÚreturnÚNonec                ó\   — t          | ¦  «        } | D ]}|j        D ]}|j        |k    sJ ‚ŒŒdS )z¹
    Check for each artist whether it is filled or not

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like
    filled : bool
        expected filling
    N)r   ÚpatchesÚfill)r   r?   r   r<   s       r   Ú_check_patches_all_filledrF   m   sV   € õ ˜DÑ!Ô!€DØð (ð (ˆØ”Zð 	(ð 	(ˆEØ”: Ò'Ð'Ð'Ð'Ð'ð	(ð(ð (r   c                óŒ   ‡— |                       ¦   «         }t          t          ||¦  «        ¦  «        Šˆfd„| j        D ¦   «         S )Nc                ó    •— g | ]
}‰|         ‘ŒS r   r   )r   ÚvÚmappeds     €r   r   z&_get_colors_mapped.<locals>.<listcomp>ƒ   s   ø€ Ð-Ð-Ð-˜!ˆF�1ŒIÐ-Ð-Ð-r   )ÚuniqueÚdictr)   Úvalues)ÚseriesÚcolorsrK   rJ   s      @r   Ú_get_colors_mappedrP   ~   sE   ø€ Ø�]Š]‰_Œ_€Fõ •#�f˜fÑ%Ô%Ñ&Ô&€FØ-Ð-Ð-Ð-˜vœ}Ð-Ñ-Ô-Ð-r   c                ó.  — ddl m} ddlm}m}m} ddlm} |j        }	|��|�'t          ||¦  «        }|dt          | ¦  «        …         }t          | ¦  «        t          |¦  «        k    sJ ‚t          | |d¬¦  «        D ]ª\  }
}t          |
|¦  «        r*|
                     ¦   «         }|	                     |¦  «        }nNt          |
||f¦  «        r(t          |
                     ¦   «         d         ¦  «        }n|
                     ¦   «         }|	                     |¦  «        }||k    sJ ‚Œ«|�è|�'t          ||¦  «        }|dt          | ¦  «        …         }t          | ¦  «        t          |¦  «        k    sJ ‚t          | |d¬¦  «        D ]Œ\  }
}t          |
|¦  «        r|
                     ¦   «         d         }n|
                     ¦   «         }t          |t$          j        ¦  «        rt          |¦  «        }|	                     |¦  «        }||k    sJ ‚Œ‹dS dS )aÿ  
    Check each artist has expected line colors and face colors

    Parameters
    ----------
    collections : list-like
        list or collection of target artist
    linecolors : list-like which has the same length as collections
        list of expected line colors
    facecolors : list-like which has the same length as collections
        list of expected face colors
    mapping : Series
        Series used for color grouping key
        used for andrew_curves, parallel_coordinates, radviz test
    r   )rO   )r7   ÚLineCollectionÚPolyCollection)ÚLine2DNTr%   )Ú
matplotlibrO   r8   r7   rR   rS   Úmatplotlib.linesrT   ÚColorConverterrP   r(   r)   r9   Ú	get_colorÚto_rgbaÚtupleÚget_edgecolorÚget_facecolorÚnpÚndarray)r;   Ú
linecolorsÚ
facecolorsÚmappingrO   r7   rR   rS   rT   Úconvr<   ÚcolorÚresultÚexpecteds                 r   Ú_check_colorsrf   †   s~  € ð  "Ð!Ð!Ð!Ð!Ð!ðð ð ð ð ð ð ð ð ð ð
 (Ð'Ð'Ð'Ð'Ð'àÔ €DØÑØÐÝ+¨G°ZÑ@Ô@ˆJØ#Ð$6¥c¨+Ñ&6Ô&6Ð$6Ô7ˆJå�;ÑÔ¥3 z¡?¤?Ò2Ð2Ð2Ð2Ý ¨ZÀÐEÑEÔEð 	&ð 	&‰LˆE�5Ý˜% Ñ(Ô(ð /ØŸšÑ*Ô*�àŸš fÑ-Ô-��Ý˜E N°NÐ#CÑDÔDð /Ý˜u×2Ò2Ñ4Ô4°QÔ7Ñ8Ô8��à×,Ò,Ñ.Ô.�à—|’| EÑ*Ô*ˆHØ˜XÒ%Ð%Ð%Ð%Ð%àÐØÐÝ+¨G°ZÑ@Ô@ˆJØ#Ð$6¥c¨+Ñ&6Ô&6Ð$6Ô7ˆJå�;ÑÔ¥3 z¡?¤?Ò2Ð2Ð2Ð2Ý ¨ZÀÐEÑEÔEð 	&ð 	&‰LˆE�5Ý˜% Ñ,Ô,ð /à×,Ò,Ñ.Ô.¨qÔ1��à×,Ò,Ñ.Ô.�å˜&¥"¤*Ñ-Ô-ð 'Ý˜v™œ�à—|’| EÑ*Ô*ˆHØ˜XÒ%Ð%Ð%Ð%Ð%ð# Ðð	&ð 	&r   c                óø   — t          | ¦  «        s|                      ¦   «         |k    sJ ‚dS d„ | D ¦   «         }t          |¦  «        t          |¦  «        k    sJ ‚t          ||d¬¦  «        D ]\  }}||k    sJ ‚ŒdS )a  
    Check each text has expected labels

    Parameters
    ----------
    texts : matplotlib Text object, or its list-like
        target text, or its list
    expected : str or list-like which has the same length as texts
        expected text label, or its list
    c                ó6   — g | ]}|                      ¦   «         ‘ŒS r   )Úget_text)r   Úts     r   r   z&_check_text_labels.<locals>.<listcomp>Ô   s    € Ð.Ð.Ð. 1�!—*’*‘,”,Ð.Ð.Ð.r   Tr%   N)r   ri   r(   r)   )Útextsre   r   ÚlabelÚes        r   r   r   Æ   s    € õ ˜ÑÔð Ø�~Š~ÑÔ 8Ò+Ð+Ð+Ð+Ð+Ð+à.Ð.¨Ð.Ñ.Ô.ˆÝ�6‰{Œ{�c (™mœmÒ+Ð+Ð+Ð+Ý˜F H°TÐ:Ñ:Ô:ð 	ð 	‰HˆE�1Ø˜A’:�:�:�:�:ð	ð 	r   c                óF  — ddl m} t          | ¦  «        } | D �]‡}|€|�¾t          |j                             ¦   «         |¦  «        r|                     ¦   «         }n+|                     ¦   «         |                     d¬¦  «        z   }|D ]T}|�'t          j        | 	                    ¦   «         |¦  «         |�'t          j        | 
                    ¦   «         |¦  «         ŒU|€|�¾t          |j                             ¦   «         |¦  «        r|                     ¦   «         }n+|                     ¦   «         |                     d¬¦  «        z   }|D ]T}|�'t          j        | 	                    ¦   «         |¦  «         |�'t          j        | 
                    ¦   «         |¦  «         ŒU�Œ‰dS )ac  
    Check each axes has expected tick properties

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like
    xlabelsize : number
        expected xticks font size
    xrot : number
        expected xticks rotation
    ylabelsize : number
        expected yticks font size
    yrot : number
        expected yticks rotation
    r   )ÚNullFormatterNT)Úminor)Úmatplotlib.tickerro   r   r9   ÚxaxisÚget_minor_formatterÚget_xticklabelsr+   r,   Úget_fontsizeÚget_rotationÚyaxisÚget_yticklabels)	r   Ú
xlabelsizeÚxrotÚ
ylabelsizeÚyrotro   r   r   rl   s	            r   Ú_check_ticks_propsr}   Ú   sÇ  € ð  0Ð/Ð/Ð/Ð/Ð/å˜DÑ!Ô!€DØð Gñ GˆØÐ! TÐ%5Ý˜"œ(×6Ò6Ñ8Ô8¸-ÑHÔHð Oð ×+Ò+Ñ-Ô-��à×+Ò+Ñ-Ô-°×0BÒ0BÈÐ0BÑ0NÔ0NÑN�àð Gð G�ØÐ)ÝÔ*¨5×+=Ò+=Ñ+?Ô+?ÀÑLÔLÐLØÐ#ÝÔ*¨5×+=Ò+=Ñ+?Ô+?ÀÑFÔFÐFøàÐ! TÐ%5Ý˜"œ(×6Ò6Ñ8Ô8¸-ÑHÔHð OØ×+Ò+Ñ-Ô-��à×+Ò+Ñ-Ô-°×0BÒ0BÈÐ0BÑ0NÔ0NÑN�àð Gð G�ØÐ)ÝÔ*¨5×+=Ò+=Ñ+?Ô+?ÀÑLÔLÐLØÐ#ÝÔ*¨5×+=Ò+=Ñ+?Ô+?ÀÑFÔFÐFøùð3Gð Gr   Úlinearc                óª   — t          | ¦  «        } | D ]@}|j                             ¦   «         |k    sJ ‚|j                             ¦   «         |k    sJ ‚ŒAdS )zö
    Check each axes has expected scales

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like
    xaxis : {'linear', 'log'}
        expected xaxis scale
    yaxis : {'linear', 'log'}
        expected yaxis scale
    N)r   rr   Ú	get_scalerw   )r   rr   rw   r   s       r   Ú_check_ax_scalesr�   	  sk   € õ ˜DÑ!Ô!€DØð -ð -ˆØŒx×!Ò!Ñ#Ô# uÒ,Ð,Ð,Ð,ØŒx×!Ò!Ñ#Ô# uÒ,Ð,Ð,Ð,Ð,ð-ð -r   c                óÒ  — ddl m} |€d}t          | ¦  «        }|�At          |¦  «        |k    sJ ‚|D ])}t          |                     ¦   «         ¦  «        dk    sJ ‚Œ*|�¸t          ¦   «         }t          ¦   «         } || ¦  «        D ]j}|                     ¦   «                              ¦   «         }	|                     |	d         d         ¦  «         |                     |	d         d         ¦  «         Œkt          |¦  «        t          |¦  «        f}
|
|k    sJ ‚t          j
        |d         j                             ¦   «         t          j        |t          j        ¬¦  «        ¦  «         dS )až  
    Check expected number of axes is drawn in expected layout

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like
    axes_num : number
        expected number of axes. Unnecessary axes should be set to
        invisible.
    layout : tuple
        expected layout, (expected number of rows , columns)
    figsize : tuple
        expected figsize. default is matplotlib default
    r   ©Úflatten_axesN)gš™™™™™@g333333@é   )Údtype)Ú!pandas.plotting._matplotlib.toolsr„   r   r(   Úget_childrenÚsetÚget_positionÚ
get_pointsÚaddr+   Úassert_numpy_array_equalÚfigureÚget_size_inchesr]   ÚarrayÚfloat64)r   Úaxes_numÚlayoutÚfigsizer„   Úvisible_axesr   Úx_setÚy_setÚpointsrd   s              r   Ú_check_axes_shaper™     st  € ð ?Ð>Ð>Ð>Ð>Ð>à€ØˆÝ# DÑ)Ô)€LàÐÝ�<Ñ Ô  HÒ,Ð,Ð,Ð,Øð 	.ð 	.ˆBå�r—’Ñ(Ô(Ñ)Ô)¨AÒ-Ð-Ð-Ð-Ð-àÐÝ‘”ˆÝ‘”ˆØ�,˜tÑ$Ô$ð 	$ð 	$ˆBà—_’_Ñ&Ô&×1Ò1Ñ3Ô3ˆFØ�IŠI�f˜Q”i ”lÑ#Ô#Ð#Ø�IŠI�f˜Q”i ”lÑ#Ô#Ð#Ð#Ý�e‘*”*�c %™jœjÐ)ˆØ˜ÒÐÐÐåÔØ�QŒÔ×.Ò.Ñ0Ô0Ý
Œ�¥¤
Ð+Ñ+Ô+ñô ð ð ð r   úSequence[Axes]c                ó@   — ddl m}  || ¦  «        }d„ |D ¦   «         } | S )zƒ
    Flatten axes, and filter only visible

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like

    r   rƒ   c                ó:   — g | ]}|                      ¦   «         ¯|‘ŒS r   )r:   )r   r   s     r   r   z$_flatten_visible.<locals>.<listcomp>S  s'   € Ð:Ð:Ð:�2¨¯ªÑ)9Ô)9Ð:ˆBÐ:Ð:Ð:r   )r‡   r„   )r   r„   Úaxes_ndarrays      r   r   r   G  s=   € ð ?Ð>Ð>Ð>Ð>Ð>à�< Ñ%Ô%€LØ:Ð:˜Ð:Ñ:Ô:€DØ€Kr   c                óÎ   — t          | ¦  «        } | D ]R}|j        }d}d}|D ]2}t          |dd¦  «        }t          |dd¦  «        }	|r|dz  }|	r|dz  }Œ3||k    sJ ‚||k    sJ ‚ŒSdS )zø
    Check axes has expected number of errorbars

    Parameters
    ----------
    axes : matplotlib Axes object, or its list-like
    xerr : number
        expected number of x errorbar
    yerr : number
        expected number of y errorbar
    r   Úhas_xerrFÚhas_yerrr…   N)r   Ú
containersÚgetattr)
r   ÚxerrÚyerrr   r¡   Ú
xerr_countÚ
yerr_countÚcrŸ   r    s
             r   Ú_check_has_errorbarsr¨   W  s´   € õ ˜DÑ!Ô!€DØð "ð "ˆØ”]ˆ
Øˆ
Øˆ
Øð 	 ð 	 ˆAÝ˜q *¨eÑ4Ô4ˆHÝ˜q *¨eÑ4Ô4ˆHØð  Ø˜a‘�
Øð  Ø˜a‘�
øØ�zÒ!Ð!Ð!Ð!Ø�zÒ!Ð!Ð!Ð!Ð!ð"ð "r   c                óª  — ddl m} t          |t          dœ}|€Y|€d}t	          | ||         ¦  «        sJ ‚|dk    r3t	          | j        |¦  «        sJ ‚t	          | j        t          ¦  «        sJ ‚dS dS |€&t          | ¦  «        D ]}t	          ||¦  «        sJ ‚ŒdS t	          | t          ¦  «        sJ ‚t          |  
                    ¦   «         ¦  «        t          |¦  «        k    sJ ‚|                      ¦   «         D ]Ù\  }}t	          |||         ¦  «        sJ ‚|dk    r|r|                     ¦   «         |k    sJ ‚Œ@|dk    rU|r|j                             ¦   «         |k    sJ ‚t	          |j        |¦  «        sJ ‚t	          |j        t          ¦  «        sJ ‚Œ›|dk    r2|d         d         }	|	j        }
|r|
                     ¦   «         |k    sJ ‚ŒÓt          ‚dS )	a<  
    Check box returned type is correct

    Parameters
    ----------
    returned : object to be tested, returned from boxplot
    return_type : str
        return_type passed to boxplot
    expected_keys : list-like, optional
        group labels in subplot case. If not passed,
        the function checks assuming boxplot uses single ax
    check_ax_title : bool
        Whether to check the ax.title is the same as expected_key
        Intended to be checked by calling from ``boxplot``.
        Normal ``plot`` doesn't attach ``ax.title``, it must be disabled.
    r   r   )rL   r   ÚbothNrL   rª   r   Úmedians)Úmatplotlib.axesr	   rL   rZ   r9   r   Úlinesr   r   ÚsortedÚkeysÚitemsÚ	get_titler   ÚAssertionError)ÚreturnedÚreturn_typeÚexpected_keysÚcheck_ax_titler	   ÚtypesÚrÚkeyÚvalueÚliner   s              r   Ú_check_box_return_typer¼   s  s7  € ð& %Ð$Ð$Ð$Ð$Ð$å 4µÐ7Ð7€EØÐàÐØ ˆKå˜( E¨+Ô$6Ñ7Ô7Ð7Ð7Ð7Ø˜&Ò Ð Ý˜hœk¨4Ñ0Ô0Ð0Ð0Ð0Ý˜hœn­dÑ3Ô3Ð3Ð3Ð3ð !Ð à3Ð3ð ÐÝ% hÑ/Ô/ð +ð +�Ý! ! TÑ*Ô*Ð*Ð*Ð*Ð*ØˆFå˜(¥FÑ+Ô+Ð+Ð+Ð+å�h—m’m‘o”oÑ&Ô&­&°Ñ*?Ô*?Ò?Ð?Ð?Ð?Ø"Ÿ.š.Ñ*Ô*ð 	%ð 	%‰JˆC�Ý˜e U¨;Ô%7Ñ8Ô8Ð8Ð8Ð8à˜fÒ$Ð$Ø!ð 4Ø Ÿ?š?Ñ,Ô,°Ò3Ð3Ð3Ð3øØ Ò&Ð&Ø!ð 7Ø œ8×-Ò-Ñ/Ô/°3Ò6Ð6Ð6Ð6Ý! %¤(¨DÑ1Ô1Ð1Ð1Ð1Ý! %¤+­tÑ4Ô4Ð4Ð4Ð4Ð4Ø Ò&Ð&Ø˜YÔ'¨Ô*�Ø”y�Ø!ð 3ØŸ>š>Ñ+Ô+¨sÒ2Ð2Ð2Ð2øå$Ð$ð#	%ð 	%r   c                ó   ‡— dd l Šˆfd„}|€i }d}|D �]ù}‰j                             ddt          |¦  «        z  |¦  «         |dz  }‰                     dd¬¦  «          | j        dd|i|¤Ž  |¦   «         rJ ‚‰j                             ¦   «          ‰j                             ddt          |¦  «        z  |¦  «         |dz  }‰                     dd	¬¦  «          | j        d|dd
œ|¤Ž  |¦   «         rJ ‚‰j                             ¦   «          |dvrù‰j                             ddt          |¦  «        z  |¦  «         |dz  }‰                     dd	¬¦  «          | j        dd|i|¤Ž  |¦   «         sJ ‚‰j                             ¦   «          ‰j                             ddt          |¦  «        z  |¦  «         |dz  }‰                     dd¬¦  «          | j        d|d	d
œ|¤Ž  |¦   «         sJ ‚‰j                             ¦   «          �Œûd S )Nr   c                 ó2  •— ‰j                              ¦   «         j                             ¦   «         } ‰j                              ¦   «         j                             ¦   «         }t          d„ | D ¦   «         ¦  «        }t          d„ |D ¦   «         ¦  «        }|o| S )Nc              3  óJ   K  — | ]}|j                              ¦   «          V — Œd S ©N©Úgridliner:   ©r   Úgs     r   ú	<genexpr>z;_check_grid_settings.<locals>.is_grid_on.<locals>.<genexpr>¸  ó3   è è € Ð@Ð@°A�q”z×-Ò-Ñ/Ô/Ð/Ð@Ð@Ð@Ð@Ð@Ð@r   c              3  óJ   K  — | ]}|j                              ¦   «          V — Œd S rÀ   rÁ   rÃ   s     r   rÅ   z;_check_grid_settings.<locals>.is_grid_on.<locals>.<genexpr>¹  rÆ   r   )ÚpyplotÚgcarr   Úget_major_ticksrw   Úall)ÚxticksÚyticksÚxoffÚyoffÚmpls       €r   Ú
is_grid_onz(_check_grid_settings.<locals>.is_grid_onµ  sˆ   ø€ Ø”—’Ñ!Ô!Ô'×7Ò7Ñ9Ô9ˆØ”—’Ñ!Ô!Ô'×7Ò7Ñ9Ô9ˆÝÐ@Ð@¸Ð@Ñ@Ô@Ñ@Ô@ˆÝÐ@Ð@¸Ð@Ñ@Ô@Ñ@Ô@ˆà�M˜TÐ"Ð"r   r…   é   r   F)ÚgridÚkindT)rÔ   rÓ   )ÚpieÚhexbinÚscatterr   )rU   rÈ   Úsubplotr(   ÚrcÚplotÚclf)ÚobjÚkindsÚkwsrÑ   ÚspndxrÔ   rÐ   s         @r   Ú_check_grid_settingsrà   °  ss  ø€ ð ÐÐÐð#ð #ð #ð #ð #ð €{ØˆØ€EØð ñ ˆØŒ
×Ò˜1˜a¥# e¡*¤*™n¨eÑ4Ô4Ð4Ø�‰
ˆØ�Šˆv˜EˆÑ"Ô"Ð"ØˆŒÐ"Ð"�dÐ"˜cÐ"Ð"Ð"Ø�:‘<”<ÐÐÐØŒ
�ŠÑÔÐàŒ
×Ò˜1˜a¥# e¡*¤*™n¨eÑ4Ô4Ð4Ø�‰
ˆØ�Šˆv˜DˆÑ!Ô!Ð!ØˆŒÐ.�d Ð.Ð.¨#Ð.Ð.Ð.Ø�:‘<”<ÐÐÐØŒ
�ŠÑÔÐàÐ3Ð3Ð3ØŒJ×Ò˜q !¥c¨%¡j¤j¡.°%Ñ8Ô8Ð8Ø�Q‰JˆEØ�FŠF�6 ˆFÑ%Ô%Ð%ØˆCŒHÐ&Ð&˜$Ð& #Ð&Ð&Ð&Ø�:‘<”<ÐÐ�<ØŒJ�NŠNÑÔÐàŒJ×Ò˜q !¥c¨%¡j¤j¡.°%Ñ8Ô8Ð8Ø�Q‰JˆEØ�FŠF�6 ˆFÑ&Ô&Ð&ØˆCŒHÐ1˜$ TÐ1Ð1¨SÐ1Ð1Ð1Ø�:‘<”<ÐÐ�<ØŒJ�NŠNÑÔÐùð9ð r   rc   c                ó,   ‡— ˆfd„| d         D ¦   «         S )zL
    Auxiliary function for correctly unpacking cycler after MPL >= 1.5
    c                ó    •— g | ]
}|‰         ‘ŒS r   r   )r   rI   Úfields     €r   r   z"_unpack_cycler.<locals>.<listcomp>ã  s   ø€ Ð:Ð:Ð:˜ˆAˆeŒHÐ:Ð:Ð:r   zaxes.prop_cycler   )ÚrcParamsrã   s    `r   Ú_unpack_cyclerrå   ß  s%   ø€ ð ;Ð:Ð:Ð:˜hÐ'8Ô9Ð:Ñ:Ô:Ð:r   c                ó   — | j         d         S )NÚx©Ú_shared_axes©r   s    r   Ú
get_x_axisrë   æ  ó   € ØŒ?˜3ÔÐr   c                ó   — | j         d         S )NÚyrè   rê   s    r   Ú
get_y_axisrï   ê  rì   r   c                ó¸  — ddl m} ddlm} t	          | t
          t          j        f¦  «        rnt	          | t
          ¦  «        r| j        } |  	                    d¦  «        D ]:}dt          |¦  «        j        ›�}t	          ||t          f¦  «        s
J |¦   «         ‚Œ;d S dt          | ¦  «        j        ›�}t	          | |t          t          f¦  «        s
J |¦   «         ‚d S )Nr   )ÚArtistr   éÿÿÿÿzBone of 'objs' is not a matplotlib Axes instance, type encountered zoobjs is neither an ndarray of Artist instances nor a single ArtistArtist instance, tuple, or dict, 'objs' is a )Úmatplotlib.artistrñ   r¬   r	   r9   r   r]   r^   Ú_valuesÚreshapeÚtypeÚ__name__rL   rZ   )Úobjsrñ   r	   ÚelÚmsgs        r   Ú"assert_is_valid_plot_return_objectrû   î  s  € Ø(Ð(Ð(Ð(Ð(Ð(Ø$Ð$Ð$Ð$Ð$Ð$å�$�¥¤Ð,Ñ-Ô-ð <Ý�d�FÑ#Ô#ð 	 Ø”<ˆDØ—,’,˜rÑ"Ô"ð 	5ð 	5ˆBð:Ý$(¨¡H¤HÔ$5ð:ð :ð õ ˜b 4­ ,Ñ/Ô/Ð4Ð4°Ñ4Ô4Ð/Ð4ð	5ð 	5ð'å�D‰zŒzÔ"ð'ð 'ð 	õ
 ˜$ ­µÐ 5Ñ6Ô6Ð;Ð;¸Ñ;Ô;Ð6Ð;Ð;r   Fc                óè   — ddl m} |rt          }nt          }d}|                     d|                     ¦   «         ¦  «        }|                     ¦   «           || |fi |¤ŽD ]}t          |¦  «         Œ|S )a×  
    Create plot and ensure that plot return object is valid.

    Parameters
    ----------
    f : func
        Plotting function.
    default_axes : bool, optional
        If False (default):
            - If `ax` not in `kwargs`, then create subplot(211) and plot there
            - Create new subplot(212) and plot there as well
            - Mind special corner case for bootstrap_plot (see `_gen_two_subplots`)
        If True:
            - Simply run plotting function with kwargs provided
            - All required axes instances will be created automatically
            - It is recommended to use it when the plotting function
            creates multiple axes itself. It helps avoid warnings like
            'UserWarning: To output multiple subplots,
            the figure containing the passed axes is being cleared'
    **kwargs
        Keyword arguments passed to the plotting function.

    Returns
    -------
    Plot object returned by the last plotting.
    r   NrŽ   )Úmatplotlib.pyplotrÈ   Ú_gen_default_plotÚ_gen_two_subplotsÚgetÚgcfrÛ   rû   )ÚfÚdefault_axesÚkwargsÚpltÚ	gen_plotsÚretÚfigs          r   Ú_check_plot_worksr	    s�   € ð6 $Ð#Ð#Ð#Ð#Ð#àð &Ý%ˆ	ˆ	å%ˆ	à
€CØ
�*Š*�X˜sŸwšw™yœyÑ
)Ô
)€CØ‡G‚G�I„I€Iàˆy˜˜CÐ*Ð* 6Ð*Ð*ð 0ð 0ˆÝ*¨3Ñ/Ô/Ð/Ð/à€Jr   c              +  ó   K  —  | di |¤ŽV — dS )z'
    Create plot in a default way.
    Nr   r   ©r  r  r  s      r   rþ   rþ   0  s&   è è € ð ˆ!ˆ+ˆ+ˆfˆ+ˆ+ÐÐÐÐÐr   c              +  óÈ   K  — d|vr|                      d¦  «          | di |¤ŽV — | t          j        j        u rd|vsJ ‚n|                      d¦  «        |d<    | di |¤ŽV — dS )z9
    Create plot on two subplots forcefully created.
    r   éÓ   éÔ   Nr   )Úadd_subplotÚpdÚplottingÚbootstrap_plotr  s      r   rÿ   rÿ   7  s”   è è € ð �6ÐÐØ�Š˜ÑÔÐØ
ˆ!ˆ+ˆ+ˆfˆ+ˆ+ÐÐÐà�BŒKÔ&Ð&Ð&Ø˜6Ð!Ð!Ð!Ð!Ð!à—’ sÑ+Ô+ˆˆt‰Ø
ˆ!ˆ+ˆ+ˆfˆ+ˆ+ÐÐÐÐÐr   )NT)T)r   r>   r?   r@   rA   rB   )NNN)NNNN)r~   r~   )r   r>   rA   rš   )r   r   rÀ   )rc   )rA   rB   )F))Ú__doc__Ú
__future__r   Útypingr   Únumpyr]   Úpandas.core.dtypes.apir   Úpandasr  r   Úpandas._testingÚ_testingr+   Úcollections.abcr   r¬   r	   r   r#   r5   r=   rF   rP   rf   r   r}   r�   r™   r   r¨   r¼   rà   rå   rë   rï   rû   r	  rþ   rÿ   r   r   r   ú<module>r     sc  ððð ð #Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð à /Ð /Ð /Ð /Ð /Ð /à Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð àð %Ø(Ð(Ð(Ð(Ð(Ð(à$Ð$Ð$Ð$Ð$Ð$ð+ð +ð +ð +ð0'ð 'ð 'ð 'ð./ð /ð /ð&.ð .ð .ð .ð((ð (ð (ð (ð (ð".ð .ð .ð=&ð =&ð =&ð =&ð@ð ð ð(,Gð ,Gð ,Gð ,Gð^-ð -ð -ð -ð$)ð )ð )ð )ðXð ð ð ð "ð "ð "ð "ð: ?Cð:%ð :%ð :%ð :%ðz,ð ,ð ,ð ,ð^;ð ;ð ;ð ;ð ð  ð  ð ð  ð  ð<ð <ð <ð <ð,)ð )ð )ð )ðXð ð ðð ð ð ð r   