o
    môj  ã                   @   s8   d dl Zd dlmZ d dlmZ d dlmZ dd„ Z	dS )é    N)ÚTriangulationc                 O   s„  ddl }tj|i |¤Ž\}}}|j|j|j}}}|r |d nd}|jj |¡\}	}
}t	 
|tj¡}td|	|
|fƒD ]\}}|durI| ||¡ q;|d }	i |¥d| dd¡d	œ¥}|	d
vr†tj|| dtjdd�}tj|| dtjdd�}| j| ¡ | ¡ fi |¤Ž}n
| jg g fi |¤Ž}|d }
i |¥ddi¥}| dd¡ |
d
vr´| j||fi |¤Ž}|| S | jg g fi |¤Ž}|| S )aü  
    Draw an unstructured triangular grid as lines and/or markers.

    Call signatures::

      triplot(triangulation, ...)
      triplot(x, y, [triangles], *, [mask=mask], ...)

    The triangular grid can be specified either by passing a `.Triangulation`
    object as the first parameter, or by passing the points *x*, *y* and
    optionally the *triangles* and a *mask*. If neither of *triangulation* or
    *triangles* are given, the triangulation is calculated on the fly.

    Parameters
    ----------
    triangulation : `.Triangulation`
        An already created triangular grid.
    x, y, triangles, mask
        Parameters defining the triangular grid. See `.Triangulation`.
        This is mutually exclusive with specifying *triangulation*.
    other_parameters
        All other args and kwargs are forwarded to `~.Axes.plot`.

    Returns
    -------
    lines : `~matplotlib.lines.Line2D`
        The drawn triangles edges.
    markers : `~matplotlib.lines.Line2D`
        The drawn marker nodes.
    r   NÚ )Ú	linestyleÚmarkerÚcolorr   ÚNoneÚzorderé   )r   r   )Nr   r   ú é   )Úaxisr   Úlabel)Úmatplotlib.axesr   Úget_from_args_and_kwargsÚxÚyÚedgesÚaxesÚ_baseÚ_process_plot_formatÚcbookÚnormalize_kwargsÚmlinesÚLine2DÚzipÚ
setdefaultÚgetÚnpÚinsertÚnanÚplotÚravelÚpop)ÚaxÚargsÚkwargsÚ
matplotlibÚtrir   r   r   Úfmtr   r   r   ÚkwÚkeyÚvalZkw_linesZtri_lines_xZtri_lines_yZ	tri_linesZ
kw_markersZtri_markers© r,   új/var/www/html/academy/tools/voices/clone/cosy-venv/lib/python3.10/site-packages/matplotlib/tri/_triplot.pyÚtriplot   sL   ÿ€ÿ
ýÿÿþþr.   )
Únumpyr   Zmatplotlib.tri._triangulationr   Úmatplotlib.cbookr   Úmatplotlib.linesÚlinesr   r.   r,   r,   r,   r-   Ú<module>   s
    