B
    d
                 @   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|\}	}
}|	 }x4t
d|	|
|fD ] \}}|dk	rn|||||< qnW |d }	|d|ddd	}|	d
krtj|| dtjdd}tj|| dtjdd}| 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 `.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 `.Triangulation`
    for a explanation of these possibilities.

    The remaining args and kwargs are the same as for `~.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       )Zaxisr   )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   c/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/matplotlib/tri/triplot.pytriplot   s6    


r   )numpyr   Zmatplotlib.tri.triangulationr   r   r   r   r   r   <module>   s   