
    'h                     p   % S SK Jr  S SKrS SKJrJrJr  S SKJr	  \(       a  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 SKJr  S SKJr  \
R6                  S:  a  S SKJr  OS SKJr  \
R6                  S:  a  S SKJr  OS SKJr  \\\\\\\4   rS\ S'   \!\"\4   r#S\ S'    " S S5      r$g)    )annotationsN)TYPE_CHECKINGCallableUnion)altair)ChannelColor)ChannelOrder)ChannelSize)ChannelTooltip)ChannelX)ChannelY)
EncodeKwds)	DataFrame)   
   )	TypeAlias)r      )Unpackr   Encoding	Encodingsc                      \ rS rSrSrS
S jr   S         SS jjr    S           SS jjr    S           SS jjr\r	SS jr
S	rg)DataFramePlot"   zDataFrame.plot namespace.c                :    [         R                  " U5      U l        g )N)altChart_chart)selfdfs     lC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\polars/dataframe/plotting.py__init__DataFramePlot.__init__%   s    iim    Nc                   0 nUb  XS'   Ub  X%S'   Ub  X5S'   U R                   R                  SS9R                  " S0 UDUD6R                  5       $ )a  
Draw bar plot.

Polars does not implement plotting logic itself but instead defers to
`Altair <https://altair-viz.github.io/>`_.

`df.plot.bar(**kwargs)` is shorthand for
`alt.Chart(df).mark_bar().encode(**kwargs).interactive()`,
and is provided for convenience - for full customisability, use a plotting
library directly.

.. versionchanged:: 1.6.0
    In prior versions of Polars, HvPlot was the plotting backend. If you would
    like to restore the previous plotting functionality, all you need to do
    is add `import hvplot.polars` at the top of your script and replace
    `df.plot` with `df.hvplot`.

Parameters
----------
x
    Column with x-coordinates of bars.
y
    Column with y-coordinates of bars.
color
    Column to color bars by.
**kwargs
    Additional keyword arguments passed to Altair.

Examples
--------
>>> df = pl.DataFrame(
...     {
...         "day": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] * 2,
...         "group": ["a"] * 7 + ["b"] * 7,
...         "value": [1, 3, 2, 4, 5, 6, 1, 1, 3, 2, 4, 5, 1, 2],
...     }
... )
>>> df.plot.bar(
...     x="day", y="value", color="day", column="group"
... )  # doctest: +SKIP
xycolorTtooltip )r   mark_barencodeinteractive)r   r%   r&   r'   kwargs	encodingss         r    barDataFramePlot.bar(   sp    b  "	=cN=cN!&gKK   .V ++#)+[]	
r#   c                   0 nUb  XS'   Ub  X&S'   Ub  X6S'   Ub  XFS'   U R                   R                  SS9R                  " S0 UDUD6R                  5       $ )a  
Draw line plot.

Polars does not implement plotting logic itself but instead defers to
`Altair <https://altair-viz.github.io/>`_.

`df.plot.line(**kwargs)` is shorthand for
`alt.Chart(df).mark_line().encode(**kwargs).interactive()`,
and is provided for convenience - for full customisatibility, use a plotting
library directly.

.. versionchanged:: 1.6.0
    In prior versions of Polars, HvPlot was the plotting backend. If you would
    like to restore the previous plotting functionality, all you need to do
    is add `import hvplot.polars` at the top of your script and replace
    `df.plot` with `df.hvplot`.

Parameters
----------
x
    Column with x-coordinates of lines.
y
    Column with y-coordinates of lines.
color
    Column to color lines by.
order
    Column to use for order of data points in lines.
**kwargs
    Additional keyword arguments passed to Altair.

Examples
--------
>>> from datetime import date
>>> df = pl.DataFrame(
...     {
...         "date": [date(2020, 1, 2), date(2020, 1, 3), date(2020, 1, 4)] * 2,
...         "price": [1, 4, 6, 1, 5, 2],
...         "stock": ["a", "a", "a", "b", "b", "b"],
...     }
... )
>>> df.plot.line(x="date", y="price", color="stock")  # doctest: +SKIP
r%   r&   r'   orderTr(   r*   )r   	mark_liner,   r-   )r   r%   r&   r'   r3   r.   r/   s          r    lineDataFramePlot.linef   s~    f  "	=cN=cN!&g!&gKK!!$!/V ++#)+[]	
r#   c                   0 nUb  XS'   Ub  X&S'   Ub  X6S'   Ub  XFS'   U R                   R                  SS9R                  " S0 UDUD6R                  5       $ )av  
Draw scatter plot.

