ó
    |ñ:iËq  ã                   ó´  • S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	  SSK
Jr  SSKrSSKrSSKrSSKJr  SSKJr  SSKJr  SSKJr  SS	KJr  SS
KJr  / SQrSr \  S3r!S r"S r#S/S jr$S r%S r&S0S jr'S r(S r)S r*  S1S jr+S r,S r-S2S jr.S r/S3S jr0S4S jr1S r2S r3S  r4S! r5S" r6S5S# jr7S$ r8S% r9S& r:S' r;\S( 5       r<S)\S*\=S+\>4S, jr?S- r@S. rAg)6z+Utility functions, mostly for internal use.é    N)Úcontextmanager)ÚurlopenÚurlretrieve)Ú
ModuleType)Úto_rgb)Únormalize_kwargs)Ú
deprecated)ÚVersion)Úuser_cache_dir)Ú
desaturateÚsaturateÚset_hls_valuesÚmove_legendÚdespineÚget_dataset_namesÚget_data_homeÚload_datasetz=https://raw.githubusercontent.com/mwaskom/seaborn-data/masterz/dataset_names.txtc                 óT  • [         R                  " U 5      R                  SS5      n [         R                  " U5      n/ n[	        [         R
                  " U 5      5       H&  u  nu  pEX   nXd-
  nXV-
  nUR                  Xx/5        M(     [         R                  " U5      R                  nU$ )aS  Convert intervals to error arguments relative to plot heights.

Parameters
----------
cis : 2 x n sequence
    sequence of confidence interval limits
heights : n sequence
    sequence of plot heights

Returns
-------
errsize : 2 x n array
    sequence of error size relative to height values in correct
    format as argument for plt.bar

é   éÿÿÿÿ)	ÚnpÚ
atleast_2dÚreshapeÚ
atleast_1dÚ	enumerateÚ	transposeÚappendÚasarrayÚT)	ÚcisÚheightsÚerrsizeÚiÚlowÚhighÚhÚelowÚehighs	            ÚP/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/seaborn/utils.pyÚci_to_errsizer*      sŽ   € ô" �-Š-˜Ó
×
$Ñ
$ Q¨Ó
+€CÜ�mŠm˜GÓ$€GØ€GÜ#¤B§L¢L°Ó$5Ö6‰ˆ‰;ˆCØ‰JˆØ‰wˆØ‘ˆØ�‰˜�}Ö%ñ	 7ô �jŠj˜Ó!×#Ñ#€GØ€Nó    c                 óÐ   • U R                   R                  5         U R                  (       a+   U R                  U R                   R                  5       5        gg! [         a     gf = f)z>Force draw of a matplotlib figure, accounting for back-compat.N)ÚcanvasÚdrawÚstaleÚget_rendererÚAttributeError)Úfigs    r)   Ú_draw_figurer3   :   sP   € ð ‡J�J‡O�OÔØ
‡y‡yð	Ø�H‰H�S—Z‘Z×,Ñ,Ó.Õ/ð øô ó 	Ùð	ús   ­)A Á
A%Á$A%c                 óþ  ^• Ub  gTR                  5       mTR                  SS5        Ub  US:  a  [        X$5      nU$ U R                  S:X  aa  [	        T[
        R                  R                  5      R                  S5      nU " / / SSUS9u  nUR                  5       nUR                  5         GO½U R                  S:X  a¸  [        U4S	 jS
 5       5      n[        R                  " U[        R                  5      =pxU " Xx40 TD6nUR                  5       n	[!        U	5      (       d  Sn
O%[        R"                  " U	SS9R$                  S   S:H  n
ST;  a  U
(       a  ['        U	S   5      nUR                  5         OõU R                  S:X  ay  U " [        R                  /[        R                  /40 TD6u  n['        UR)                  5       5      nUR                  5         U R*                  R,                  R                  S5        OlU R                  S:X  a\  [	        T[
        R.                  R0                  5      mU " / / 40 TD6nUR)                  5       n['        US   5      nUR                  5         US:  a  [        X$5      nU$ )zFIf needed, get a default color by using the matplotlib property cycle.NÚlabelé   ÚplotÚcolorF)ÚscalexÚscaleyr8   Úscatterc              3   óŠ   >#   • U  H8  n[         R                  " TR                  U/ 5      5      R                  S    v •  M:     g7f)r   N)r   r   ÚgetÚshape)Ú.0ÚkeyÚkwss     €r)   Ú	<genexpr>Ú!_default_color.<locals>.<genexpr>c   s7   øé € ð 
âB�ô �MŠM˜#Ÿ'™' # rÓ*Ó+×1Ñ1°!Ö4ÚBùs   ƒA A)ÚsÚcÚfcÚ	facecolorÚ
facecolorsr   )ÚaxisrE   Úbarr   Úfill_between)ÚcopyÚpopr   Ú__name__r   ÚmplÚlinesÚLine2Dr=   Ú	get_colorÚremoveÚmaxr   ÚfullÚnanÚget_facecolorsÚlenÚuniquer>   r   Úget_facecolorÚ__self__Ú
containersÚcollectionsÚPolyCollection)ÚmethodÚhuer8   rA   Ú
saturationÚscoutÚ
scout_sizeÚscout_xÚscout_yrH   Úsingle_colorrG   s      `        r)   Ú_default_colorrg   E   s  ø€ ð �ð à
�(‰(‹*€CØ‡G�GˆG�TÔàÑØ˜‹>Ü˜uÓ1ˆEØˆà	�‰˜FÓ	"ä  ¤c§i¡i×&6Ñ&6Ó7×;Ñ;¸GÓDˆÙ˜˜B u°UÀ%ÑH‰ˆØ—‘Ó!ˆØ�‰Žà	�‰˜IÓ	%ô ô 
áBó
ó 
ˆ
ô ŸGšG J´·±Ó7Ð7ˆá�wÑ/¨3Ñ/ˆØ×)Ñ)Ó+ˆ
ä�:�‰ð !‰LäŸ9š9 Z°aÑ8×>Ñ>¸qÑAÀQÑFˆLð �c‹>žlÜ˜: a™=Ó)ˆEà�‰�à	�‰˜EÓ	!ñ œŸ™˜¤2§6¡6 (Ñ2¨cÑ2‰ˆÜ�u×*Ñ*Ó,Ó-ˆØ�‰Œà�‰×"Ñ"×&Ñ& rÕ*à	�‰˜NÓ	*ä˜s¤C§O¡O×$BÑ$BÓCˆÙ�r˜2Ñ% Ñ%ˆØ×'Ñ'Ó)ˆ	Ü�y ‘|Ó$ˆØ�‰Œà�Aƒ~Ü˜5Ó-ˆà€Lr+   c                 óÂ   • SUs=::  a  S::  d  O  [        S5      e[        U 5      nUS:X  a  U$ [        R                  " U6 u  p4nXQ-  n[        R                  " X4U5      nU$ )a@  Decrease the saturation channel of a color by some percent.

Parameters
----------
color : matplotlib color
    hex, rgb-tuple, or html color name
prop : float
    saturation channel of color will be multiplied by this value

Returns
-------
new_color : rgb tuple
    desaturated color code in RGB tuple representation

r   r6   zprop must be between 0 and 1)Ú
ValueErrorr   ÚcolorsysÚ
rgb_to_hlsÚ
hls_to_rgb)r8   ÚpropÚrgbr&   ÚlrD   Ú	new_colors          r)   r   r   “   sm   € ð" ��>˜�>ÜÐ7Ó8Ð8ô �‹-€Cð ˆqƒyØˆ
ô ×!Ò! 3Ð'�G€Aˆ!ð �I€Aô ×#Ò# A¨!Ó,€IàÐr+   c                 ó   • [        U SS9$ )zæReturn a fully saturated color with the same hue.

Parameters
----------
color : matplotlib color
    hex, rgb-tuple, or html color name

Returns
-------
new_color : rgb tuple
    saturated color code in RGB tuple representation

r6   )rD   )r   )r8   s    r)   r   r   º   s   € ô ˜% 1Ñ%Ð%r+   c                 ó¸   • [        U 5      n[        [        R                  " U6 5      n[	        XU/5       H  u  pgUc  M
  XuU'   M     [        R
                  " U6 nU$ )aB  Independently manipulate the h, l, or s channels of a color.

Parameters
----------
color : matplotlib color
    hex, rgb-tuple, or html color name
h, l, s : floats between 0 and 1, or None
    new values for each channel in hls space

Returns
-------
new_color : rgb tuple
    new color code in RGB tuple representation

)r   Úlistrj   rk   r   rl   )r8   r&   ro   rD   rn   Úvalsr#   Úvals           r)   r   r   Ë   sZ   € ô" �‹-€CÜ”×#Ò# SÐ)Ó*€DÜ˜Q 1˜IÖ&‰ˆØ‹?Ø�‹Gñ 'ô ×
Ò
˜tÐ
$€CØ€Jr+   c                 ó´   • Sn[         R                  " U[        5        [        R                  " 5       nUR
                  " U 40 UD6  UR                  " U40 UD6  g)zSGrab current axis and label it.

DEPRECATED: will be removed in a future version.

zCThis function is deprecated and will be removed in a future versionN)ÚwarningsÚwarnÚFutureWarningÚpltÚgcaÚ
set_xlabelÚ
set_ylabel)ÚxlabelÚylabelÚkwargsÚmsgÚaxs        r)   Úaxlabelrƒ   æ   sE   € ð P€CÜ‡M‚M�#”}Ô%Ü	�Š‹€BØ‡M‚M�&Ñ#˜FÒ#Ø‡M‚M�&Ñ#˜FÓ#r+   c                 ó4   • U [         R                  " U 5         $ )a#  Helper method for removing null values from data vectors.

Parameters
----------
vector : vector object
    Must implement boolean masking with [] subscript syntax.

Returns
-------
clean_clean : same type as ``vector``
    Vector of data with null values removed. May be a copy or a view.

)ÚpdÚnotnull)Úvectors    r)   Ú	remove_narˆ   ó   s   € ð ”"—*’*˜VÓ$Ñ%Ð%r+   c                  ót   • [         R                  S   n SU R                  ;   a  U R                  5       S   $ S/$ )zåReturn the list of colors in the current matplotlib color cycle

Parameters
----------
None

Returns
-------
colors : list
    List of matplotlib colors in the current cycle, or dark gray if
    the current color cycle is empty.
zaxes.prop_cycler8   z.15)rO   ÚrcParamsÚkeysÚby_key)Úcyclers    r)   Úget_color_cyclerŽ     s6   € ô �\‰\Ð+Ñ,€FØ'.°&·+±+Ó'=ˆ6�=‰=‹?˜7Ñ#ÐJÀEÀ7ÐJr+   c                 óª	  • U c#  Uc   [         R                  " 5       R                  nOU b  U R                  nOUb  U/nW GH}  n	S Ht  n
[        5       U
   (       + nU	R                  U
   R                  U5        Uc  M8  U(       d  MA   UR                  U
S5      nU	R                  U
   R                  SU45        Mv     U(       aÞ  U(       d×  [        S U	R                  R                   5       5      n[        S U	R                  R                   5       5      nU	R                  R                  S5        U	R                  R                   H  nUR                  R                  U5        M      U	R                  R                   H  nUR                  R                  U5        M      U(       aÞ  U(       d×  [        S U	R                  R                   5       5      n[        S	 U	R                  R                   5       5      nU	R                  R                  S
5        U	R                  R                   H  nUR                  R                  U5        M      U	R                  R                   H  nUR                  R                  U5        M      U(       d  GMR  [         R"                  " U	R%                  5       5      nUR&                  (       aß  [         R(                  " U[+        U	R-                  5       5      :¬  U5      S   n[         R(                  " U[/        U	R-                  5       5      :*  U5      S   nU	R                  S   R1                  UU5        U	R                  S
   R1                  UU5        UR)                  UU:*  5      nUR)                  UU:¬  5      nU	R3                  U5        [         R"                  " U	R5                  5       5      nUR&                  (       d  GMž  [         R(                  " U[+        U	R7                  5       5      :¬  U5      S   n[         R(                  " U[/        U	R7                  5       5      :*  U5      S   nU	R                  S   R1                  UU5        U	R                  S   R1                  UU5        UR)                  UU:*  5      nUR)                  UU:¬  5      nU	R9                  U5        GM€     g! [         a    Un GN8f = f)aÃ  Remove the top and right spines from plot(s).

fig : matplotlib figure, optional
    Figure to despine all axes of, defaults to the current figure.
ax : matplotlib axes, optional
    Specific axes object to despine. Ignored if fig is provided.
top, right, left, bottom : boolean, optional
    If True, remove that spine.
offset : int or dict, optional
    Absolute distance, in points, spines should be moved away
    from the axes (negative values move spines inward). A single value
    applies to all spines; a dict can be used to set offset values per
    side.
trim : bool, optional
    If True, limit spines to the smallest and largest major tick
    on each non-despined axis.

Returns
-------
None

N)ÚtopÚrightÚleftÚbottomr   Úoutwardc              3   óV   #   • U  H  nUR                   R                  5       v •  M!     g 7f©N©Ú	tick1lineÚget_visible©r?   Úts     r)   rB   Údespine.<locals>.<genexpr>C  ó'   é € ð â.�Að —‘×'Ñ'×)Ð)Ú.ùó   ‚')c              3   óV   #   • U  H  nUR                   R                  5       v •  M!     g 7fr–   r—   rš   s     r)   rB   rœ   G  r�   rž   r‘   c              3   óV   #   • U  H  nUR                   R                  5       v •  M!     g 7fr–   r—   rš   s     r)   rB   rœ   R  r�   rž   c              3   óV   #   • U  H  nUR                   R                  5       v •  M!     g 7fr–   r—   rš   s     r)   rB   rœ   V  r�   rž   r�   r   r“   r’   )rz   ÚgcfÚaxesÚlocalsÚspinesÚset_visibler=   r1   Úset_positionÚanyÚyaxisÚ
majorTicksÚ
minorTicksÚset_ticks_positionÚ	tick2lineÚxaxisr   r   Ú
get_xticksÚsizeÚcompressÚminÚget_xlimrT   Ú
set_boundsÚ
set_xticksÚ
get_yticksÚget_ylimÚ
set_yticks)r2   r‚   r�   r‘   r’   r“   ÚoffsetÚtrimr£   Úax_iÚsideÚ
is_visibleru   Úmaj_onÚmin_onr›   ÚxticksÚ	firsttickÚlasttickÚnewticksÚytickss                        r)   r   r     sÒ  € ð2 �{�r‘zÜ�wŠw‹y�~‰~‰Ø	‰Ø�x‰x‰Ø	‰ØˆtˆäˆÛ6ˆDä#›X d™^Ô+ˆJØ�K‰K˜Ñ×)Ñ)¨*Ô5ØÓ!§j jð!Ø Ÿ*™* T¨1Ó-�Cð —‘˜DÑ!×.Ñ.°	¸3Ð/?Ö@ñ 7ö žÜñ àŸ™×.Ò.óó ˆFô ñ àŸ™×.Ò.óó ˆFð �J‰J×)Ñ)¨'Ô2Ø—Z‘Z×*Ô*�Ø—‘×'Ñ'¨Ö/ñ +à—Z‘Z×*Ô*�Ø—‘×'Ñ'¨Ö/ñ +ö ž#Üñ àŸ™×.Ò.óó ˆFô ñ àŸ™×.Ò.óó ˆFð �J‰J×)Ñ)¨%Ô0Ø—Z‘Z×*Ô*�Ø—‘×'Ñ'¨Ö/ñ +à—Z‘Z×*Ô*�Ø—‘×'Ñ'¨Ö/ñ +÷ ‰4ä—Z’Z §¡Ó 1Ó2ˆFØ�{�{ÜŸKšK¨´#°d·m±m³oÓ2FÑ(FØ(.ó0Ø01ñ3�	äŸ;š; v´°T·]±]³_Ó1EÑ'EØ'-ó/Ø/1ñ3�à—‘˜HÑ%×0Ñ0°¸HÔEØ—‘˜EÑ"×-Ñ-¨i¸ÔBØ!Ÿ?™?¨6°XÑ+=Ó>�Ø#×,Ñ,¨X¸Ñ-BÓC�Ø—‘ Ô)ä—Z’Z §¡Ó 1Ó2ˆFØ�{�{Š{ÜŸKšK¨´#°d·m±m³oÓ2FÑ(FØ(.ó0Ø01ñ3�	äŸ;š; v´°T·]±]³_Ó1EÑ'EØ'-ó/Ø/1ñ3�à—‘˜FÑ#×.Ñ.¨y¸(ÔCØ—‘˜GÑ$×/Ñ/°	¸8ÔDØ!Ÿ?™?¨6°XÑ+=Ó>�Ø#×,Ñ,¨X¸Ñ-BÓC�Ø—‘ ×)òG øô &ó !Ø “Cð!ús   ÂSÓSÓSc                 ó¢  • SSK Jn  [        X5      (       a#  U R                  nU R                  R                  nO¨[        U [
        R                  R                  5      (       a  U R                  nU R                  nOf[        U [
        R                  R                  5      (       a0  U R                  (       a  U R                  S   nOSnU R                  nOSn[        U5      eUc  U  S3n[        U5      eSSKJn  U" U5      nUR                  5        V	s/ s H  o™R!                  5       PM     n
n	UR#                  SS5      =nb'  [%        U5      [%        U
5      :w  a  S	n[        U5      eUn
[&        R(                  " [
        R                  R*                  5      R,                  nUR/                  5       R1                  5        VVs0 s H  u  pÞXÜ;   d  M  XÞ_M     nnnUR#                  S
5        UR#                  S5      nSU;   a   UR3                  UR#                  S5      5        UR1                  5        VVs0 s H  u  pÞUR5                  S5      (       d  M  XÞ_M!     nnnUR1                  5        H.  u  nnUR6                  " S0 USS U0D6  UR#                  U5        M0     UR9                  SUR:                  R=                  5       5        UR?                  U5        URA                  5         U" XŠ4SU0UD6nURC                  UR!                  5       URE                  5       5        [        X5      (       a  UU l#        ggs  sn	f s  snnf s  snnf )aô  
Recreate a plot's legend at a new location.

The name is a slight misnomer. Matplotlib legends do not expose public
control over their position parameters. So this function creates a new legend,
copying over the data from the original object, which is then removed.

Parameters
----------
obj : the object with the plot
    This argument can be either a seaborn or matplotlib object:

    - :class:`seaborn.FacetGrid` or :class:`seaborn.PairGrid`
    - :class:`matplotlib.axes.Axes` or :class:`matplotlib.figure.Figure`

loc : str or int
    Location argument, as in :meth:`matplotlib.axes.Axes.legend`.

kwargs
    Other keyword arguments are passed to :meth:`matplotlib.axes.Axes.legend`.

Examples
--------

.. include:: ../docstrings/move_legend.rst

r   )ÚGridr   NzC`obj` must be a seaborn Grid or matplotlib Axes or Figure instance.z has no legend attached.)Úget_legend_handlesÚlabelsz4Length of new labels does not match existing legend.Úbbox_to_anchorÚtitleÚtitle_é   ÚframeonÚloc© )$Úseaborn.axisgridrÆ   Ú
isinstanceÚlegendÚfigurerO   r£   ÚAxesÚlegend_ÚFigureÚlegendsÚ	TypeErrorri   Úseaborn._compatrÇ   Ú	get_textsÚget_textrM   rX   ÚinspectÚ	signatureÚLegendÚ
parametersÚ
propertiesÚitemsÚset_textÚ
startswithÚsetÚ
setdefaultÚlegendPatchr™   ÚupdaterS   Ú	set_titleÚget_fontpropertiesÚ_legend)ÚobjrÎ   r€   rÆ   Ú
old_legendÚlegend_funcÚerrrÇ   Úhandlesr›   rÈ   Ú
new_labelsÚ
legend_kwsÚkÚvÚpropsrÊ   Útitle_kwargsr@   ru   Ú
new_legends                        r)   r   r   {  s·  € õ@ &ô �#×ÑØ—Z‘Zˆ
Ø—j‘j×'Ñ'‰Ü	�CœŸ™Ÿ™×	'Ñ	'Ø—[‘[ˆ
Ø—j‘j‰Ü	�CœŸ™×*Ñ*×	+Ñ	+Ø�;�;ØŸ™ R™‰JàˆJØ—j‘j‰àSˆÜ˜‹nÐàÑØ�Ð-Ð.ˆÜ˜‹oÐõ 3Ù  Ó,€GØ$.×$8Ñ$8Ô$:Ó;Ò$:˜q�j‰jŽlÑ$:€FÐ;ð —j‘j ¨4Ó0Ð0ˆ
Ñ=Üˆz‹?œc &›kÓ)ØHˆCÜ˜S“/Ð!Øˆô ×"Ò"¤3§:¡:×#4Ñ#4Ó5×@Ñ@€JØ(×3Ñ3Ó5×;Ñ;Ô=ÔQÒ=‘d�aÀÁ‹TˆQŠTÑ=€EÑQð 
‡I�IÐÔð �I‰I�gÓ€EØ�&ÓØ�‰�v—z‘z 'Ó*Ô+Ø%+§\¡\¤^ÔN¢^™T˜Q°q·|±|ÀH×7M“D�A’D¡^€LÑNØ ×&Ñ&Ö(‰ˆˆSØ�	Š	Ñ#�S˜˜�W˜c�NÒ#Ø�
‰
�3Žñ )ð
 ×Ñ�i ×!7Ñ!7×!CÑ!CÓ!EÔFð 
‡L�L�ÔØ×ÑÔÙ˜WÑ?°#Ð?¸Ñ?€JØ×Ñ˜Ÿ™Ó)¨5×+CÑ+CÓ+EÔFô �#×ÑØ ˆ�ð ùòI <ùó Rùó Os   ÄM ÇMÇMÈ8MÉMc                 ó¼   • [        U R                  5       X-  -
  US   5      n[        U R                  5       X-  -   US   5      n[        R                  " XVU5      nU$ )z0Establish support for a kernel density estimate.r   r6   )rT   r²   r   Úlinspace)ÚdataÚbwÚgridsizeÚcutÚclipÚsupport_minÚsupport_maxÚsupports           r)   Ú_kde_supportr  Þ  sQ   € ä�d—h‘h“j 2¡8Ñ+¨T°!©WÓ5€KÜ�d—h‘h“j 2¡8Ñ+¨T°!©WÓ5€KÜ�kŠk˜+°HÓ=€Gà€Nr+   c                 óP   • SUS-  -
  SUS-  -   4n[         R                  " XU5      $ )z2Return a percentile range from an array of values.é2   r   )r   Únanpercentile)ÚaÚwhichrI   Úps       r)   Úcir  ç  s/   € à
ˆU�Q‰Y‰˜˜U Q™Y™Ð&€AÜ×Ò˜A $Ó'Ð'r+   c                  ó   • [        [        5       n U R                  5       nSSS5        WR                  5       R	                  S5       Vs/ s H  o"R                  5       PM     nn[        [        SU5      5      $ ! , (       d  f       N_= fs  snf )zcReport available example datasets, useful for reporting issues.

Requires an internet connection.

NÚ
)r   ÚDATASET_NAMES_URLÚreadÚdecodeÚsplitÚstriprs   Úfilter)ÚrespÚtxtÚnameÚdataset_namess       r)   r   r   í  sl   € ô 
Ô"Ô	# tØ�i‰i‹kˆ÷ 
$ð /2¯j©j«l×.@Ñ.@ÀÔ.FÓGÒ.F d—Z‘Z–\Ñ.F€MÐGÜ”�t˜]Ó+Ó,Ð,÷	 
$Õ	#üò Hs   �A:Á
BÁ:
Bc                 ó  • U c)  [         R                  R                  S[        S5      5      n [         R                  R                  U 5      n [         R                  R                  U 5      (       d  [         R                  " U 5        U $ )a8  Return a path to the cache directory for example datasets.

This directory is used by :func:`load_dataset`.

If the ``data_home`` argument is not provided, it will use a directory
specified by the `SEABORN_DATA` environment variable (if it exists)
or otherwise default to an OS-appropriate user cache location.

ÚSEABORN_DATAÚseaborn)ÚosÚenvironr=   r   ÚpathÚ
expanduserÚexistsÚmakedirs)Ú	data_homes    r)   r   r   ú  s\   € ð ÑÜ—J‘J—N‘N >´>À)Ó3LÓMˆ	Ü—‘×"Ñ" 9Ó-€IÜ�7‰7�>‰>˜)×$Ñ$Ü
�Š�IÔØÐr+   c                 ór  • [        U [        R                  5      (       a  Sn[        U5      e[         SU  S3nU(       a•  [
        R                  R                  [        U5      [
        R                  R                  U5      5      n[
        R                  R                  U5      (       d(  U [        5       ;  a  [        SU  S35      e[        XV5        UnOUn[        R                  " U40 UD6nUR                  S   R!                  5       R#                  5       (       a  UR                  SS nU S:X  a~  [        R$                  " US	   / S
Q5      US	'   [        R$                  " US   SS/5      US'   [        R$                  " US   SS/5      US'   [        R$                  " US   SS/5      US'   U$ U S:X  a;  US   R&                  SS n	[        R$                  " X™R)                  5       5      US'   U$ U S:X  a_  [        R$                  " US   / SQ5      US'   [        R$                  " US   / SQ5      US'   [        R$                  " US   SS/5      US'   U$ U S:X  aG  [        R$                  " US   / S Q5      US'   [        R$                  " US!   [+        S"5      5      US!'   U$ U S#:X  a"  US   R&                  R-                  5       US'   U$ U S$:X  a_  [        R$                  " US%   / S&Q5      US%'   [        R$                  " US'   / S(Q5      US''   [        R$                  " US)   / S*Q5      US)'   U$ U S+:X  a:  [        R.                  " US,   5      US,'   [        R.                  " US-   5      US-'   U$ U S.:X  a  [        R.                  " US/   5      US/'   U$ U S0:X  a  [        R.                  " US/   5      US/'   U$ )1a*  Load an example dataset from the online repository (requires internet).

This function provides quick access to a small number of example datasets
that are useful for documenting seaborn or generating reproducible examples
for bug reports. It is not necessary for normal usage.

Note that some of the datasets have a small amount of preprocessing applied
to define a proper ordering for categorical variables.

Use :func:`get_dataset_names` to see a list of available datasets.

Parameters
----------
name : str
    Name of the dataset (``{name}.csv`` on
    https://github.com/mwaskom/seaborn-data).
cache : boolean, optional
    If True, try to load from the local cache first, and save to the cache
    if a download is required.
data_home : string, optional
    The directory in which to cache data; see :func:`get_data_home`.
kws : keys and values, optional
    Additional keyword arguments are passed to passed through to
    :func:`pandas.read_csv`.

Returns
-------
df : :class:`pandas.DataFrame`
    Tabular data, possibly with some preprocessing applied.

z»This function accepts only strings (the name of an example dataset). You passed a pandas DataFrame. If you have your own dataset, it is not necessary to use this function before plotting.Ú/z.csvÚ'z%' is not one of the example datasets.r   NÚtipsÚday)ÚThurÚFriÚSatÚSunÚsexÚMaleÚFemaleÚtimeÚLunchÚDinnerÚsmokerÚYesÚNoÚflightsÚmonthé   Úexercise)z1 minz15 minz30 minÚkind)ÚrestÚwalkingÚrunningÚdietzno fatzlow fatÚtitanicÚclass)ÚFirstÚSecondÚThirdÚdeckÚABCDEFGÚpenguinsÚdiamondsr8   )ÚDÚEÚFÚGÚHÚIÚJÚclarity)ÚIFÚVVS1ÚVVS2ÚVS1ÚVS2ÚSI1ÚSI2ÚI1rü   )ÚIdealÚPremiumz	Very GoodÚGoodÚFairÚtaxisÚpickupÚdropoffÚseaiceÚDateÚdowjones)rÑ   r…   Ú	DataFramerØ   ÚDATASET_SOURCEr  r  Újoinr   Úbasenamer  r   ri   r   Úread_csvÚilocÚisnullÚallÚCategoricalÚstrrY   rs   rÊ   Úto_datetime)
r  Úcacher  rA   rî   ÚurlÚ
cache_pathÚ	full_pathÚdfÚmonthss
             r)   r   r     su  € ôF �$œŸ™×%Ñ%ðHð 	ô
 ˜‹nÐäÐ˜A˜d˜V 4Ð
(€CæÜ—W‘W—\‘\¤-°	Ó":¼B¿G¹G×<LÑ<LÈSÓ<QÓRˆ
Ü�w‰w�~‰~˜j×)Ñ)ØÔ,Ó.Ó.Ü  1 T FÐ*OÐ!PÓQÐQÜ˜Ô(Ø‰	àˆ	ä	�Š�YÑ	& #Ñ	&€Bà	‡w�wˆr�{×ÑÓ×Ñ×!Ñ!Ø�W‰W�S�bˆ\ˆð ˆvƒ~Ü—N’N 2 e¡9Ò.KÓLˆˆ5‰	Ü—N’N 2 e¡9¨v°xÐ.@ÓAˆˆ5‰	Ü—^’^ B v¡J°¸(Ð0CÓDˆˆ6‰
Ü—~’~ b¨¡l°U¸D°MÓBˆˆ8‰ðN €IðK 
�Ó	Ø�G‘—‘  !Ð$ˆÜ—n’n V¯]©]«_Ó=ˆˆ7‰ðF €IðC 
�Ó	Ü—^’^ B v¡JÒ0MÓNˆˆ6‰
Ü—^’^ B v¡JÒ0NÓOˆˆ6‰
Ü—^’^ B v¡J°¸9Ð0EÓFˆˆ6‰
ð< €Ið9 
�Ó	Ü—n’n R¨¡[Ò2NÓOˆˆ7‰Ü—^’^ B v¡J´°Y³Ó@ˆˆ6‰
ð4 €Ið1 
�Ó	Ø�u‘I—M‘M×'Ñ'Ó)ˆˆ5‰	ð. €Ið+ 
�Ó	Ü—n’nØˆw‰KÒ<ó
ˆˆ7‰ô ŸšØˆy‰MÒSó
ˆˆ9‰ô —N’NØˆu‰IÒHó
ˆˆ5‰	ð €Ið 
�‹Ü—~’~ b¨¡lÓ3ˆˆ8‰ÜŸš r¨)¡}Ó5ˆˆ9‰ð €Ið 
�Ó	Ü—^’^ B v¡JÓ/ˆˆ6‰
ð
 €Ið 
�Ó	Ü—^’^ B v¡JÓ/ˆˆ6‰
à€Ir+   c                 óâ   • U (       d  g U  Vs/ s H  oR                  5       PM     nnU Vs/ s H  o3R                  U5      PM     nn[        U5      S:„  $ s  snf s  snf ! [         a     gf = f)zÌReturn a boolean for whether the list of ticklabels have overlaps.

Parameters
----------
labels : list of matplotlib ticklabels

Returns
-------
overlap : boolean
    True if any of the labels overlap.

Fr6   )Úget_window_extentÚcount_overlapsrT   ÚRuntimeError)rÈ   ro   ÚbboxesÚbÚoverlapss        r)   Úaxis_ticklabels_overlapru  x  sp   € ö ØðÙ17Ó8²¨A×%Ñ%Ö'±ˆÐ8Ù6<Ó=²f°×$Ñ$ VÖ,±fˆÐ=Ü�8‹}˜qÑ Ð ùò 9ùÚ=øäó áðús,   ŠA! ŽA§A! ­AÁA! Á
A! Á!
A.Á-A.c                 óf   • [        U R                  5       5      [        U R                  5       5      4$ )zÔReturn booleans for whether the x and y ticklabels on an Axes overlap.

Parameters
----------
ax : matplotlib Axes

Returns
-------
x_overlap, y_overlap : booleans
    True when the labels on that axis overlap.

)ru  Úget_xticklabelsÚget_yticklabels)r‚   s    r)   Úaxes_ticklabels_overlapry  �  s0   € ô $ B×$6Ñ$6Ó$8Ó9Ü# B×$6Ñ$6Ó$8Ó9ð;ð ;r+   c                 ó  ^• U R                   " T6 R                  U5      nU Vs/ s H  oDTS   :¼  d  M  UTS   ::  d  M  UPM     nn " U4S jS5      n[        U [        R                  R
                  5      (       a  [        R                  R                  5       nO@[        R                  R                  5       nUR                  S5        UR                  S5        U" 5       Ul
        UR                  U5      nX74$ s  snf )z=Return levels and formatted levels for brief numeric legends.r   r6   c                   ó"   >• \ rS rSrU 4S jrSrg)Ú-locator_to_legend_entries.<locals>.dummy_axisi¨  c                 ó   >• T$ r–   rÏ   )ÚselfÚlimitss    €r)   Úget_view_intervalÚ?locator_to_legend_entries.<locals>.dummy_axis.get_view_interval©  s   ø€ ØˆMr+   rÏ   N)rN   Ú
__module__Ú__qualname__Ú__firstlineno__r€  Ú__static_attributes__)r  s   €r)   Ú
dummy_axisr|  ¨  s   ø† ÷	ð 	r+   r†  F)Útick_valuesÚastyperÑ   rO   ÚtickerÚ
LogLocatorÚLogFormatterÚScalarFormatterÚset_useOffsetÚset_scientificrI   Úformat_ticks)Úlocatorr  ÚdtypeÚ
raw_levelsro   r†  Ú	formatterÚformatted_levelss    `      r)   Úlocator_to_legend_entriesr•  ¡  sÖ   ø€ à×$Ò$ fÐ-×4Ñ4°UÓ;€Jñ (ÓMšZ˜°°q±	©>“!¸aÀ6È!Á9¹n—!™Z€JÐM÷ô ô �'œ3Ÿ:™:×0Ñ0×1Ñ1Ü—J‘J×+Ñ+Ó-‰	ä—J‘J×.Ñ.Ó0ˆ	ð 	×Ñ Ô&Ø× Ñ  Ô'Ù“\€I„Nà ×-Ñ-¨jÓ9ÐàÐ'Ð'ùò% Ns   ¤C<´C<¿C<c                 ó   • [         R                  R                  R                  U 5      SS2SS24   n[        R
                  " US:*  US-  US-   S-  S-  5      nUR                  / SQ5      n UR                  5       $ ! [         a    Us $ f = f)	züCalculate the relative luminance of a color according to W3C standards

Parameters
----------
color : matplotlib color or sequence of matplotlib colors
    Hex code, rgb-tuple, or html color name.

Returns
-------
luminance : float(s) between 0 and 1

Nr3  g#Æ‚¤?g×£p=
×)@g)\�Âõ(¬?gáz®Gáð?g333333@)g¼–�z6Ë?g¥,Cëâæ?g]mÅþ²{²?)	rO   ÚcolorsÚcolorConverterÚto_rgba_arrayr   ÚwhereÚdotÚitemri   )r8   rn   Úlums      r)   Úrelative_luminancerž  »  s‡   € ô �*‰*×
#Ñ
#×
1Ñ
1°%Ó
8º¸B¸Q¸B¸Ñ
?€CÜ
�(Š(�3˜&‘= #¨¡+°°t±¸uÑ0DÈÑ/LÓ
M€CØ
�'‰'Ò'Ó
(€CðØ�x‰x‹zÐøÜó ØŠ
ðús   Á.A> Á>BÂBc                 ó†   • [        U [        5      (       a  U $  U R                  SS9$ ! [         a    [        U 5      s $ f = f)a•  Return a string representing a Python object.

Strings (i.e. type ``str``) are returned unchanged.

Byte strings (i.e. type ``bytes``) are returned as UTF-8-decoded strings.

For other objects, the method ``__str__()`` is called, and the result is
returned as a string.

Parameters
----------
obj : object
    Any Python object

Returns
-------
s : str
    UTF-8-decoded string representation of ``obj``

zutf-8)Úencoding)rÑ   rf  r  r1   )rë   s    r)   Úto_utf8r¡  Ñ  sD   € ô* �#”s×ÑØˆ
ðØ�z‰z 7ˆzÐ+Ð+øÜó Ü�3‹xŠðús   ™( ¨A ¿A c           
      ó¦   ^• U(       a  Tb  [        U4S jU 5       5      (       + nOTU;  nU(       a  [        SU  SU S[        T5       S35      eT$ )z+Raise if value for param is not in options.c              3   ót   >#   • U  H-  n[        U[        5      (       d  M  TR                  U5      v •  M/     g 7fr–   )rÑ   rf  rã   )r?   r  Úvalues     €r)   rB   Ú"_check_argument.<locals>.<genexpr>ñ  s,   øé € ÐU²w°!Ä*ÈQÔPS×BTÓ-˜%×*Ñ*¨1×-Ð-²wùs   ƒ8 8zThe value for `z` must be one of z, but z was passed.)r¨   ri   Úrepr)ÚparamÚoptionsr¤  ÚprefixÚfailures     `  r)   Ú_check_argumentr«  î  sb   ø€ æ�%Ñ#ÜÔU±wÓUÓUÔU‰à˜wÑ&ˆÞÜØ˜e˜WÐ$5°g°Yð ?Ü˜“;�-˜|ð-ó
ð 	
ð €Lr+   c                 óÔ   • [         R                  " U5      R                  n[         R                  " U5      R                  nU H!  nXT;   d  M
  XP;  d  M  XE   R                  X'   M#     U $ )zBAssign default kwargs for call_func using values from source_func.)rÜ   rÝ   rß   Údefault)rA   Ú	call_funcÚsource_funcÚneededÚdefaultsr§  s         r)   Ú_assign_default_kwargsr²  ü  s[   € ô ×Ò˜yÓ)×4Ñ4€FÜ× Ò  Ó-×8Ñ8€HãˆØÕ Õ!1Ø!™×0Ñ0ˆC‹Jñ ð €Jr+   c                 ó¼  • [         R                  R                  SS5      nU R                  [        R
                  R                  5      S   R                  5       nU H|  nUR                  5       u  pEUR                  5       n[        S U 5       5      (       a  M>  UR                  S5        UR                  5        H  nUc  M  UR                  U5        M     M~     g)z•
Make invisible-handle "subtitles" entries look more like titles.

Note: This function is not part of the public API and may be changed or removed.

zlegend.title_fontsizeNr   c              3   ó@   #   • U  H  oR                  5       v •  M     g 7fr–   )r™   )r?   Úartists     r)   rB   Ú*adjust_legend_subtitles.<locals>.<genexpr>  s   é € Ð>²g¨F×%Ñ%×'Ð'²gùs   ‚)rz   rŠ   r=   ÚfindobjrO   Ú	offsetboxÚVPackerÚget_childrenrd  Ú	set_widthÚset_size)rÒ   Ú	font_sizeÚhpackersÚhpackÚ	draw_areaÚ	text_arearï   Útexts           r)   Úadjust_legend_subtitlesrÃ    s®   € ô —‘× Ñ Ð!8¸$Ó?€IØ�~‰~œcŸm™m×3Ñ3Ó4°QÑ7×DÑDÓF€HÛˆØ$×1Ñ1Ó3Ñˆ	Ø×(Ñ(Ó*ˆÜÑ>±gÓ>×>Ó>Ø×Ñ Ô"Ø!×.Ñ.Ö0�ØÓ(Ø—M‘M )Ö,ó 1ò r+   c                 óœ   • U[         LaB  US:w  a<  Uc  Sn OUS:X  a  Sn OSU4n S[        U 5       S3n[        R                  " U[        SS9  U $ )	a  
Warn on usage of ci= and convert to appropriate errorbar= arg.

ci was deprecated when errorbar was added in 0.12. It should not be removed
completely for some time, but it can be moved out of function definitions
(and extracted from kwargs) after one cycle.

r	   NÚsdr  z2

The `ci` parameter is deprecated. Use `errorbar=z` for the same effect.
r3  )Ú
stacklevel)r	   r¦  rw   rx   ry   )Úerrorbarr  r�   s      r)   Ú_deprecate_cirÈ  #  sf   € ð 
”Ò  lÓ 2Ø‰:Ø‰HØ�4‹ZØ‰Hà˜b�zˆHðÜ! (›^Ð,Ð,DðFð 	ô 	�Š�cœ=°QÒ7à€Or+   c                 óŠ   • [        X S35      nUR                  5       nUR                  UR                  5       R                  4$ )z;Return the forward and inverse transforms for a given axis.rI   )ÚgetattrÚget_transformÚ	transformÚinverted)r‚   rI   Úaxis_objrÌ  s       r)   Ú_get_transform_functionsrÏ  <  s@   € ä�r˜V 4˜=Ó)€HØ×&Ñ&Ó(€IØ×Ñ 	× 2Ñ 2Ó 4× >Ñ >Ð>Ð>r+   c               #   ó¸   #   • [         R                  S   n  S[         R                  S'   Sv •  U [         R                  S'   g! U [         R                  S'   f = f7f)zBContext manager for preventing rc-controlled auto-layout behavior.zfigure.autolayoutFN)rO   rŠ   )Úorig_vals    r)   Ú_disable_autolayoutrÒ  C  sK   é € ô �|‰|Ð/Ñ0€Hð5Ø,1Œ�‰Ð(Ñ)Ûà,4Œ�‰Ð(Ò)ø¨HŒ�‰Ð(Ò)üs   ‚A—A ®AÁAÁAÚlibÚversionÚreturnc                 óD   • [        U R                  5      [        U5      :  $ )z3Helper function for checking version compatibility.)r
   Ú__version__)rÓ  rÔ  s     r)   Ú_version_predatesrØ  V  s   € ä�3—?‘?Ó#¤g¨gÓ&6Ñ6Ð6r+   c            	      óä  • [        U [        R                  R                  5      n U R	                  SS 5      n[        R
                  nSU R	                  SS5      [        R                  " U R	                  SUS   S-  5      5      U R	                  SU R                  S	5      5      U R	                  S
S5      S.U EnUb  US:X  a	  US   US'   OXS'   [        R                  R                  " / / 40 UD6$ )NÚ	edgecolorÚ ÚmarkerÚorD   zlines.markersizer   rG   r8   Ú	linewidthr   )Ú	linestylerÜ  Ú
markersizeÚmarkerfacecolorÚmarkeredgewidthÚfacerá  Úmarkeredgecolor)r   rO   r]   ÚPathCollectionrM   rŠ   r   Úsqrtr=   rP   rQ   )rA   rÚ  ÚrcÚline_kwss       r)   Ú_scatter_legend_artistré  [  sà   € ä
˜3¤§¡× >Ñ >Ó
?€Cà—‘˜ TÓ*€IÜ	�‰€BàØ—'‘'˜( CÓ(Ü—g’g˜cŸg™g c¨2Ð.@Ñ+AÀQÑ+FÓGÓHØŸ7™7 ;°·±¸Ó0@ÓAØŸ7™7 ;°Ó2ñð ð€Hð ÑØ˜ÓØ*2Ð3DÑ*EˆHÐ&Ò'à*3Ð&Ñ'ä�9‰9×Ò˜B Ñ/ hÑ/Ð/r+   c                 ó   ^ • U 4S jnU$ )Nc                  ó˜   >• U R                  SS 5      nUb  T(       a  XS'   O	XS'   SU S'   [        R                  R                  " S0 U D6$ )Nr8   rG   rÚ  Únone))r   r   r   r   )rM   rO   ÚpatchesÚ	Rectangle)rA   r8   Úfills     €r)   Úlegend_artistÚ/_get_patch_legend_artist.<locals>.legend_artistu  sN   ø€ à—‘˜ Ó&ˆØÑÞØ#(�KÒ à#(�KÑ Ø#)��KÑ ä�{‰{×$Ò$Ñ9°SÑ9Ð9r+   rÏ   )rï  rð  s   ` r)   Ú_get_patch_legend_artistrò  s  s   ø€ õ
:ð Ðr+   )r6   )NNN)NNTTFFNF)é_   Nr–   )TN)F)BÚ__doc__r  rÜ   rw   rj   Ú
contextlibr   Úurllib.requestr   r   Útypesr   Únumpyr   Úpandasr…   Ú
matplotlibrO   Úmatplotlib.colorsr   Úmatplotlib.pyplotÚpyplotrz   Úmatplotlib.cbookr   Úseaborn._core.typingr	   Úseaborn.external.versionr
   Úseaborn.external.appdirsr   Ú__all__r^  r  r*   r3   rg   r   r   r   rƒ   rˆ   rŽ   r   r   r  r  r   r   r   ru  ry  r•  rž  r¡  r«  r²  rÃ  rÈ  rÏ  rÒ  rf  ÚboolrØ  ré  rò  rÏ   r+   r)   Ú<module>r     s$  ðÙ 1Û 	Û Û Û Ý %ß /Ý ã Û Û Ý $Ý Ý -å +Ý ,Ý 3òL€ð Q€Ø%Ð&Ð&8Ð9Ð òò<ôKò\$òN&ô"ò6
$ò&ò"Kð" ;@Ø,1ôc*òL`!òFô(ò
-ôô$iòXò0;ò"(ò4ò,ô:òò&-ò(ò2?ð ñ5ó ð5ð$7˜:ð 7°ð 7¸ô 7ò
0ó0r+   