ó
ąéRc           @  si   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 d  d l
 Z d   Z d S(   i˙˙˙˙(   t   print_function(   t	   ls_mapper(   t	   PathPatch(   t   Path(   t   TriangulationNc         O  ss  d d l  } t j | |   \ } } } | j } | j } | j } d } t |  d k rg | d } n  | j j |  \ }	 }
 } |	 d k	 rO|	 d k	 rO| j
   } | j d d  t |	 | d <| | d <d | d	 <t j | | j   | | j   f  } t j g t j g t |  } t | |  } t | |  } |  j |  n  d | d <|  j | | | |  d S(
   s  
    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`.

    **Example:**

        .. plot:: mpl_examples/pylab_examples/triplot_demo.py
    i˙˙˙˙Nt    i    t   Nonet   markert	   linestylet	   edgecolort	   facecolor(   t   matplotlib.axesR   t   get_from_args_and_kwargst   xt   yt   edgest   lent   axest   _process_plot_formatR   t   copyt   popR   t   npt   column_stackt   flattenR   t   MOVETOt   LINETOR   t	   add_patcht   plot(   t   axt   argst   kwargst
   matplotlibt   triR   R   R   t   fmtR   R   t   colort   kwt   verticest   codest   patht	   pathpatch(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/tri/triplot.pyt   triplot   s,    			

) 
(   t
   __future__R    t   matplotlib.cbookR   t   matplotlib.patchesR   t   matplotlib.pathR   t   matplotlib.tri.triangulationR   t   numpyR   R(   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/tri/triplot.pyt   <module>   s   