Ë
    ªehF‡  ã                   ó|  — d dl mZ d dlZd dlZd dlZd dlZd dl	m
Z d dlmZ ddlmZ ddlmZmZmZmZmZ ddlmZ ddlmZmZ dd	lmZmZ dd
lmZm Z  g d¢Z! e e"dd¬«      «      Z# e"dTi dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d"“d#d$“d%d&“d'd(“d)d*“d+d,“d-d.“d/d0“d1d2“d3d4“ŽZ$ ejJ                  e d5    ee«       ee$«       ejL                  ejN                  «      ¬6«      Z( G d7„ d8e«      Z) G d9„ d:e)«      Z* G d;„ d<e)«      Z+	 dUdddddddddddddd=ddd>d?d@ddAd=dBddCdDddEœdF„Z,dGj[                  e#e(e dH   e dI   ¬J«      e,_.        	 dUdddddddddddd=ddCddKœdL„Z/dMj[                  e#e(e dH   e dI   ¬J«      e/_.        	 dUddddddddddddddddddddddCdNdOdddPœdQ„Z0dRj[                  e#e(e dH   ¬S«      e0_.        y)Vé    )ÚpartialN)Únormalize_kwargsé   )ÚVectorPlotter)Úadjust_legend_subtitlesÚ_default_colorÚ_deprecate_ciÚ_get_transform_functionsÚ_scatter_legend_artist)Úgroupby_apply_include_groups)ÚEstimateAggregatorÚWeightedAggregator)Ú	FacetGridÚ_facet_docs)ÚDocstringComponentsÚ
_core_docs)ÚrelplotÚscatterplotÚlineplotaU  
The relationship between `x` and `y` can be shown for different subsets
of the data using the `hue`, `size`, and `style` parameters. These
parameters control what visual semantics are used to identify the different
subsets. It is possible to show up to three dimensions independently by
using all three semantic types, but this style of plot can be hard to
interpret and is often ineffective. Using redundant semantics (i.e. both
`hue` and `style` for the same variable) can be helpful for making
graphics more accessible.

See the :ref:`tutorial <relational_tutorial>` for more information.
    aÐ  
The default treatment of the `hue` (and to a lesser extent, `size`)
semantic, if present, depends on whether the variable is inferred to
represent "numeric" or "categorical" data. In particular, numeric variables
are represented with a sequential colormap by default, and the legend
entries show regular "ticks" with values that may or may not exist in the
data. This behavior can be controlled through various parameters, as
described and illustrated below.
    )Úmain_apiÚrelational_semanticÚ	data_varszž
x, y : names of variables in `data` or vector data
    Input data variables; must be numeric. Can pass data directly or
    reference columns in `data`.
    Údataa{  
data : DataFrame, array, or list of arrays
    Input data structure. If `x` and `y` are specified as names, this
    should be a "long-form" DataFrame containing those columns. Otherwise
    it is treated as "wide-form" data and grouping variables are ignored.
    See the examples for the various ways this parameter can be specified
    and the different effects of each.
    ÚpaletteaZ  
palette : string, list, dict, or matplotlib colormap
    An object that determines how colors are chosen when `hue` is used.
    It can be the name of a seaborn palette or matplotlib colormap, a list
    of colors (anything matplotlib understands), a dict mapping levels
    of the `hue` variable to colors, or a matplotlib colormap object.
    Ú	hue_orderzÁ
hue_order : list
    Specified order for the appearance of the `hue` variable levels,
    otherwise they are determined from the data. Not relevant when the
    `hue` variable is numeric.
    Úhue_normzÎ
hue_norm : tuple or :class:`matplotlib.colors.Normalize` object
    Normalization in data units for colormap applied to the `hue`
    variable when it is numeric. Not relevant if `hue` is categorical.
    Úsizesa  
sizes : list, dict, or tuple
    An object that determines how sizes are chosen when `size` is used.
    List or dict arguments should provide a size for each unique data value,
    which forces a categorical interpretation. The argument may also be a
    min, max tuple.
    Ú
size_orderzÀ
size_order : list
    Specified order for appearance of the `size` variable levels,
    otherwise they are determined from the data. Not relevant when the
    `size` variable is numeric.
    Ú	size_normz�
size_norm : tuple or Normalize object
    Normalization in data units for scaling plot objects when the
    `size` variable is numeric.
    Údashesaâ  
dashes : boolean, list, or dictionary
    Object determining how to draw the lines for different levels of the
    `style` variable. Setting to `True` will use default dash codes, or
    you can pass a list of dash codes or a dictionary mapping levels of the
    `style` variable to dash codes. Setting to `False` will use solid
    lines for all subsets. Dashes are specified as in matplotlib: a tuple
    of `(segment, gap)` lengths, or an empty string to draw a solid line.
    Úmarkersaƒ  
markers : boolean, list, or dictionary
    Object determining how to draw the markers for different levels of the
    `style` variable. Setting to `True` will use default markers, or
    you can pass a list of markers or a dictionary mapping levels of the
    `style` variable to markers. Setting to `False` will draw
    marker-less lines.  Markers are specified as in matplotlib.
    Ústyle_orderzÂ
style_order : list
    Specified order for appearance of the `style` variable levels
    otherwise they are determined from the data. Not relevant when the
    `style` variable is numeric.
    Úunitsa:  
units : vector or key in `data`
    Grouping variable identifying sampling units. When used, a separate
    line will be drawn for each unit with appropriate semantics, but no
    legend entry will be added. Useful for showing distribution of
    experimental replicates when exact identities are not needed.
    Ú	estimatorzÑ
estimator : name of pandas method or callable or None
    Method for aggregating across multiple observations of the `y`
    variable at the same `x` level. If `None`, all observations will
    be drawn.
    Úciz¸
ci : int or "sd" or None
    Size of the confidence interval to draw when aggregating.

    .. deprecated:: 0.12.0
        Use the new `errorbar` parameter for more flexibility.

    Ún_bootzY
n_boot : int
    Number of bootstraps to use for computing the confidence interval.
    Úseedz‰
seed : int, numpy.random.Generator, or numpy.random.RandomState
    Seed or random number generator for reproducible bootstrapping.
    ÚlegendaŒ  
legend : "auto", "brief", "full", or False
    How to draw the legend. If "brief", numeric `hue` and `size`
    variables will be represented with a sample of evenly spaced values.
    If "full", every group will get an entry in the legend. If "auto",
    choose between brief or full representation based on number of levels.
    If `False`, no legend data is added and no legend is drawn.
    Úax_inzb
ax : matplotlib Axes
    Axes object to draw the plot onto, otherwise uses the current Axes.
    Úax_outzS
ax : matplotlib Axes
    Returns the Axes object with the plot drawn onto it.
    Úparams)ÚcoreÚfacetsÚrelÚstatc                   ó   — e Zd ZdddddœZdZy)Ú_RelationalPlotterz@indexz@valuesz@columns)ÚxÚyÚhueÚstyleTN)Ú__name__Ú
