3
$ßL])  ã               @   s    d dl Zd dlmZ dd„ ZdS )é    N)ÚTriangulationc             O   s\  ddl }tj||Ž\}}}|j|j|j  }}}|r<|d nd}|jjj|ƒ\}	}
}|j	ƒ }x4t
d|	|
|fƒD ] \}}|dk	rn|j||ƒ||< qnW |d }	|d|jdd	ƒd
œ–}|	dk�rtj|| dtjd	d�}tj|| dtjd	d�}| j|jƒ |jƒ f|Ž}n| jg g f|Ž}|d }
|ddi–}|
dk�rD| j||f|Ž}n| jg g f|Ž}|| S )a†  
    Draw a unstructured triangular grid as lines and/or markers.

    The triangulation to plot can be specified in one of two ways;
    either::

      triplot(triangulation, ...)

    where triangulation is a :class:`matplotlib.tri.Triangulation`
    object, or

    ::

      triplot(x, y, ...)
      triplot(x, y, triangles, ...)
      triplot(x, y, triangles=triangles, ...)
      triplot(x, y, mask=mask, ...)
      triplot(x, y, triangles, mask=mask, ...)

    in which case a Triangulation object will be created.  See
    :class:`~matplotlib.tri.Triangulation` for a explanation of these
    possibilities.

    The remaining args and kwargs are the same as for
    :meth:`~matplotlib.axes.Axes.plot`.

    Return a list of 2 :class:`~matplotlib.lines.Line2D` containing
    respectively:

        - the lines plotted for triangles edges
        - the markers plotted for triangles nodes
    r   NÚ Ú	linestyleÚmarkerÚcolorÚNoneÚzorderé   )r   r   ú é   )Zaxis)r   r   r   )Nr   r   r
   )Nr   r   r
   )Zmatplotlib.axesr   Zget_from_args_and_kwargsÚxÚyÚedgesZaxesÚ_baseZ_process_plot_formatÚcopyÚzipÚgetÚnpÚinsertÚnanZplotZravel)ZaxÚargsÚkwargsZ
matplotlibZtrir   r   r   Úfmtr   r   r   ÚkwÚkeyÚvalZkw_linesZtri_lines_xZtri_lines_yZ	tri_linesZ
kw_markersZtri_markers© r   ú>/tmp/pip-install-edjban26/matplotlib/matplotlib/tri/triplot.pyÚtriplot   s6    !


r   )Znumpyr   Zmatplotlib.tri.triangulationr   r   r   r   r   r   Ú<module>   s   