§
    ªöÉgçA  ã                  ó  — 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d/d„Zd0d„Z	 d)d„Z i fd „Z!d1d"„Z"d#„ Z#d$„ Z$d2d&„Z%d'„ Z&d(„ Z'dS )3zF
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       úh/var/www/html/nodeJS/PythonScripts/venv3.11/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                óv  — ddl m} |                      ¦   «         }|                     ¦   «         }t          |¦  «        t          |¦  «        k    sJ ‚t	          ||¦  «        D ]B\  }}|                     ¦   «         }|                     ¦   «         }t          j        ||¦  «         ŒC|                     d¦  «         dS )zŒ
    Check each axes has identical lines

    Parameters
    ----------
    xp : matplotlib Axes object
    rs : matplotlib Axes object
    r   NÚall)	Úmatplotlib.pyplotÚpyplotÚ	get_linesÚlenÚzipÚ
get_xydataÚtmÚassert_almost_equalÚclose)	ÚxpÚrsÚpltÚxp_linesÚrs_linesÚxplÚrslÚxpdataÚrsdatas	            r   Ú_check_datar8   F   s¶   € ð $Ð#Ð#Ð#Ð#Ð#à�|Š|‰~Œ~€HØ�|Š|‰~Œ~€Håˆx‰=Œ=�C ™MœMÒ)Ð)Ð)Ð)Ý˜ (Ñ+Ô+ð /ð /‰ˆˆSØ—’Ñ!Ô!ˆØ—’Ñ!Ô!ˆÝ
Ô˜v vÑ.Ô.Ð.Ð.à‡I‚IˆeÑÔÐÐÐ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.collectionsr:   Ú
isinstancer   Úget_visible)Úcollectionsr   r:   Úpatchs       r   Ú_check_visibler@   ]   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   rB   r   r?   s       r   Ú_check_patches_all_filledrI   q   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ÚcolorsrN   rM   s      @r   Ú_get_colors_mappedrS   ‚   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 ]ª\  }
}t          |
|¦  «        r*|
                     ¦   «         }|	                     |¦  «        }nNt          |
||f¦  «        r(t          |
                     ¦   «         d         ¦  «        }n|
                     ¦   «         }|	                     |¦  «        }||k    sJ ‚Œ«|�æ|�'t          ||¦  «        }|dt          | ¦  «        …         }t          | ¦  «        t          |¦  «        k    sJ ‚t          | |¦  «        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   )rR   )r:   ÚLineCollectionÚPolyCollection)ÚLine2DN)Ú