__module__Ú__qualname__Úwide_structureÚsort© ó    úP/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/seaborn/relational.pyr1   r1   ¼   s   „ ð ˜I¨jÀ:ñ€Nð
 �Dr<   r1   c                   óF   ‡ — e Zd Zg d¢Zdi ddddddddddœˆ fd„
Zd„ Zˆ xZS )Ú_LinePlotter)ÚcolorÚ	linewidthÚmarkerr    NTr2   ©r   Ú	variablesr$   r&   r'   Úerrorbarr:   ÚorientÚ	err_styleÚerr_kwsr(   c                ó  •— t         j                  d   t        j                  d   z  | _        t
        ‰| �  ||¬«       || _        || _        || _	        || _
        || _        || _        |	| _        |
€i n|
| _        || _        y )N©g      à?é   zlines.linewidth©r   rD   )ÚnpÚr_ÚmplÚrcParamsÚ_default_size_rangeÚsuperÚ__init__r$   rE   r&   r'   r:   rF   rG   rH   r(   )Úselfr   rD   r$   r&   r'   rE   r:   rF   rG   rH   r(   Ú	__class__s               €r=   rS   z_LinePlotter.__init__Ê   s€   ø€ ô �E‰E�%‰Lœ3Ÿ<™<Ð(9Ñ:Ñ:ð 	Ô ô 	‰Ñ˜d¨iÐÔ8à"ˆŒØ ˆŒØˆŒØˆŒ	ØˆŒ	ØˆŒØ"ˆŒØ$˜_‘r°'ˆŒàˆ�r<   c           	      óø
  — t        |t        j                  j                  «      }|j	                  dd«       |j	                  dd«       | j
                  j                  «       }| j                  dk(  r|j	                  dd«       nB| j                  dk(  rn2| j                  �&d
}t        |j                  | j                  «      «      ‚d| j                  v } |rt        nt        | j                  | j                  | j                  | j                   ¬«      }| j"                  }|dvrd|›d�}t        |«      ‚dddœ|   }d}	| j%                  |	d¬«      D �]„  \  }
}| j&                  r4d||g}|D �cg c]  }|| j(                  v sŒ|‘Œ }}|j+                  |«      }| j                  �ˆ||   j-                  «       j/                  «       dkD  rdd| j(                  v rd}t        |«      ‚|j1                  || j&                  ¬«      } |j2                  ||fi t5        d«      ¤Žj7                  «       }n,t8        j:                  ||› d�<   t8        j:                  ||› d�<   dD ]9  }t=        ||«      \  }}|j?                  d|› �¬«      D ]  } |||   «      ||<   Œ Œ; d| j(                  v rEg }|j1                  d«      D ].  \  }}|jA                   |jB                  |d   |d   fi |¤Ž«       Œ0 n |jB                  |d   |d   fi |¤Ž}|D ]š  }d |
v r#|jE                  | jG                  |
d    «      «       d!|
v r#|jI                  | jK                  |
d!   «      «       d"|
v sŒV| jM                  |
d"   «      }d#|v r|jO                  |d#   «       d$|v sŒ‡|jQ                  |d$   «       Œœ jS                  «       }|jU                  «       }|jW                  «       }| j                  €�Œ�| j                  €�Œ�| j                  dk(  r:|jX                  |jZ                  dœ|   } |||   ||› d�   ||› d�   fd%|i|¤Ž �Œæ| j                  dk(  s�Œ÷|› d&�||   ||› d�   z
  ||› d�   ||   z
  fi} |j                  |d   |d   fi |¤d'||d(œ¤|¤Ž}|j]                  «       D ]8  }t_        |t        j`                  jb                  «      sŒ(|je                  |«       Œ: �Œ‡ | jg                  |«       | jh                  r~tk        t        j                  j                  g g ¬)«      }d%d*d	dœ}| jm                  ||||«       |jo                  «       \  } }| r(|ji                  | jp                  ¬+«      }!ts        |!«       y	y	y	c c}w ),z6Draw the plot onto an axes, passing matplotlib kwargs.Úmarkeredgewidthg      è?ÚmarkeredgecolorÚwÚbandÚalphagš™™™™™É?ÚbarsNz,`err_style` must be 'band' or 'bars', not {}Úweight)r&   r'   >   r2   r3   z(`orient` must be either 'x' or 'y', not ú.r3   r2   ©r2   r3   ©r4   Úsizer5   T)Úfrom_comp_datar#   r   z,estimator must be None when specifying units)r:   FÚminÚmaxÚxyú^)Úregexr4   ra   r5   r    rB   r@   ÚerrÚ )Ú	linestyler@   r[   ©ÚxdataÚydatarA   ©Útitle):r   rO   ÚlinesÚLine2DÚ
