a
    Df0                     @   s   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	 d	e	eZ
G d
d deeZG dd deeZG dd deeZdS )    N   )	Dimension	Element3D   )Points)Path)Imagec                       sx   e Zd ZdZejdddZejd ddZej	e
de
dgd	d
dZej	e
dgdddZdddZ fddZ  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   Z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                 K   s,   |r|nd}t j| |f|||d| d S )Nr
   )kdimsvdimsextents)r   __init__)selfdatar   r   r   params r   f/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/holoviews/element/chart3d.pyr   $   s    zSurface.__init__c                    s"   t  jf i |\}}}||d fS N)super$_get_selection_expr_for_stream_value)r   kwargsexprZbbox_	__class__r   r   r   (   s    z,Surface._get_selection_expr_for_stream_value)NNN)__name__
__module____qualname____doc__paramTupler   StringgroupListr   r   r   r   r   __classcell__r   r   r#   r   r	   	   s   
r	   c                   @   sV   e Zd ZdZejd ddZejedededgddd	Z	ejg d
dZ
d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      r1   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                 C   s   t | |S r   r   __getitem__r   Zslcr   r   r   r3   A   s    zTriSurface.__getitem__N)r%   r&   r'   r(   r)   r+   r,   r-   r   r   r   r3   r   r   r   r   r/   -   s   r/   c                   @   sT   e Zd ZdZejedededgddZejg ddZej	d d	d
Z
d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   r0   r   r   zg
        Scatter3D can have optional value dimensions,
        which may be mapped onto color and size.r   Tr   c                 C   s   t | |S r   r2   r4   r   r   r   r3      s    zScatter3D.__getitem__Nr%   r&   r'   r(   r)   r-   r   r   r   r+   r,   r3   r   r   r   r   r5   E   s   1
r5   c                   @   sT   e Zd ZdZejedededgddZejg ddZej	d d	d
Z
d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   r0   r6   z3
        Path3D can have optional value dimensions.r   Tr   c                 C   s   t | |S r   )r   r3   r4   r   r   r   r3      s    zPath3D.__getitem__Nr7   r   r   r   r   r8      s   
r8   )r)   corer   r   Zgeomr   pathr   Zrasterr   r	   r/   r5   r8   r   r   r   r   <module>   s   $@