a
    Df                     @   s   d dl Zd dlZddlmZmZmZ ddlmZ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G dd de	e
ZdS )    N   )Dataset	Dimension	Element2D   )Selection2DExprSelectionGeomExprc                   @   sP   e Zd ZdZejd ddZejededgddddZ	ejg dd	d
Z
dZdS )Geometrya  
    Geometry elements represent a collection of objects drawn in
    a 2D coordinate system. The two key dimensions correspond to the
    x- and y-coordinates in the 2D space, while the value dimensions
    may be used to control other visual attributes of the Geometry
    Tdefaultconstantxy)r   r   zd
        The key dimensions of a geometry represent the x- and y-
        coordinates in a 2D space.r   boundsr   docz<
        Value dimensions can be associated with a geometry.)r   r   r   N)__name__
__module____qualname____doc__paramStringgroupListr   kdimsvdimsZ_Geometry__abstract r   r   c/nfs/NAS7/SABIOD/METHODE/ermites/ermites_venv/lib/python3.9/site-packages/holoviews/element/geom.pyr	      s   r	   c                   @   s"   e Zd ZdZejd ddZdZdS )Pointsz
    Points represents a set of coordinates in 2D space, which may
    optionally be associated with any number of value dimensions.
    Tr
   N)r   r   r   r   r   r   r   Z_auto_indexable_1dr   r   r   r   r      s   r   c                   @   sV   e Zd ZdZejd ddZejedddde	j
 fdedgd	d
ZedddZdS )VectorFielda4  
    A VectorField represents a set of vectors in 2D space with an
    associated angle, as well as an optional magnitude and any number
    of other value dimensions. The angles are assumed to be defined in
    radians and by default the magnitude is assumed to be normalized
    to be between 0 and 1.
    Tr
   Angler   r   Zcyclicrange	Magnitude)r   N)r   r   Nc                    s   |d u rddg}|d u r ddg}t |f||d|  fddtdd	D \}}t||}t||}i }	|D ]}
 |
 |	|
< qr||	d
< ||	d< |dd  D ]} | |	|< qtd
dddtj fdtdg|dd   }| |	f||d|S )Nr   r   uv)r   r   c                 3   s   | ]}  |V  qd S )N)Zdimension_values).0iZdatasetr   r   	<genexpr>=       z&VectorField.from_uv.<locals>.<genexpr>r      r    r#   Tr   r!   )r   r"   nphypotZarctan2r   pi)clsdatar   r   paramsusvsZuv_magnitudesradiansZrepackaged_datasetZkdimZvdimr   r(   r   from_uv6   s*    
zVectorField.from_uv)NN)r   r   r   r   r   r   r   r   r   r,   r.   r   classmethodr5   r   r   r   r   r   (   s   r   c                   @   sH   e Zd ZdZejd ddZejededededgddd	d
Z	dS )Segmentsz?
    Segments represent a collection of lines in 2D space.
    Tr
   x0y0x1y1r+   r+   zU
        Segments represent lines given by x- and y-
        coordinates in 2D space.r   N
r   r   r   r   r   r   r   r   r   r   r   r   r   r   r7   T   s   r7   c                   @   sH   e Zd ZdZejd ddZejededededgddd	d
Z	dS )
RectangleszS
    Rectangles represent a collection of axis-aligned rectangles in 2D space.
    Tr
   r8   r9   r:   r;   r<   z
        The key dimensions of the Rectangles element represent the
        bottom-left (x0, y0) and top right (x1, y1) coordinates
        of each box.r   Nr=   r   r   r   r   r>   a   s   r>   )numpyr,   r   corer   r   r   Z	selectionr   r   r	   r   r   r7   r>   r   r   r   r   <module>   s   ,