setdefaultrH   ÚcopyrG   Ú
ValueErrorÚformatÚ	plot_datar   r   r$   rE   r&   r'   rF   Ú	iter_datar:   rD   Úsort_valuesÚvalue_countsrd   ÚgroupbyÚapplyr   Úreset_indexrM   Únanr
   ÚfilterÚextendÚplotÚ	set_colorÚ_hue_mapÚset_linewidthÚ	_size_mapÚ
_style_mapÚ
set_dashesÚ
set_markerÚ	get_colorÚ	get_alphaÚget_solid_capstyleÚfill_betweenÚfill_betweenxÚget_childrenÚ
isinstanceÚcollectionsÚLineCollectionÚset_capstyleÚ_add_axis_labelsr(   r   Úadd_legend_dataÚget_legend_handles_labelsÚlegend_titler   )"rT   ÚaxÚkwsrH   rh   ÚweightedÚaggrF   ÚotherÚgrouping_varsÚsub_varsÚsub_dataÚ	sort_varsÚvarÚ	sort_colsÚgroupedÚ_ÚinvÚcolrp   Ú	unit_dataÚlineÚ
attributesÚ
line_colorÚ
line_alphaÚline_capstyleÚfuncÚerror_paramÚebarsÚobjÚlegend_artistÚattrsÚhandlesr(   s"                                     r=   r€   z_LinePlotter.plotå   s©  € ô ˜s¤C§I¡I×$4Ñ$4Ó5ˆØ�‰Ð(¨$Ô/Ø�‰Ð(¨#Ô.ð —,‘,×#Ñ#Ó%ˆØ�>‰>˜VÒ#Ø×Ñ˜w¨Õ+Ø�^‰^˜vÒ%ØØ�^‰^Ð'Ø@ˆCÜ˜SŸZ™Z¨¯©Ó7Ó8Ð8ð ˜tŸ~™~Ð-ˆØE¡XÕ!Ô3EØ�N‰N˜DŸM™M°$·+±+ÀDÇIÁIô
ˆð
 —‘ˆØ˜Ñ#Ø<¸V¸JÀaÐHˆCÜ˜S“/Ð!Ø Ñ$ VÑ,ˆð /ˆØ"&§.¡.°Èt .Ó"Tó ]	<ÑˆH�hà�yŠyØ$ f¨eÐ4�	Ø,5ÖO S¸ÀÇÁÒ9NšSÐO�	ÐOØ#×/Ñ/°	Ó:�ð —‘Ð*Ø˜VÑ$×1Ñ1Ó3×7Ñ7Ó9¸AÒ=à˜dŸn™nÑ,àH�CÜ$ S›/Ð)Ø"×*Ñ*¨6¸¿	¹	Ð*ÓB�ð�Gß‘U˜3 ñNÜ)EÀeÓ)LñNç ‘[“]ñ ô +-¯&©&�˜E˜7 #˜Ñ'Ü*,¯&©&�˜E˜7 #˜Ñ'ð ò 7�Ü1°"°cÓ:‘��3Ø#Ÿ?™?°1°S°E°˜?Ó;ò 7�CÙ$'¨°©Ó$6�H˜S’Mñ7ð7ð ˜$Ÿ.™.Ñ(Ø�Ø$,×$4Ñ$4°WÓ$=ò Q‘L�A�yØ—L‘L  §¡¨°3©¸À3¹Ñ!OÈ3Ñ!OÕPñQð  ˜Ÿ™ ¨¡¨x¸©}ÑDÀÑD�àò >�à˜HÑ$Ø—N‘N 4§=¡=°¸%±Ó#AÔBà˜XÑ%Ø×&Ñ& t§~¡~°h¸vÑ6FÓ'GÔHà˜hÒ&Ø!%§¡°¸'Ñ1BÓ!C�JØ :Ñ-ØŸ™¨
°8Ñ(<Ô=Ø :Ò-ØŸ™¨
°8Ñ(<Õ=ð>ð Ÿ™Ó)ˆJØŸ™Ó)ˆJØ ×3Ñ3Ó5ˆMð �~‰~Ò)¨d¯m©mÒ.Gð —>‘> VÒ+à!#§¡°r×7GÑ7GÑHÈÑP�DÙØ  Ñ(Ø  E 7¨# Ñ/°¸U¸GÀ3¸-Ñ1Hñð )ðð -4ôð —^‘^ vÔ-ð !˜' ˜Ø$ U™O¨h¸%¸À°}Ñ.EÑEØ$¨ w¨c ]Ñ3°h¸u±oÑEð(ð#�Kð (˜BŸK™KØ  ™ x°¡}ñØ8Cðà"$¨J¸jòð "ñ�Eð  %×1Ñ1Ó3ò <˜Ü% c¬3¯?©?×+IÑ+IÕJØ×,Ñ,¨]Õ;ò<ðw]	<ð@ 	×Ñ˜bÔ!Ø�;Š;Ü#¤C§I¡I×$4Ñ$4¸BÀbÔIˆMØ#¨[À4ÑHˆEØ× Ñ   ]°C¸Ô?Ø×5Ñ5Ó7‰JˆG�QÙØŸ™¨×):Ñ):˜Ó;�Ü'¨Õ/ð ð ùò{ Ps   Å/U7ÆU7©r6   r7   r8   Ú_legend_attributesrS   r€   Ú__classcell__©rU   s   @r=   r?   r?   Æ   s/   ø„ âCÐð ˜RØ˜t¨$¸Ø˜#¨°tÀDö	ö6W0r<   r?   c                   ó6   ‡ — e Zd Zg d¢Zdi ddœˆ fd„
Zd„ Zˆ xZS )Ú_ScatterPlotter)r@   ÚsrB   N©r   rD   r(   c                ó´   •— t         j                  d   t        j                  t        j                  d   «      z  | _        t        ‰| �  ||¬«       || _        y )NrJ   zlines.markersizerL   )	rM   rN   ÚsquarerO   rP   rQ   rR   rS   r(   )rT   r   rD   r(   rU   s       €r=   rS   z_ScatterPlotter.__init__ƒ  sK   ø€ ô �E‰E�%‰Lœ2Ÿ9™9¤S§\¡\Ð2DÑ%EÓFÑFð 	Ô ô 	‰Ñ˜d¨iÐÔ8àˆ�r<   c                 óp  — | j                   j                  «       }|j                  ry t        |t        j
                  j                  «      }t        j                  t        |«      t        j                  «      }|j                  d|«      }|j                  d|«      }t        |d«      \  }}t        |d«      \  }}	 ||«       |	|«      }}d| j                  v r=| j                  j                  d   }
