
    I.e                     F    d dl Zd dlZddlmZ ddlmZ edd            ZdS )    N   )with_hv_extension   )hvPlotTabularc                 2   |t          |          k    st          |          dk    rt          d          t          |          }| j        }d}d| d}t          j        ||d|          j                                        |||d         j                                        i          }t          | t          j                  r;t          j	        | j
        |j        d         | j        d         z            |d<   d|d	<    t          |          ||fd
di|S )a  Lag plot for time series.

    Parameters:
    -----------
    data: Time series
    lag: lag of the scatter plot, default 1
    kwds: hvplot.scatter options, optional

    Returns:
    --------
    obj : HoloViews object
        The HoloViews representation of the plot.
    r   zlag must be a positive integerzy(t)zy(t + )Nr   variableckindscatter)int
ValueErrorvaluespd	DataFrameTravel
isinstancenprepeatcolumnsshaper   )datalagkwdsr   y1y2lagss          8lib/python3.11/site-packages/hvplot/plotting/lag_plot.pylag_plotr       s    c#hh#c((a--9:::
c((C[F	B	#B<VEcTE]_2244VCDD\^11335 6 6D$%% 9T\4:a=4:a=3PQQZS	=r2>>I>>>>    )r   )	numpyr   pandasr   utilr   corer   r     r!   r   <module>r'      sl            $ $ $ $ $ $       ? ? ? ? ? ?r!   