Polars does not implement plotting logic itself but instead defers to
`Altair <https://altair-viz.github.io/>`_.

`df.plot.point(**kwargs)` is shorthand for
`alt.Chart(df).mark_point().encode(**kwargs).interactive()`,
and is provided for convenience - for full customisatibility, use a plotting
library directly.

.. versionchanged:: 1.6.0
    In prior versions of Polars, HvPlot was the plotting backend. If you would
    like to restore the previous plotting functionality, all you need to do
    is add `import hvplot.polars` at the top of your script and replace
    `df.plot` with `df.hvplot`.

Parameters
----------
x
    Column with x-coordinates of points.
y
    Column with y-coordinates of points.
color
    Column to color points by.
size
    Column which determines points' sizes.
**kwargs
    Additional keyword arguments passed to Altair.

Examples
--------
>>> df = pl.DataFrame(
...     {
...         "length": [1, 4, 6],
...         "width": [4, 5, 6],
...         "species": ["setosa", "setosa", "versicolor"],
...     }
... )
>>> df.plot.point(x="length", y="width", color="species")  # doctest: +SKIP
r%   r&   r'   sizeTr(   r*   )r   
mark_pointr,   r-   )r   r%   r&   r'   r8   r.   r/   s          r    pointDataFramePlot.point   s    d  "	=cN=cN!&g $fKK""4"0V  
 []	
r#   c                6  ^ [        U R                  SU 3S 5      mTc  SU S3n[        U5      eS[        R                  " T5      R
                  R                  5        Vs1 s H  o3R                  iM     sn;   nU(       a
  SU4S jjnU$ SU4S jjnU$ s  snf )Nmark_zAltair has no method 'mark_'r)   c                 L   > T" SS9R                   " S0 U D6R                  5       $ )NTr(   r*   r,   r-   r.   methods    r    func'DataFramePlot.__getattr__.<locals>.func   s%    d+22<V<HHJJr#   c                 N   > T" 5       R                   " S0 U D6R                  5       $ )Nr*   r@   rA   s    r    rC   rD      s     x00<<>>r#   )r.   r   return	alt.Chart)getattrr   AttributeErrorinspect	signature
parametersvaluesname)r   attrmsgvalueaccepts_tooltip_argumentrC   rB   s         @r    __getattr__DataFramePlot.__getattr__   s    dVnd;>/vQ7C %%#,$+$5$5f$=$H$H$O$O$Q1
$Q5JJ$Q1
 $
  $K ? 1
s   !B)r   )r   r   rF   None)NNN)
r%   X | Noner&   Y | Noner'   Color | Noner.   Unpack[EncodeKwds]rF   rG   )NNNN)r%   rV   r&   rW   r'   rX   r3   zOrder | Noner.   rY   rF   rG   )r%   rV   r&   rW   r'   rX   r8   zSize | Noner.   rY   rF   rG   )rO   strrF   zCallable[..., alt.Chart])__name__
__module____qualname____firstlineno____doc__r!   r0   r5   r:   scatterrS   __static_attributes__r*   r#   r    r   r   "   s   #$
 "	<
<
 <
 	<
 %<
 
<
@ ""@
@
 @
 	@

 @
 %@
 
@
H " B
B
 B
 	B

 B
 %B
 
B
J Gr#   r   )%
__future__r   rJ   typingr   r   r   polars.dependenciesr   r   sysaltair.typingr   Colorr	   Orderr
   Sizer   Tooltipr   Xr   Yr   polarsr   version_infor   typing_extensionsr   r   __annotations__dictrZ   r   r   r*   r#   r    <module>rr      s    "  1 1 -3317++( 
7"$/
7"!,1eUD' ABHiBX.Iy._ _r#   