| j                  |
d«      }|j!                  d|«       |j                  dt        j"                  j                  dd«      «      }t%        |t        j&                  j(                  «      st        j&                  j)                  |«      }|j+                  «       r|j!                  dd«        |j,                  d||d	œ|¤Ž}d
| j                  v r#|j/                  | j1                  |d
   «      «       d| j                  v r#|j3                  | j5                  |d   «      «       d| j                  v r3|d   D �cg c]  }| j                  |d«      ‘Œ }}|j7                  |«       d|vrR|j9                  «       }dt        j:                  t        j<                  |d«      «      z  }|j?                  |«       ||d<   | jA                  |«       | jB                  r\ddd dœ}| jE                  |tF        ||«       |jI                  «       \  }}|r(|jC                  | jJ                  ¬«      }tM        |«       y y y c c}w )Nr2   r3   r5   r   rB   ÚoÚ	edgecolorrY   r_   r4   ra   ÚpathrA   g{®Gáz´?é
   r@   r¸   r`   rn   r;   )'Ú	comp_dataÚdropnaÚemptyr   rO   r�   ÚPathCollectionrM   ÚfullÚlenr}   Úgetr
   rD   r…   Úlevelsrr   rP   rŽ   r!   ÚMarkerStyleÚ	is_filledÚscatterÚset_facecolorsr‚   Ú	set_sizesr„   Ú	set_pathsÚ	get_sizesÚsqrtÚ
percentileÚset_linewidthsr’   r(   r“   r   r”   r•   r   )rT   r–   r—   r   rÃ   r2   r3   r¢   Úinv_xÚinv_yÚexample_levelÚexample_markerÚmÚpointsÚvalÚpr   rA   r°   r±   r(   s                        r=   r€   z_ScatterPlotter.plot�  s¶  € ð �~‰~×$Ñ$Ó&ˆØ�:Š:Øä˜s¤C§O¡O×$BÑ$BÓCˆô —‘œ˜D›	¤2§6¡6Ó*ˆØ�H‰H�S˜%Ó ˆØ�H‰H�S˜%Ó ˆô ,¨B°Ó4‰ˆˆ5Ü+¨B°Ó4‰ˆˆ5Ù�Q‹x™˜q›ˆ1ˆà�d—n‘nÑ$ð !ŸO™O×2Ñ2°1Ñ5ˆMØ!Ÿ_™_¨]¸HÓEˆNØ�N‰N˜8 ^Ô4ð �G‰G�HœcŸl™l×.Ñ.¨x¸Ó=Ó>ˆÜ˜!œSŸ[™[×4Ñ4Ô5ä—‘×'Ñ'¨Ó*ˆAØ�;‰;Œ=Ø�N‰N˜;¨Ô,ð �—‘Ð,˜a 1Ñ,¨Ñ,ˆð �D—N‘NÑ"Ø×!Ñ! $§-¡-°°U±Ó"<Ô=à�T—^‘^Ñ#Ø×Ñ˜TŸ^™^¨D°©LÓ9Ô:à�d—n‘nÑ$Ø9=¸g¹ÖG°#�—‘  fÕ-ÐGˆAÐGØ×Ñ˜QÔð ˜cÑ!Ø×$Ñ$Ó&ˆEØœbŸg™g¤b§m¡m°E¸2Ó&>Ó?Ñ?ˆIØ×!Ñ! )Ô,Ø(ˆC�Ñð 	×Ñ˜bÔ!Ø�;Š;Ø#¨S¸4Ñ@ˆEØ× Ñ  Ô%;¸SÀ%ÔHØ×5Ñ5Ó7‰JˆG�QÙØŸ™¨×):Ñ):˜Ó;�Ü'¨Õ/ð ð	 ùò Hs   È7L3r²   rµ   s   @r=   r·   r·     s   ø„ â1Ðà#¨r¸$ö öD0r<   r·   TÚmean)r%   é_   iè  r2   rZ   ÚautoÚ
deprecated)r2   r3   r4   ra   r5   r#   Úweightsr   r   r   r   r   r   r    r!   r"   r$   rE   r&   r'   rF   r:   rG   rH   r(   r%   r–   c                óX  — t        ||«      }t        | t        |||||||¬«      |||||||||¬«      }|j                  ||	|
¬«       |j	                  |||¬«       |j                  |||¬«       |€t        j                  «       }d|j                  vr)ddht        |«      z  s|�t        |t        «      rd	n||d
<   |j                  s|S |j                  |«       |j                  d|j                  dd «      «      }t        |j                   |||«      |d<   |j!                  ||«       |S )N)r2   r3   r4   ra   r5   r#   r]   rC   ©r   ÚorderÚnorm©r   râ   rã   ©r!   r    râ   r5   Úlsrj   ri   r    r@   Úc)r	   r?   ÚdictÚmap_hueÚmap_sizeÚ	map_styleÚpltÚgcarD   ÚsetrŽ   ÚboolÚhas_xy_dataÚ_attachÚpopr   r€   )r   r2   r3   r4   ra   r5   r#   rß   r   r   r   r   r   r   r    r!   r"   r$   rE   r&   r'   rF   r:   rG   rH   r(   r%   r–   ÚkwargsrÚ   r@   s                                  r=   r   r   ×  s(  € ô ˜X rÓ*€HäØÜØ�1˜# D°¸UÈ7ô
ð  F°ÀØ˜&¨I¸wØô	€Að ‡I�I�g Y°X€IÔ>Ø‡J�J�U *°9€JÔ=Ø‡K�K˜¨°k€KÔBà	€zÜ�W‰W‹Yˆà�a—k‘kÑ!¨4°Ð*=ÄÀFÃÒ*KØ!' ´:¸fÄdÔ3K™2ÐQWˆˆxÑà�=Š=Øˆ	à‡I�Iˆb„Mð �J‰J�w §
¡
¨3°Ó 5Ó6€EÜ$ R§W¡W¨c°5¸&ÓA€Fˆ7�Oà‡F�Fˆ2ˆvÔØ€Ir<   a½	  Draw a line plot with possibility of several semantic groupings.

{narrative.main_api}

{narrative.relational_semantic}

By default, the plot aggregates over multiple `y` values at each value of
`x` and shows an estimate of the central tendency and a confidence
interval for that estimate.

Parameters
----------
{params.core.data}
{params.core.xy}
hue : vector or key in `data`
    Grouping variable that will produce lines with different colors.
    Can be either categorical or numeric, although color mapping will
    behave differently in latter case.
size : vector or key in `data`
    Grouping variable that will produce lines with different widths.
    Can be either categorical or numeric, although size mapping will
    behave differently in latter case.
style : vector or key in `data`
    Grouping variable that will produce lines with different dashes
    and/or markers. Can have a numeric dtype but will always be treated
    as categorical.
{params.rel.units}
weights : vector or key in `data`
    Data values or column used to compute weighted estimation.
    Note that use of weights currently limits the choice of statistics
    to a 'mean' estimator and 'ci' errorbar.
{params.core.palette}
{params.core.hue_order}
{params.core.hue_norm}
{params.rel.sizes}
{params.rel.size_order}
{params.rel.size_norm}
{params.rel.dashes}
{params.rel.markers}
{params.rel.style_order}
{params.rel.estimator}
{params.stat.errorbar}
{params.rel.n_boot}
{params.rel.seed}
orient : "x" or "y"
    Dimension along which the data are sorted / aggregated. Equivalently,
    the "independent variable" of the resulting function.
sort : boolean
    If True, the data will be sorted by the x and y variables, otherwise
    lines will connect points in the order they appear in the dataset.
err_style : "band" or "bars"
    Whether to draw the confidence intervals with translucent error bands
    or discrete error bars.
err_kws : dict of keyword arguments
    Additional parameters to control the aesthetics of the error bars. The
    kwargs are passed either to :meth:`matplotlib.axes.Axes.fill_between`
    or :meth:`matplotlib.axes.Axes.errorbar`, depending on `err_style`.
{params.rel.legend}
{params.rel.ci}
{params.core.ax}
kwargs : key, value mappings
    Other keyword arguments are passed down to
    :meth:`matplotlib.axes.Axes.plot`.

Returns
-------
{returns.ax}

See Also
--------
{seealso.scatterplot}
{seealso.pointplot}

Examples
--------

.. include:: ../docstrings/lineplot.rst

ÚreturnsÚseealso)Ú	narrativer+   rô   rõ   )r2   r3   r4   ra   r5   r   r   r   r   r   r   r!   r"   r(   r–   c          
      óœ  — t        | t        |||||¬«      |¬«      }|j                  |||¬«       |j                  |	|
|¬«       |j	                  ||¬«       |€t        j                  «       }|j                  s|S |j                  |«       |j                  dd «      }t        |j                  |||«      |d<   |j                  ||«       |S )N©r2   r3   r4   ra   r5   r¹   rá   rä   )r!   râ   r@   )r·   rè   ré   rê   rë   rì   rí   rð   rñ   rò   r   rË   r€   )r   r2   r3   r4   ra   r5   r   r   r   r   r   r   r!   r"   r(   r–   ró   rÚ   r@   s                      r=   r   r   ^  s¼   € ô 	ØÜ˜˜a S¨t¸5ÔAØô	€Að ‡I�I�g Y°X€IÔ>Ø‡J�J�U *°9€JÔ=Ø‡K�K˜ {€KÔ3à	€zÜ�W‰W‹Yˆà�=Š=Øˆ	à‡I�Iˆb„Mà�J‰J�w Ó%€EÜ$ R§Z¡Z°°e¸VÓD€Fˆ7�Oà‡F�Fˆ2ˆvÔà€Ir<   a  Draw a scatter plot with possibility of several semantic groupings.

{narrative.main_api}

{narrative.relational_semantic}

Parameters
----------
{params.core.data}
{params.core.xy}
hue : vector or key in `data`
    Grouping variable that will produce points with different colors.
    Can be either categorical or numeric, although color mapping will
    behave differently in latter case.
size : vector or key in `data`
    Grouping variable that will produce points with different sizes.
    Can be either categorical or numeric, although size mapping will
    behave differently in latter case.
style : vector or key in `data`
    Grouping variable that will produce points with different markers.
    Can have a numeric dtype but will always be treated as categorical.
{params.core.palette}
{params.core.hue_order}
{params.core.hue_norm}
{params.rel.sizes}
{params.rel.size_order}
{params.rel.size_norm}
{params.rel.markers}
{params.rel.style_order}
{params.rel.legend}
{params.core.ax}
kwargs : key, value mappings
    Other keyword arguments are passed down to
    :meth:`matplotlib.axes.Axes.scatter`.

Returns
-------
{returns.ax}

See Also
--------
{seealso.lineplot}
{seealso.stripplot}
{seealso.swarmplot}

Examples
--------

.. include:: ../docstrings/scatterplot.rst

rË   é   )r2   r3   r4   ra   r5   r#   rß   Úrowr¤   Úcol_wrapÚ	row_orderÚ	col_orderr   r   r   r   r   r   r!   r    r"   r(   ÚkindÚheightÚaspectÚ	facet_kwsc                ó0  — |dk(  rt         }t        }|€dn|}n)|dk(  rt        }t        }|€dn|}nd|› d�}t	        |«      ‚d|v r?dj                  |dz   «      }t        j                  |t        «       |j                  d«       t        |||||¬	«      } |dk(  r|| d
<   || d<   n6|�d}t        j                  |d¬«       |�d}t        j                  |d¬«        || | |¬«      }!|!j                  |||¬«       |!j                  |||¬«       |!j                  |||¬«       d|!j                  v rC|!j                  j                   }|!j                  j"                  }|!j                  j$                  }nd x}x}}d|!j                  v rB|!j&                  j                   }|!j&                  j"                  }|!j&                  j$                  }d|!j                  v ra|!j(                  j"                  }|r!|D �"ci c]  }"|"|!j)                  |"d«      “Œ }}"nd }|r!|D �"ci c]  }"|"|!j)                  |"d«      “Œ }}"n	d }nd x}x}}|!j                  } |!j*                  }#t        |||||||||d¬«
      }$|$j-                  |«       |dk(  r|$j                  d«       t        ||||	|||¬«      }%|dk(  r|%j-                  ||¬«       |!j/                  | |%«       | D �&ci c]  }&|&d|&› �“Œ
 }'}&d|'v r|'j                  d«      |'d<   |$j-                  |'«       dD ]4  }(|(|!j                  v sŒ|!j                  |(   �Œ"d|(› d�|!j                  |(<   Œ6 dD �&ci c]  }&|&|!j                  j1                  |&«      “Œ  })}&|'j3                  «       }*|*j-                  |)«       |!j*                  j5                  |*¬ «      }+|€i n|j3                  «       }t7        d4d!|+j9                  d"d#¬$«      i|)¤|
||||dd%œ¤|¤Ž}, |,j:                  |fi |$¤Ž |,j=                  | j1                  d&«      xs d'| j1                  d(«      xs d'«       |r÷|#|!_        g d)¢}-|dk(  rt>        }.|-g d*¢z  }-n-tA        tB        jD                  jF                  g g ¬+«      }.|-g d,¢z  }-|jI                  «       D �"�&ci c]  \  }"}&|"|-v sŒ|"|&“Œ }/}"}&d-d d.œ}0|dk(  rd/|0d<   n
|dk(  rd0|0d<   |!jK                  |,jL                  jN                  d1   |.|/|0«       |!jP                  r3|,jS                  |!jP                  |!jT                  |!jV                  d¬2«       | jI                  «       D �"�&ci c]  \  }"}&d|"› �|&€d|"› d�n|&“Œ }1}"}&|,jX                  j5                  |1¬ «      }2| �y|€|�ut[        | t\        j^                  «      st]        j^                  | «      } t]        j`                  | |2|2jb                  je                  | jb                  «         dd¬3«      |,_,        |,S |2|,_,        |,S c c}"w c c}"w c c}&w c c}&w c c}&}"w c c}&}"w )5NrË   Tr¦   z
Plot kind z not recognizedr–   zarelplot is a figure-level function and does not accept the `ax` parameter. You may wish to try {}r€   rø   r#   r]   z8The `units` parameter has no effect with kind='scatter'.rK   )Ú
stacklevelz:The `weights` parameter has no effect with kind='scatter'.r¹   rá   rä   rå   r4   ra   r5   rB   r    F)
r   r   r   r   r   r   r!   r    r"   r(   )r2   r3   rú   r¤   r4   ra   r5   )r#   rß   r¢   rß   )rú   r¤   )Úcolumnsr   r   Úall)ÚaxisÚhow)rû   rü   rý   rÿ   r   rÂ   r2   ri   r3   )rç   r@   r[   r×   rB   )r¸   Ú	facecolorÚfcr¾   ÚecrA   Úlwrk   )
Ú
markersizeÚmsrW   ÚmewrX   Úmecrj   ræ   rA   r  r@   )r4   r5   r¸   rA   r   )Úlegend_dataÚlabel_orderro   Úadjust_subtitles)Ú
left_indexÚright_indexr;   )3r·   r   r?   r   rt   ru   ÚwarningsÚwarnÚUserWarningrò   rè   ré   rê   rë   rD   r‚   Úlookup_tablerÈ   rã   r„   r…   rv   ÚupdateÚassign_variablesrÇ   rs   Úrenamer   rÂ   Úmap_dataframeÚset_axis_labelsr   r   rO   rp   rq   Úitemsr“   ÚaxesÚflatr  Ú
add_legendÚlegend_orderr•   r   rŽ   ÚpdÚ	DataFrameÚmerger  Ú
difference)3r   r2   r3   r4   ra   r5   r#   rß   rú   r¤   rû   rü   rý   r   r   r   r   r   r   r!   r    r"   r(   rþ   rÿ   r   r  ró   ÚPlotterr«   rh   ÚmsgrD   rÚ   Úkrv   Úplot_kwsÚgrid_variablesÚvÚplot_variablesrŸ   Úgrid_kwsÚnew_colsÚ	full_dataÚgÚkeysr¯   Ú
common_kwsr°   Ú	orig_colsÚ	grid_datas3                                                      r=   r   r   ¼  sK  € ð ˆyÒä!ˆÜˆØ!˜/‘$¨w‰à	�ŠäˆÜˆØ˜‘¨V‰ð ˜4˜& Ð0ˆÜ˜‹oÐð ˆv�~ð9ß9?¹ÀÀvÁÓ9Nð 	ô 	�‰�cœ;Ô'Ø�
‰
�4Ôô �q˜A 3¨T¸Ô?€IØˆv‚~Ø"ˆ	�'ÑØ%ˆ	�(ÒàÐØLˆCÜ�M‰M˜#¨!Õ,ØÐØNˆCÜ�M‰M˜#¨!Õ,ÙØØØô	€Að
 ‡I�I�g Y°X€IÔ>Ø‡J�J�U *°9€JÔ=Ø‡K�K˜¨°k€KÔBð �—‘ÑØ—*‘*×)Ñ)ˆØ—J‘J×%Ñ%ˆ	Ø—:‘:—?‘?‰à)-Ð-ˆÐ-�)˜hà�—‘ÑØ—‘×(Ñ(ˆØ—[‘[×'Ñ'ˆ
Ø—K‘K×$Ñ$ˆ	à�!—+‘+ÑØ—l‘l×)Ñ)ˆÙØ=HÖI¸�q˜!Ÿ,™, q¨(Ó3Ñ3ÐIˆGÑIàˆGÙØ<GÖH°q�a˜Ÿ™ a¨Ó2Ñ2ÐHˆFÑHà‰Fà)-Ð-ˆÐ-�&˜;ð —‘€IØ—‘€Iô Ø 9°xØ 
°iØ °KØô	€Hð ‡O�O�FÔØˆyÒØ�‰�XÔô Ø
ˆq�c˜s¨°$¸eô€Nð ˆv‚~Ø×Ñ E°7ÐÔ;Ø×Ñ�t˜^Ô,ð
 +4Ö4 Q�a˜1˜Q˜C˜‘jÐ4€NÐ4Ø�>Ñ!Ø$2×$6Ñ$6°xÓ$@ˆ�yÑ!Ø‡O�O�NÔ#ð ò *ˆà�!—+‘+Ò !§+¡+¨cÑ"2Ñ":Ø!" 3 % q˜zˆA�K‰K˜Òð*ð 0>Ö>¨!��1—;‘;—?‘? 1Ó%Ñ%Ð>€HÐ>ð ×"Ñ"Ó$€HØ‡O�O�HÔØ—‘×"Ñ"¨8Ð"Ó4€Ið  Ð'‘¨Y¯^©^Ó-=€IÜñ 	Ø×Ñ 1¨%ÐÓ0ð	à
ð	ð  Y¸)Ø˜f¨Uò		ð
 ñ	€Að €A‡O�O�DÑ%˜HÒ%ð ×Ñ�i—m‘m CÓ(Ò.¨B°	·±¸cÓ0BÒ0HÀbÔIáð  ˆŒò 6ˆØ�9ÒÜ2ˆMØÒRÑR‰Dä#¤C§I¡I×$4Ñ$4¸BÀbÔIˆMØò ñ ˆDð (.§|¡|£~×C™t˜q !¸¸dº�a˜‘dÐCˆ
ÑCØ¨$Ñ/ˆØ�9ÒØˆE�&ŠMØ�VŠ^Ø'ˆE�&‰MØ	×Ñ˜!Ÿ&™&Ÿ+™+ a™.¨-¸ÀUÔKØ�=Š=Ø�L‰L Q§]¡]Ø%&§^¡^Ø Ÿ~™~Ø*.ð ô 0ð ;D¿/¹/Ó:K÷Ù26°!°Qˆ!ˆAˆ3ˆ˜Q˜Y�1�Q�C�q‘¨AÑ-ð€Iñ ð —‘—‘ i�Ó0€IØÐ˜Q˜]¨a¨mÜ˜$¤§¡Ô-Ü—<‘< Ó%ˆDÜ—‘ØØ�i×'Ñ'×2Ñ2°4·<±<Ó@ÑAØØô	
ˆŒð €Hð ˆŒà€Hùò} Jùò Iùò@ 5ùò ?ùó` Dùós*   Ç3W8ÈW=ËXÍ#XÒXÒXÔ=Xaê	  Figure-level interface for drawing relational plots onto a FacetGrid.

This function provides access to several different axes-level functions
that show the relationship between two variables with semantic mappings
of subsets. The `kind` parameter selects the underlying axes-level
function to use:

- :func:`scatterplot` (with `kind="scatter"`; the default)
- :func:`lineplot` (with `kind="line"`)

Extra keyword arguments are passed to the underlying function, so you
should refer to the documentation for each to see kind-specific options.

{narrative.main_api}

{narrative.relational_semantic}

After plotting, the :class:`FacetGrid` with the plot is returned and can
be used directly to tweak supporting plot details or add other layers.

Parameters
----------
{params.core.data}
{params.core.xy}
hue : vector or key in `data`
    Grouping variable that will produce elements with different colors.
    Can be either categorical or numeric, although color mapping will
    behave differently in latter case.
size : vector or key in `data`
    Grouping variable that will produce elements with different sizes.
    Can be either categorical or numeric, although size mapping will
    behave differently in latter case.
style : vector or key in `data`
    Grouping variable that will produce elements with different styles.
    Can have a numeric dtype but will always be treated as categorical.
{params.rel.units}
weights : vector or key in `data`
    Data values or column used to compute weighted estimation.
    Note that use of weights currently limits the choice of statistics
    to a 'mean' estimator and 'ci' errorbar.
{params.facets.rowcol}
{params.facets.col_wrap}
row_order, col_order : lists of strings
    Order to organize the rows and/or columns of the grid in, otherwise the
    orders are inferred from the data objects.
{params.core.palette}
{params.core.hue_order}
{params.core.hue_norm}
{params.rel.sizes}
{params.rel.size_order}
{params.rel.size_norm}
{params.rel.style_order}
{params.rel.dashes}
{params.rel.markers}
{params.rel.legend}
kind : string
    Kind of plot to draw, corresponding to a seaborn relational plot.
    Options are `"scatter"` or `"line"`.
{params.facets.height}
{params.facets.aspect}
facet_kws : dict
    Dictionary of other keyword arguments to pass to :class:`FacetGrid`.
kwargs : key, value pairings
    Other keyword arguments are passed through to the underlying plotting
    function.

Returns
-------
{returns.facetgrid}

Examples
--------

.. include:: ../docstrings/relplot.rst

)rö   r+   rô   r;   )N)1Ú	functoolsr   r  ÚnumpyrM   Úpandasr#  Ú
matplotlibrO   Úmatplotlib.pyplotÚpyplotrì   Úmatplotlib.cbookr   Ú_baser   Úutilsr   r   r	   r
   r   Ú_compatr   Ú_statisticsr   r   Úaxisgridr   r   Ú_docstringsr   r   Ú__all__rè   Ú_relational_narrativeÚ_relational_docsÚfrom_nested_componentsÚfrom_function_paramsrS   Ú_param_docsr1   r?   r·   r   ru   Ú__doc__r   r   r;   r<   r=   ú<module>rJ     s2  ðÝ Û ã Û Û Ý Ý -õ÷õ õ 2ß ?ß ,ß 8ò 1€ñ ,©Dððô!-ó Ð ñ6 ò yñðyñ
ðyñ ð!yñ.ð/yñ:ð;yñDðEyñRðSyñ^ð_yñhðiyñzð{yñJðKyñVðWyñdðeyñpðqyñ@ðAyñH
ðIyñPðQyñ`ðayñhðiyÐ ðx 9Ð!×8Ñ8Ø	�HÑ	Ù˜{Ó+ÙÐ,Ó-Ø	1Ð	×	1Ñ	1Ð2D×2MÑ2MÓ	Nô	€ô˜ô ôv0Ð%ô v0ôrU0Ð(ô U0ðr 
ð-à
ˆd˜ 4¨t¸4ÈØ˜D¨4Ø
˜4¨4Ø˜¨4Ø˜z°$¸TØ�T V°TØ�l tô-ð`O÷^ �FØ#ØØ�yÑ!Ø�yÑ!ð	 ó ð_ 	Ô ðp 
ð à
ˆd˜ 4¨tØ˜D¨4Ø
˜4¨4Ø˜d¨6°dô ðF3÷f �FØ#ØØ�yÑ!Ø�yÑ!ð	 ó ðg Ô ðx 
ðGà
ˆd˜ 4¨t¸4ÈØ�$ °ÀØ˜D¨4Ø
˜4¨4Ø˜¨4Ø˜	¨!°AÀôGðTL÷X �FØ#ØØ�yÑ!ð ó ðY …r<   