
    Bhq                        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	            `C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\seaborn/utils.pyci_to_errsizer*      s    " --

$
$Q
+CmmG$GG#BLL$56;CJw}%	 7 jj!##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     JJOO
yy	HHSZZ,,./   		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OU 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         OU 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 MM#''#r*+11!4Bs   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GGGT>u1E	F	" cii&6&67;;GDBuU%H!	I	%  
B
 

 GGJ77w/3/))+
: !L99Za8>>qAQFL c>l:a=)E	E	! 266(2c2u**,-""&&r*	N	*sCOO$B$BCr2%%'')	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 qy
 !!3'GA! IA ##A!,Ir+   c                     [        U SS9$ )zReturn 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Q1I&?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MM#}%	BMM&#F#MM&#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/$ )zReturn 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#JE7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 {rzwwy~~	xx	t6D#Xd^+JKK))*5!jj! **T1-C D!..	3/?@ 7  .. F  .. F JJ))'2ZZ**''/ +ZZ**''/ + # .. F  .. F JJ))%0ZZ**''/ +ZZ**''/ + 4ZZ 12F{{KK#dmmo2F(F(.0013	;;vT]]_1E'E'-//13H%00HEE"--iB!??6X+=>#,,X-BC)ZZ 12F{{{KK#dmmo2F(F(.0013	;;vT]]_1E'E'-//13F#..y(CG$//	8D!??6X+=>#,,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  oR!                  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  pX;   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  pU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" X4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   @ & #ZZ
jj''	C	'	'[[
jj	C**	+	+;;RJJjjSn-.o 3 ,G$.$8$8$:;$:qjjl$:F; jj400
=z?c&k)HCS/! ""3::#4#45@@J(335;;=Q=daTQT=EQ 
II IIgE&vzz'*+%+\\^N^TQq||H7MDAD^LN &&(S		#SWcN#

3 )
 i!7!7!C!C!EF 
LL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    dhhj28+T!W5Kdhhj28+T!W5Kkk+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/    
UQYUQY&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iik 
$ /2jjl.@.@.FG.FdZZ\.FM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\     JJNN>>)3LM	""9-I77>>)$$
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$                  " XR)                  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.

zThis 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AdV4
(CWW\\-	":BGG<L<LS<QR
ww~~j)),.. 1TF*O!PQQ(			Y	&#	&B	wwr{!!WWSb\ v~NN2e9.KL5	NN2e9vx.@A5	^^BvJ(0CD6
~~blUDMB8N IK 
	G!$nnV]]_=7F IC 
	^^BvJ0MN6
^^BvJ0NO6
^^BvJ90EF6
< I9 
	nnR[2NO7^^BvJY@6
4 I1 
	uIMM'')5	. I+ 
	nnwK<
7 yMS
9 NNuIH
5	 I 
~~bl38r)}59 I 
	^^BvJ/6

 I 
	^^BvJ/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)zReturn 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%%'86<=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$ )zReturn 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4U;J (MZq	>!a6!9n!ZJM  '3::0011JJ++-	JJ..0	 	&  '\IN --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)	zCalculate 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)\(?gz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BQB
?C
((3&=#+tu0D/L
MC
'''
(Cxxz 
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
zz7z++ 3x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,     Uw!*QPSBT-%**1--ws   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    %#UwUUUw&eW$5gY ?;-|-
 	
 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4F  -88H!1!00CJ  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     >gF%%''gs   )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~~cmm334Q7DDFH$113	((*>g>>>"!..0(MM), 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4ZHbzH!(^,,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@    rV4=)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      ||/0H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??#gg&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(ggcggc2.@+AQ+FGH77;0@A77;2 H *23D*EH&'*3&'99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 {{$$9S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
00r+   