matplotlibrR   r;   r:   rU   rV   Úmatplotlib.linesrW   ÚColorConverterrS   r)   r*   r<   Ú	get_colorÚto_rgbaÚtupleÚget_edgecolorÚget_facecolorÚnpÚndarray)r>   Ú
linecolorsÚ
facecolorsÚmappingrR   r:   rU   rV   rW   Úconvr?   ÚcolorÚresultÚexpecteds                 r   Ú_check_colorsri   Š   st  € ð  "Ð!Ð!Ð!Ð!Ð!ðð ð ð ð ð ð ð ð ð ð
 (Ð'Ð'Ð'Ð'Ð'àÔ €DØÑØÐÝ+¨G°ZÑ@Ô@ˆJØ#Ð$6¥c¨+Ñ&6Ô&6Ð$6Ô7ˆJå�;ÑÔ¥3 z¡?¤?Ò2Ð2Ð2Ð2Ý ¨ZÑ8Ô8ð 	&ð 	&‰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Ñ8Ô8ð 	&ð 	&‰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 ]\  }}||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   N)r   rl   r)   r*   )Útextsrh   r   ÚlabelÚes        r   r   r   Ê   s›   € õ ˜ÑÔð Ø�~Š~ÑÔ 8Ò+Ð+Ð+Ð+Ð+Ð+à.Ð.¨Ð.Ñ.Ô.ˆÝ�6‰{Œ{�c (™mœmÒ+Ð+Ð+Ð+Ý˜F HÑ-Ô-ð 	ð 	‰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.tickerrr   r   r<   ÚxaxisÚget_minor_formatterÚget_xticklabelsr,   r-   Úget_fontsizeÚget_rotationÚyaxisÚget_yticklabels)	r   Ú
xlabelsizeÚxrotÚ
ylabelsizeÚyrotrr   r   r   ro   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   ru   Ú	get_scalerz   )r   ru   rz   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Úpointsrg   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>W  s'   € Ð:Ð:Ð:�2¨¯ªÑ)9Ô)9Ð:ˆBÐ:Ð:Ð:r   )rŠ   r‡   )r   r‡   Úaxes_ndarrays      r   r   r   K  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«   [  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   )rO   r   ÚbothNrO   r­   r   Úmedians)Úmatplotlib.axesr	   rO   r]   r<   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¿   w  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„}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   )r'   Úgcaru   Úget_major_ticksrz   r%   )Ú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   )rX   r'   Úsubplotr)   ÚrcÚplotÚclf)ÚobjÚkindsÚkwsrÒ   ÚspndxrÕ   rÑ   s         @r   Ú_check_grid_settingsrá   ´  sk  ø€ ð ÐÐÐð#ð #ð #ð #ð #ð €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   rf   c                ó,   ‡— ˆfd„| d         D ¦   «         S )zL
    Auxiliary function for correctly unpacking cycler after MPL >= 1.5
    c                ó    •— g | ]
}|‰         ‘ŒS r   r   )r   rL   Ú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   Fc                óV  — ddl m} |rt          }nt          }d}	 |                     d|                     ¦   «         ¦  «        }|                     ¦   «           || |fi |¤ŽD ]}t          j        |¦  «         Œ	 | 	                    |¦  «         n# | 	                    |¦  «         w xY w|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‘   )
r&   r'   Ú_gen_default_plotÚ_gen_two_subplotsÚgetÚgcfrÜ   r,   Ú"assert_is_valid_plot_return_objectr.   )ÚfÚdefault_axesÚkwargsr1   Ú	gen_plotsÚretÚfigs          r   Ú_check_plot_worksrý   ð  sÄ   € ð6 $Ð#Ð#Ð#Ð#Ð#àð &Ý%ˆ	ˆ	å%ˆ	à
€CðØ�jŠj˜ 3§7¢7¡9¤9Ñ-Ô-ˆØ�Š‰	Œ	ˆ	à�9˜Q Ð.Ð. vÐ.Ð.ð 	7ð 	7ˆCÝÔ1°#Ñ6Ô6Ð6Ð6ð	7ð 	�	Š	�#‰Œˆˆøˆ�	Š	�#‰Œˆˆøøøà€Js   ›AB ÂB&c              +  ó   K  —  | di |¤ŽV — dS )z'
    Create plot in a default way.
    Nr   r   ©r÷   rü   rù   s      r   rò   rò      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ó   '  s”   è è € ð �6ÐÐØ�Š˜ÑÔÐØ
ˆ!ˆ+ˆ+ˆfˆ+ˆ+ÐÐÐà�BŒKÔ&Ð&Ð&Ø˜6Ð!Ð!Ð!Ð!Ð!à—’ sÑ+Ô+ˆˆt‰Ø
ˆ!ˆ+ˆ+ˆfˆ+ˆ+ÐÐÐÐÐr   )NT)T)r   rA   rB   rC   rD   rE   )NNN)NNNN)r�   r�   )r   rA   rD   r�   )r   r   )rf   )F)(Ú__doc__Ú
__future__r   Útypingr   Únumpyr`   Úpandas.core.dtypes.apir   Úpandasr  r   Úpandas._testingÚ_testingr,   Úcollections.abcr   r¯   r	   r   r#   r8   r@   rI   rS   ri   r   r€   r„   rœ   r   r«   r¿   rá   ræ   rì   rð   rý   rò   ró   r   r   r   ú<module>r     sT  ððð ð #Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð à /Ð /Ð /Ð /Ð /Ð /à Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð àð %Ø(Ð(Ð(Ð(Ð(Ð(à$Ð$Ð$Ð$Ð$Ð$ð+ð +ð +ð +ð0'ð 'ð 'ð 'ð.ð ð ð..ð .ð .ð .ð((ð (ð (ð (ð (ð".ð .ð .ð=&ð =&ð =&ð =&ð@ð ð ð(,Gð ,Gð ,Gð ,Gð^-ð -ð -ð -ð$)ð )ð )ð )ðXð ð ð ð "ð "ð "ð "ð: ?Cð:%ð :%ð :%ð :%ðz *,ð *ð *ð *ð *ðZ;ð ;ð ;ð ;ð ð  ð  ð ð  ð  ð-ð -ð -ð -ð`ð ð ðð ð ð ð r   