
    e0                         d dl Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	  G d d	e	e          Z
 G d
 dee          Z G d dee          Z G d dee          ZdS )    N   )	Dimension	Element3D   )Points)Path)Imagec                        e Zd ZdZ ej        dd          Z ej        d d          Z ej	         e
d           e
d          gd	d
          Z ej	         e
d          gdd          ZddZ fdZ xZS )Surfacea  
    A Surface represents a regularly sampled 2D grid with associated
    values defining the height along the z-axis. The key dimensions of
    a Surface represent the 2D coordinates along the x- and y-axes
    while the value dimension declares the height at each grid
    location.

    The data of a Surface is usually defined as a 2D array of values
    and either a bounds tuple defining the extent in the 2D space or
    explicit x- and y-coordinate arrays.
    NNNNNNzz
        Allows overriding the extents of the Element in 3D space
        defined as (xmin, ymin, zmin, xmax, ymax, zmax).defaultdocTr   constantxy)r   r   z\
        The Surface x and y dimensions of the space defined
        by the supplied extent.r   boundsr   z)r   r   z&
        The Surface height dimension.Nc                 @    |r|nd}t          j        | |f|||d| d S )Nr   )kdimsvdimsextents)r	   __init__)selfdatar   r   r   paramss         9lib/python3.11/site-packages/holoviews/element/chart3d.pyr   zSurface.__init__$   s;    $N''*NtTWeWWWPVWWWWW    c                 H     t                      j        di |\  }}}||d fS )N )super$_get_selection_expr_for_stream_value)r   kwargsexprbbox_	__class__s        r   r$   z,Surface._get_selection_expr_for_stream_value(   s2    DDNNvNNdAT4r    )NNN)__name__
__module____qualname____doc__paramTupler   StringgroupListr   r   r   r   r$   __classcell__)r)   s   @r   r   r   	   s        
 
 ek"F M< = = =G ELT:::EEJ		#		#?# *#$ $ $E
 EJ		#/ D) * * *EX X X X                 r    r   c                       e Zd ZdZ ej        d d          Z ej         ed           ed           ed          gdd	          Z	 ej        g d
          Z
d ZdS )
TriSurfaceaV  
    TriSurface represents a set of coordinates in 3D space which
    define a surface via a triangulation algorithm (usually Delauney
    triangulation). They key dimensions of a TriSurface define the
    position of each point along the x-, y- and z-axes, while value
    dimensions can provide additional information about each point.
    Tr   r   r   r      r7   z_
        The key dimensions of a TriSurface represent the 3D coordinates
        of each point.r   zr
        The value dimensions of a TriSurface can provide additional
        information about each 3D coordinate.r   c                 ,    t          j        | |          S Nr   __getitem__r   slcs     r   r;   zTriSurface.__getitem__A       !$,,,r    N)r*   r+   r,   r-   r.   r0   r1   r2   r   r   r   r;   r"   r    r   r5   r5   -   s          EL===EEJ	#		#		# 8@F M  E
 EJr (1 2 2 2E- - - - -r    r5   c                       e Zd ZdZ ej         ed           ed           ed          gd          Z ej        g d          Z ej	        d d	
          Z
d ZdS )	Scatter3Da  
    Scatter3D is a 3D element representing the position of a collection
    of coordinates in a 3D space. The key dimensions represent the
    position of each coordinate along the x-, y- and z-axis.

    Scatter3D is not available for the default Bokeh backend.

    Example - Matplotlib
    --------------------

    .. code-block::

        import holoviews as hv
        from bokeh.sampledata.iris import flowers

        hv.extension("matplotlib")

        hv.Scatter3D(
            flowers, kdims=["sepal_length", "sepal_width", "petal_length"]
        ).opts(
            color="petal_width",
            alpha=0.7,
            size=5,
            cmap="fire",
            marker='^'
        )

    Example - Plotly
    ----------------

    .. code-block::

        import holoviews as hv
        from bokeh.sampledata.iris import flowers

        hv.extension("plotly")

        hv.Scatter3D(
            flowers, kdims=["sepal_length", "sepal_width", "petal_length"]
        ).opts(
            color="petal_width",
            alpha=0.7,
            size=5,
            cmap="Portland",
            colorbar=True,
            marker="circle",
        )
    r   r   r   r6   r   r   zg
        Scatter3D can have optional value dimensions,
        which may be mapped onto color and size.r   Tr   c                 ,    t          j        | |          S r9   r:   r<   s     r   r;   zScatter3D.__getitem__   r>   r    Nr*   r+   r,   r-   r.   r2   r   r   r   r0   r1   r;   r"   r    r   r@   r@   E   s        / /b EJ		# )	# )	# 08>@ @ @E EJr (4 5 5 5E ELt<<<E- - - - -r    r@   c                       e Zd ZdZ ej         ed           ed           ed          gd          Z ej        g d          Z ej	        d d	
          Z
d ZdS )Path3Dz
    Path3D is a 3D element representing a line through 3D space. The
    key dimensions represent the position of each coordinate along the
    x-, y- and z-axis while the value dimensions can optionally supply
    additional information.
    r   r   r   r6   rA   z3
        Path3D can have optional value dimensions.r   Tr   c                 ,    t          j        | |          S r9   )r   r;   r<   s     r   r;   zPath3D.__getitem__   s    c***r    NrC   r"   r    r   rE   rE      s          EJ		# )	# )	# 08>@ @ @E EJr (6 7 7 7E ELD999E+ + + + +r    rE   )r.   corer   r   geomr   pathr   rasterr	   r   r5   r@   rE   r"   r    r   <module>rK      s    ' ' ' ' ' ' ' '                  !  !  !  !  ! eY !  !  ! H- - - - -F - - -0=- =- =- =- =-	6 =- =- =-@+ + + + +Y + + + + +r    