ó
±éRc        
   @  s¶  d  Z  d d l m Z d d l Z d d l Z d d l j Z d d l Z	 d d l
 j Z d d l j Z d d l j Z d d l m Z d d l j Z d d l j Z d d l m Z d d l j Z d d l j Z d d l m Z d d l j Z d e j e j  f d „  ƒ  YZ! e j" j# d d	 ƒ d
 e! f d „  ƒ  YZ$ d e! f d „  ƒ  YZ% d e% f d „  ƒ  YZ& d e! f d „  ƒ  YZ' d e' f d „  ƒ  YZ( d e' f d „  ƒ  YZ) d e! f d „  ƒ  YZ* d e* f d „  ƒ  YZ+ d e! f d „  ƒ  YZ, d e! f d „  ƒ  YZ- d e! f d „  ƒ  YZ. d  e! f d! „  ƒ  YZ/ d" e! f d# „  ƒ  YZ0 e j1 e! ƒ Z2 xC d" d  d d d d
 d d d d f
 D] Z3 e j" j# i e2 e3 6ƒ quWe j" j# d e j1 e* ƒ ƒ d S($   sx  
Classes for the efficient drawing of large collections of objects that
share most properties, e.g., a large number of line segments or
polygons.

The classes are not meant to be as flexible as their single element
counterparts (e.g., you may not be able to select all line styles) but
they are meant to be fast for common use cases (e.g., a large set of solid
line segemnts)
iÿÿÿÿ(   t   print_functionN(   t	   docstring(   t   allow_rasterization(   t   _patht
   Collectionc           B  s  e  Z d  Z e j g  e j ƒ Z d1 e _ e j	 ƒ  Z
 g  Z d2 d2 d2 d d2 d2 d2 d2 d2 d d2 d2 d d d „ Z e d „  ƒ Z e d	 „  ƒ Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z e d „  ƒ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d „  Z! d „  Z" d „  Z# d „  Z$ d „  Z% d „  Z& d „  Z' d  „  Z( d! „  Z) d" „  Z* d# „  Z+ d$ „  Z, d% „  Z- d& „  Z. d' „  Z/ d( „  Z0 e0 Z1 d) „  Z2 e2 Z3 d* „  Z4 d+ „  Z5 d, „  Z6 d- „  Z7 e7 Z8 d. „  Z9 e9 Z: Z; d/ „  Z< d0 „  Z= RS(3   sj  
    Base class for Collections.  Must be subclassed to be usable.

    All properties in a collection must be sequences or scalars;
    if scalars, they will be converted to sequences.  The
    property of the ith element of the collection is::

      prop[i % len(props)]

    Keyword arguments and default values:

        * *edgecolors*: None
        * *facecolors*: None
        * *linewidths*: None
        * *antialiaseds*: None
        * *offsets*: None
        * *transOffset*: transforms.IdentityTransform()
        * *offset_position*: 'screen' (default) or 'data'
        * *norm*: None (optional for
          :class:`matplotlib.cm.ScalarMappable`)
        * *cmap*: None (optional for
          :class:`matplotlib.cm.ScalarMappable`)
        * *hatch*: None
        * *zorder*: 1


    *offsets* and *transOffset* are used to translate the patch after
    rendering (default no offsets).  If offset_position is 'screen'
    (default) the offset is applied after the master transform has
    been applied, that is, the offsets are in screen coordinates.  If
    offset_position is 'data', the offset is applied before the master
    transform, i.e., the offsets are in data coordinates.

    If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds*
    are None, they default to their :data:`matplotlib.rcParams` patch
    setting, in sequence form.

    The use of :class:`~matplotlib.cm.ScalarMappable` is optional.  If
    the :class:`~matplotlib.cm.ScalarMappable` matrix _A is not None
    (ie a call to set_array has been made), at draw time a call to
    scalar mappable will be made to set the face colors.
    i    i   t   solidg      @t   screeni   c         K  sF  t  j j |  ƒ t j j |  | |	 ƒ |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ |  j	 | ƒ |  j
 |
 ƒ |  j | ƒ |  j | ƒ |  j | ƒ |  j | ƒ d |  _ t j d d g g t j ƒ |  _ | d k	 r#t j | ƒ } d | _ | d k	 r| |  _ | |  _ q#| |  _ n  d |  _ |  j | ƒ d |  _ d S(   s=   
        Create a Collection

        %(Collection)s
        i    iÿÿÿÿi   N(   iÿÿÿÿi   (   t   artistt   Artistt   __init__t   cmt   ScalarMappablet   set_edgecolort   set_facecolort   set_linewidtht   set_linestylet   set_antialiasedt   set_pickradiust   set_urlst	   set_hatcht   set_offset_positiont
   set_zordert   Nonet   _uniform_offsetst   npt   arrayt   float_t   _offsetst
   asanyarrayt   shapet   _transOffsett   _path_effectst   updatet   _paths(   t   selft
   edgecolorst
   facecolorst
   linewidthst
   linestylest   antialiasedst   offsetst   transOffsett   normt   cmapt
   pickradiust   hatcht   urlst   offset_positiont   zordert   kwargs(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   P   s0    	!			c         C  sƒ   y t  |  ƒ f SWn_ t k
 rr t j |  ƒ rs t |  ƒ rs y t  |  d ƒ Wn t t f k
 rg qo X|  Sqs n Xt d ƒ ‚ d  S(   Ni    s1   val must be a float or nonzero sequence of floats(   t   floatt	   TypeErrort   cbookt   iterablet   lent
   ValueError(   t   val(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt
   _get_valueƒ   s    c         C  sW   t  j |  ƒ s |  f }  n  y t |  d ƒ Wn# t t f k
 rR t d ƒ ‚ n X|  S(   Ni    s.   val must be a bool or nonzero sequence of them(   R4   R5   t   boolR3   t
   IndexError(   R8   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   _get_bool’   s    c         C  s   |  j  S(   N(   R!   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   get_pathsœ   s    c         C  s
   t  ‚ d  S(   N(   t   NotImplementedError(   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   set_pathsŸ   s    c         C  s   |  j  S(   N(   t   _transforms(   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_transforms¢   s    c         C  sD   |  j  } t | t j ƒ r@ t | d ƒ r@ | j |  j ƒ } n  | S(   Nt   _as_mpl_transform(   R   t
   isinstancet
   transformst	   Transformt   hasattrRB   t   axes(   R"   t   t(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_offset_transform¥   s
    	c         C  s=  |  j  ƒ  } |  j ƒ  } |  j } |  j ƒ  } | j sg g  | D] } | j | ƒ ^ q= } | j ƒ  } n  | j sŽ | j | ƒ } | j ƒ  } n  t j	 | t j
 ƒ } t j j | ƒ rÊ | j t j ƒ } n  d | _ | rt j | j ƒ  | |  j ƒ  | | j ƒ  ƒ } | j | ƒ } n! t j d d g d d g g ƒ } | S(   Niÿÿÿÿi   i    (   iÿÿÿÿi   (   t   get_transformRI   R   R=   t	   is_affinet   transform_path_non_affinet
   get_affinet   transform_non_affineR   R   R   t   mat   isMaskedArrayt   filledt   nanR   t   mpatht   get_path_collection_extentst   frozenRA   t   inverse_transformedRD   t   Bbox(   R"   t	   transDatat	   transformR)   R(   t   pathst   pt   result(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_datalim¬   s*    		"		!c         C  s   |  j  t j ƒ  ƒ S(   N(   R]   RD   t   IdentityTransform(   R"   t   renderer(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_window_extentÈ   s    c   	      C  sç  |  j  ƒ  } |  j ƒ  } |  j } |  j ƒ  } |  j ƒ  r1g  } x� |  j ƒ  D] } | j } | d d … d f | d d … d f } } |  j | ƒ } |  j | ƒ } | j t	 j
 t | | ƒ | j ƒ ƒ qL W| j d k r1|  j | d d … d f ƒ } |  j | d d … d f ƒ } t | | ƒ } q1n  t j | t j ƒ } d | _ | j s‰g  | D] } | j | ƒ ^ q_} | j ƒ  } n  | j s°| j | ƒ } | j ƒ  } n  t j j | ƒ r×| j t j ƒ } n  | | | | f S(   s&   Point prep for drawing and hit testingNi    i   iÿÿÿÿi   (   iÿÿÿÿi   (   RJ   RI   R   R=   t
   have_unitst   verticest   convert_xunitst   convert_yunitst   appendRS   t   Patht   zipt   codest   sizeR   R   R   R   RK   RL   RM   RN   RO   RP   RQ   RR   (	   R"   RY   R)   R(   RZ   t   pathRb   t   xst   ys(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   _prepare_pointsÍ   s8    		-)			c         C  s¸  |  j  ƒ  s d  S| j |  j j |  j ƒ  ƒ |  j ƒ  |  j ƒ  \ } } } } | j ƒ  } |  j | ƒ | j	 |  j
 ƒ  ƒ |  j r– | j |  j ƒ n  |  j ƒ  d  k	 r¾ | j |  j ƒ  Œ  n  |  j ƒ  r?xÊ |  j ƒ  D]a } | j | | | j ƒ  | |  j ƒ  | | |  j ƒ  |  j ƒ  |  j |  j |  j |  j |  j ƒ q× WnX | j | | j ƒ  | |  j ƒ  | | |  j ƒ  |  j ƒ  |  j |  j |  j |  j |  j ƒ | j ƒ  | j |  j j ƒ d  S(   N(   t   get_visiblet
   open_groupt	   __class__t   __name__t   get_gidt   update_scalarmappableRm   t   new_gct   _set_gc_clipt   set_snapt   get_snapt   _hatchR   t   get_sketch_paramsR   t   set_sketch_paramst   get_path_effectst   draw_path_collectionRU   RA   t   get_facecolort   get_edgecolort   _linewidthst   _linestylest   _antialiasedst   _urlst   _offset_positiont   restoret   close_group(   R"   R_   RY   R)   R(   RZ   t   gct   pe(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   drawö   s4    
		

c         C  s   | |  _  d  S(   N(   t   _pickradius(   R"   t   pr(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR     s    c         C  s   |  j  S(   N(   R‰   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_pickradius  s    c         C  s  t  |  j ƒ r |  j |  | ƒ S|  j ƒ  s5 t i  f S|  j t k rP |  j } nD y t |  j ƒ } Wn. t k
 r“ t	 j
 d |  j ƒ |  j } n X|  j ƒ  \ } } } } t j | j | j | | j ƒ  | |  j ƒ  | | | d k |  j ƒ  ƒ
 } t | ƒ d k t d | ƒ f S(   sº   
        Test whether the mouse event occurred in the collection.

        Returns True | False, ``dict(ind=itemlist)``, where every
        item in itemlist contains the event.
        s4   Collection picker %s could not be converted to floati    t   ind(   t   callablet	   _containsRn   t   Falset   _pickert   TrueR‰   R2   R3   t   warningst   warnRm   R   t   point_in_path_collectiont   xt   yRU   RA   t   get_offset_positionR6   t   dict(   R"   t
   mouseeventR,   RY   R)   R(   RZ   RŒ   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   contains!  s(    
c         C  s(   | d  k r d  g |  _ n	 | |  _ d  S(   N(   R   R‚   (   R"   R.   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   F  s    c         C  s   |  j  S(   N(   R‚   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_urlsL  s    c         C  s   | |  _  d S(   sk  
        Set the hatching pattern

        *hatch* can be one of::

          /   - diagonal hatching
          \   - back diagonal
          |   - vertical
          -   - horizontal
          +   - crossed
          x   - crossed diagonal
          o   - small circle
          O   - large circle
          .   - dots
          *   - stars

        Letters can be combined, in which case all the specified
        hatchings are done.  If same letter repeats, it increases the
        density of hatching of that pattern.

        Hatching is supported in the PostScript, PDF, SVG and Agg
        backends only.

        Unlike other properties such as linewidth and colors, hatching
        can only be specified for the collection as a whole, not separately
        for each member.

        ACCEPTS: [ '/' | '\\' | '|' | '-' | '+' | 'x' | 'o' | 'O' | '.' | '*' ]
        N(   Rx   (   R"   R-   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   O  s    c         C  s   |  j  S(   s#   Return the current hatching pattern(   Rx   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   get_hatcho  s    c         C  sF   t  j | t  j ƒ } d | _ |  j d k r9 | |  _ n	 | |  _ d S(   s•   
        Set the offsets for the collection.  *offsets* can be a scalar
        or a sequence.

        ACCEPTS: float or sequence of floats
        iÿÿÿÿi   N(   iÿÿÿÿi   (   R   R   R   R   R   R   R   (   R"   R(   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_offsetss  s
    	c         C  s!   |  j  d k r |  j S|  j  Sd S(   s8   
        Return the offsets for the collection.
        N(   R   R   R   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_offsets‚  s    c         C  s(   | d k r t  d ƒ ‚ n  | |  _ d S(   si  
        Set how offsets are applied.  If *offset_position* is 'screen'
        (default) the offset is applied after the master transform has
        been applied, that is, the offsets are in screen coordinates.
        If offset_position is 'data', the offset is applied before the
        master transform, i.e., the offsets are in data coordinates.
        R   t   datas*   offset_position must be 'screen' or 'data'N(   R   s   data(   R7   Rƒ   (   R"   R/   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   Œ  s    c         C  s   |  j  S(   s€  
        Returns how offsets are applied for the collection.  If
        *offset_position* is 'screen', the offset is applied after the
        master transform has been applied, that is, the offsets are in
        screen coordinates.  If offset_position is 'data', the offset
        is applied before the master transform, i.e., the offsets are
        in data coordinates.
        (   Rƒ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR—   ˜  s    	c         C  s2   | d k r t j d } n  |  j | ƒ |  _ d S(   sÝ   
        Set the linewidth(s) for the collection.  *lw* can be a scalar
        or a sequence; if it is a sequence the patches will cycle
        through the sequence

        ACCEPTS: float or sequence of floats
        s   patch.linewidthN(   R   t   mplt   rcParamsR9   R   (   R"   t   lw(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   £  s    c         C  s   |  j  | ƒ S(   s   alias for set_linewidth(   R   (   R"   R¢   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_linewidths¯  s    c         C  s   |  j  | ƒ S(   s   alias for set_linewidth(   R   (   R"   R¢   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_lw³  s    c         C  s«  yzt  j j } t j | ƒ rl | | k r: | | g } qy| t j k r` | t j | g } qyt ƒ  ‚ nt j | ƒ rpyº g  } x­ | D]¥ } t j | ƒ rö | | k rÀ | j | | ƒ q0| t j k rê | j | t j | ƒ q0t ƒ  ‚ q‹ t j | ƒ r't	 | ƒ d k r'| j | ƒ q‹ t ƒ  ‚ q‹ WWqyt k
 rlt	 | ƒ d k r`| } qmt ƒ  ‚ qyXn	 t ƒ  ‚ Wn! t k
 r�t d | ƒ ‚ n X| |  _
 d S(   s›   
        Set the linestyle(s) for the collection.

        ACCEPTS: ['solid' | 'dashed', 'dashdot', 'dotted' |
        (offset, on-off-dash-seq) ]
        i   s'   Do not know how to convert %s to dashesN(   t   backend_basest   GraphicsContextBaset   dashdR4   t   is_string_liket	   ls_mapperR7   R5   Re   R6   R€   (   R"   t   lsR§   t   dashesR•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   ·  s:    !	c         C  s   |  j  | ƒ S(   s   alias for set_linestyle(   R   (   R"   Rª   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_linestylesá  s    c         C  s   |  j  | ƒ S(   s   alias for set_linestyle(   R   (   R"   Rª   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt
   set_dasheså  s    c         C  s2   | d k r t j d } n  |  j | ƒ |  _ d S(   sm   
        Set the antialiasing state for rendering.

        ACCEPTS: Boolean or sequence of booleans
        s   patch.antialiasedN(   R   R    R¡   R<   R�   (   R"   t   aa(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   é  s    c         C  s   |  j  | ƒ S(   s   alias for set_antialiased(   R   (   R"   R®   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_antialiasedsó  s    c         C  s   |  j  | ƒ |  j | ƒ d S(   s  
        Set both the edgecolor and the facecolor.

        ACCEPTS: matplotlib color arg or sequence of rgba tuples

        .. seealso::

            :meth:`set_facecolor`, :meth:`set_edgecolor`
               For setting the edge or face color individually.
        N(   R   R   (   R"   t   c(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   set_color÷  s    c         C  sƒ   t  |  _ y" | j ƒ  d k r* t |  _ n  Wn t k
 r> n X| d k r[ t j d } n  | |  _ t	 j
 j | |  j ƒ |  _ d S(   sm  
        Set the facecolor(s) of the collection.  *c* can be a
        matplotlib color arg (all patches have same color), or a
        sequence of rgba tuples; if it is a sequence the patches will
        cycle through the sequence.

        If *c* is 'none', the patch will not be filled.

        ACCEPTS: matplotlib color arg or sequence of rgba tuples
        t   nones   patch.facecolorN(   R‘   t
   _is_filledt   lowerR�   t   AttributeErrorR   R    R¡   t   _facecolors_originalt   mcolorst   colorConvertert   to_rgba_arrayt   _alphat   _facecolors(   R"   R°   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR     s    		c         C  s   |  j  | ƒ S(   s   alias for set_facecolor(   R   (   R"   R°   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_facecolors  s    c         C  s   |  j  S(   N(   R»   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR}     s    c         C  s$   |  j  d k r |  j ƒ  S|  j  Sd  S(   Nt   face(   t   _edgecolorst   get_facecolors(   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR~   #  s    
c         C  sÃ   t  |  _ y" | j ƒ  d k r* t |  _ n  Wn t k
 r> n Xy, | j ƒ  d k rj d |  _ d |  _ d SWn t k
 r~ n X| d k r› t j	 d } n  | |  _ t
 j j | |  j ƒ |  _ d S(   sÐ  
        Set the edgecolor(s) of the collection. *c* can be a
        matplotlib color arg (all patches have same color), or a
        sequence of rgba tuples; if it is a sequence the patches will
        cycle through the sequence.

        If *c* is 'face', the edge color will always be the same as
        the face color.  If it is 'none', the patch boundary will not
        be drawn.

        ACCEPTS: matplotlib color arg or sequence of rgba tuples
        R²   R½   Ns   patch.edgecolor(   R‘   t   _is_strokedR´   R�   Rµ   R¾   t   _edgecolors_originalR   R    R¡   R·   R¸   R¹   Rº   (   R"   R°   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR   *  s"    				c         C  s   |  j  | ƒ S(   s   alias for set_edgecolor(   R   (   R"   R°   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_edgecolorsI  s    c         C  sä   | d k	 r= y t | ƒ Wq= t k
 r9 t d ƒ ‚ q= Xn  t j j |  | ƒ y" t j j |  j	 |  j
 ƒ |  _ Wn t t t f k
 rŽ n Xy4 |  j d k rÂ t j j |  j |  j
 ƒ |  _ n  Wn t t t f k
 rß n Xd S(   sŒ   
        Set the alpha tranparencies of the collection.  *alpha* must be
        a float or *None*.

        ACCEPTS: float or None
        s   alpha must be a float or NoneR½   N(   R   R2   R3   R   R   t	   set_alphaR·   R¸   R¹   R¶   Rº   R»   Rµ   R;   RÁ   R¾   (   R"   t   alpha(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRÃ   M  s"    		c         C  s   |  j  S(   N(   R   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_linewidthsf  s    c         C  s   |  j  S(   N(   R€   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_linestylesj  s    c         C  s™   |  j  d k r d S|  j  j d k r4 t d ƒ ‚ n  |  j d ƒ sG d S|  j rn |  j |  j  |  j ƒ |  _ n' |  j	 r• |  j |  j  |  j ƒ |  _
 n  d S(   sb   
        If the scalar mappable array is not none, update colors
        from scalar data
        Ni   s&   Collections can only map rank 1 arraysR   (   t   _AR   t   ndimR7   t   check_updateR³   t   to_rgbaRº   R»   RÀ   R¾   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRs   n  s    		c         C  s§   t  j j |  | ƒ | j |  _ | j |  _ | j |  _ | j |  _ | j |  _ | j |  _ | j	 |  _	 | j
 |  _
 | j |  _ | j |  _ | j |  _ | j |  _ d S(   s"   copy properties from other to selfN(   R   R   t   update_fromR�   RÁ   R¾   R¶   R»   R   R€   R‰   Rx   RÇ   R*   R+   (   R"   t   other(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRË   ~  s    (   i    i   N(>   Rq   t
   __module__t   __doc__R   R   R   R   R   RD   R^   R   R@   R   R	   t   staticmethodR9   R<   R=   R?   RA   RI   R]   R`   Rm   R   Rˆ   R   R‹   Rš   R   R›   R   Rœ   R�   Rž   R   R—   R   R£   R¤   R   R¬   R­   R   R¯   R±   R   R¼   R}   R¿   R~   t   get_edgecolorsR   RÂ   RÃ   RÅ   t   get_linewidthRÆ   t
   get_dashest   get_linestyleRs   RË   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR      s€   *	%
							)%			%			 			
						*			
											
	s´      Valid Collection keyword arguments:

        * *edgecolors*: None
        * *facecolors*: None
        * *linewidths*: None
        * *antialiaseds*: None
        * *offsets*: None
        * *transOffset*: transforms.IdentityTransform()
        * *norm*: None (optional for
          :class:`matplotlib.cm.ScalarMappable`)
        * *cmap*: None (optional for
          :class:`matplotlib.cm.ScalarMappable`)

    *offsets* and *transOffset* are used to translate the patch after
    rendering (default no offsets)

    If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds*
    are None, they default to their :data:`matplotlib.rcParams` patch
    setting, in sequence form.
t   PathCollectionc           B  sM   e  Z d  Z e j d d „ ƒ Z d „  Z d „  Z d „  Z	 e
 d „  ƒ Z RS(   s>   
    This is the most basic :class:`Collection` subclass.
    c         K  s*   t  j |  | � |  j | ƒ | |  _ d S(   ss   
        *paths* is a sequence of :class:`matplotlib.path.Path`
        instances.

        %(Collection)s
        N(   R   R	   R?   t   _sizes(   R"   RZ   t   sizesR1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   ±  s    	c         C  s   | |  _  d  S(   N(   R!   (   R"   RZ   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR?   ¾  s    c         C  s   |  j  S(   N(   R!   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR=   Á  s    c         C  s   |  j  S(   N(   RÕ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   get_sizesÄ  s    c         C  sg   |  j  d  k	 rW g  |  j  D]2 } t j ƒ  j t j | ƒ |  j j d ƒ ^ q |  _	 n  t
 j |  | ƒ S(   Ng      R@(   RÕ   R   RD   t   Affine2Dt   scaleR   t   sqrtt   figuret   dpiR@   R   Rˆ   (   R"   R_   R•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ   Ç  s    EN(   Rq   RÍ   RÎ   R   t   dedent_interpdR   R	   R?   R=   R×   R   Rˆ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRÔ   ­  s   			t   PolyCollectionc           B  sA   e  Z e j d e d  „ ƒ Z e d „ Z e Z e	 d „  ƒ Z
 RS(   c         K  s-   t  j |  | � | |  _ |  j | | ƒ d S(   sû  
        *verts* is a sequence of ( *verts0*, *verts1*, ...) where
        *verts_i* is a sequence of *xy* tuples of vertices, or an
        equivalent :mod:`numpy` array of shape (*nv*, 2).

        *sizes* is *None* (default) or a sequence of floats that
        scale the corresponding *verts_i*.  The scaling is applied
        before the Artist master transform; if the latter is an identity
        transform, then the overall scaling is such that if
        *verts_i* specify a unit square, then *sizes_i* is the area
        of that square in points^2.
        If len(*sizes*) < *nv*, the additional values will be
        taken cyclically from the array.

        *closed*, when *True*, will explicitly close the polygon.

        %(Collection)s
        N(   R   R	   RÕ   t	   set_verts(   R"   t   vertsRÖ   t   closedR1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   Ò  s    	c         C  su  t  j j | ƒ r3 | j t  j ƒ j t  j ƒ } n  | rLg  |  _ x,| D]ü } t | ƒ r,t  j j | ƒ r‘ t  j j	 | t  j
 d ƒ g ƒ } n- t  j | ƒ } t  j	 | t  j
 d ƒ g ƒ } t  j | j d d t j j ƒ} t j j | (t j j | d <t j j | d <|  j j t j | | ƒ ƒ qI |  j j t j | ƒ ƒ qI Wn% g  | D] } t j | ƒ ^ qS|  _ d S(	   s8   This allows one to delay initialization of the vertices.i   i   i    t   dtypeiÿÿÿÿN(   i   i   (   i   i   (   R   RO   RP   t   astypeR   RQ   RR   R!   R6   t   concatenatet   zerost   asarrayt   emptyR   RS   Rf   t	   code_typet   LINETOt   MOVETOt	   CLOSEPOLYRe   (   R"   Rà   Rá   t   xyRh   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRß   ê  s"    !	$" c         C  sg   |  j  d  k	 rW g  |  j  D]2 } t j ƒ  j t j | ƒ |  j j d ƒ ^ q |  _	 n  t
 j |  | ƒ S(   Ng      R@(   RÕ   R   RD   RØ   RÙ   R   RÚ   RÛ   RÜ   R@   R   Rˆ   (   R"   R_   R•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ     s    EN(   Rq   RÍ   R   RÝ   R   R‘   R	   Rß   R?   R   Rˆ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRÞ   Ñ  s
   t   BrokenBarHCollectionc           B  s/   e  Z d  Z e j d „  ƒ Z e d „  ƒ Z RS(   s]   
    A collection of horizontal bars spanning *yrange* with a sequence of
    *xranges*.
    c   
      K  s�   | \ } } | | } g  | D]G \ } } | | f | | f | | | f | | | f | | f g ^ q }	 t  j |  |	 | � d S(   s�   
        *xranges*
            sequence of (*xmin*, *xwidth*)

        *yrange*
            *ymin*, *ywidth*

        %(Collection)s
        N(   RÞ   R	   (
   R"   t   xrangest   yrangeR1   t   ymint   ywidtht   ymaxt   xmint   xwidthRà   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	     s
    
Qc   
      K  sˆ   g  } x_ t  j | ƒ D]N \ } } |  | | !} t | ƒ sA q n  | j | d | d | d f ƒ q Wt | | | | g | � }	 |	 S(   s(  
        Create a BrokenBarHCollection to plot horizontal bars from
        over the regions in *x* where *where* is True.  The bars range
        on the y-axis from *ymin* to *ymax*

        A :class:`BrokenBarHCollection` is returned.  *kwargs* are
        passed on to the collection.
        i    iÿÿÿÿ(   t   mlabt   contiguous_regionsR6   Re   Rí   (
   R•   Rð   Rò   t   whereR1   Rî   t   ind0t   ind1t   xslicet
   collection(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt
   span_where'  s    
'(   Rq   RÍ   RÎ   R   RÝ   R	   RÏ   Rü   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRí     s   t   RegularPolyCollectionc           B  s\   e  Z d  Z e j j Z e j d d d „ ƒ Z	 e
 d „  ƒ Z d „  Z d „  Z d „  Z RS(	   s6   Draw a collection of regular polygons with *numsides*.i    i   c         K  sW   t  j |  | � | |  _ | |  _ |  j | ƒ g |  _ | |  _ |  j t j	 ƒ  ƒ d S(   s]  
        *numsides*
            the number of sides of the polygon

        *rotation*
            the rotation of the polygon in radians

        *sizes*
            gives the area of the circle circumscribing the
            regular polygon in points^2

        %(Collection)s

        Example: see :file:`examples/dynamic_collection.py` for
        complete example::

            offsets = np.random.rand(20,2)
            facecolors = [cm.jet(x) for x in np.random.rand(20)]
            black = (0,0,0,1)

            collection = RegularPolyCollection(
                numsides=5, # a pentagon
                rotation=0, sizes=(50,),
                facecolors = facecolors,
                edgecolors = (black,),
                linewidths = (1,),
                offsets = offsets,
                transOffset = ax.transData,
                )
        N(
   R   R	   RÕ   t	   _numsidest   _path_generatorR!   t	   _rotationt   set_transformRD   R^   (   R"   t   numsidest   rotationRÖ   R1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   A  s    $			c         C  sr   g  |  j  D]O } t j ƒ  j |  j ƒ j t j | ƒ |  j j	 d t j t j
 ƒ ƒ ^ q
 |  _ t j |  | ƒ S(   Ng      R@(   RÕ   RD   RØ   t   rotateR   RÙ   R   RÚ   RÛ   RÜ   t   piR@   R   Rˆ   (   R"   R_   R•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ   l  s    _c         C  s   |  j  S(   N(   Rþ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_numsidest  s    c         C  s   |  j  S(   N(   R   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_rotationw  s    c         C  s   |  j  S(   N(   RÕ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR×   z  s    (   i   (   Rq   RÍ   RÎ   RS   Rf   t   unit_regular_polygonRÿ   R   RÝ   R	   R   Rˆ   R  R  R×   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRý   =  s   '		t   StarPolygonCollectionc           B  s   e  Z d  Z e j j Z RS(   s?   
    Draw a collection of regular stars with *numsides* points.(   Rq   RÍ   RÎ   RS   Rf   t   unit_regular_starRÿ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	  ~  s   t   AsteriskPolygonCollectionc           B  s   e  Z d  Z e j j Z RS(   sC   
    Draw a collection of regular asterisks with *numsides* points.(   Rq   RÍ   RÎ   RS   Rf   t   unit_regular_asteriskRÿ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR  …  s   t   LineCollectionc           B  s}   e  Z d  Z d d d d d d d d d d d „
 Z d „  Z e Z e Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z e Z RS(   s  
    All parameters must be sequences or scalars; if scalars, they will
    be converted to sequences.  The property of the ith line
    segment is::

       prop[i % len(props)]

    i.e., the properties cycle if the ``len`` of props is less than the
    number of segments.
    R   i   i   c         K  sÜ   | d k r t j d } n  | d k r; t j d f } n  | d k rZ t j d f } n  |  j | ƒ t j j | ƒ } t j |  d | d d d | d | d	 | d
 | d | d | d |	 d |
 d | | �|  j	 | ƒ d S(   sA  
        *segments*
            a sequence of (*line0*, *line1*, *line2*), where::

                linen = (x0, y0), (x1, y1), ... (xm, ym)

            or the equivalent numpy array with two columns. Each line
            can be a different length.

        *colors*
            must be a sequence of RGBA tuples (eg arbitrary color
            strings, etc, not allowed).

        *antialiaseds*
            must be a sequence of ones or zeros

        *linestyles* [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
            a string or dash tuple. The dash tuple is::

                (offset, onoffseq),

            where *onoffseq* is an even length tuple of on and off ink
            in points.

        If *linewidths*, *colors*, or *antialiaseds* is None, they
        default to their rcParams setting, in sequence form.

        If *offsets* and *transOffset* are not None, then
        *offsets* are transformed by *transOffset* and applied after
        the segments have been transformed to display coordinates.

        If *offsets* is not None but *transOffset* is None, then the
        *offsets* are added to the segments before any transformation.
        In this case, a single offset can be specified as::

            offsets=(xo,yo)

        and this value will be added cumulatively to each successive
        segment, so as to produce a set of successively offset curves.

        *norm*
            None (optional for :class:`matplotlib.cm.ScalarMappable`)
        *cmap*
            None (optional for :class:`matplotlib.cm.ScalarMappable`)

        *pickradius* is the tolerance for mouse clicks picking a line.
        The default is 5 pt.

        *zorder*
           The zorder of the LineCollection.  Default is 2

        The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
        If the :class:`~matplotlib.cm.ScalarMappable` array
        :attr:`~matplotlib.cm.ScalarMappable._A` is not None (ie a call to
        :meth:`~matplotlib.cm.ScalarMappable.set_array` has been made), at
        draw time a call to scalar mappable will be made to set the colors.
        s   lines.colors   lines.linewidths   lines.antialiasedR#   R$   R²   R%   R&   R'   R(   R)   R*   R+   R,   R0   N(
   R   R    R¡   R¬   R·   R¸   R¹   R   R	   t   set_segments(   R"   t   segmentsR%   t   colorsR'   R&   R(   R)   R*   R+   R,   R0   R1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   ™  s.    Fc         C  s¨   | d  k r d  Sg  } xE | D]= } t j j | ƒ sM t j | t j ƒ } n  | j | ƒ q W|  j d  k	 r |  j | ƒ } n  g  | D] } t	 j
 | ƒ ^ q† |  _ d  S(   N(   R   R   RO   RP   Ræ   R   Re   R   t   _add_offsetsRS   Rf   R!   (   R"   R  t	   _segmentst   seg(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR  ú  s    c         C  s_   g  } xR |  j  D]G } g  | j ƒ  D] \ } } | ^ q# } t j | ƒ } | j | ƒ q W| S(   N(   R!   t   iter_segmentsR   Ræ   Re   (   R"   R  Rj   t   vertext   _Rb   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_segments  s    %c         C  s    |  j  } t | ƒ } | j d } | d k r^ xk t | ƒ D] } | | | | | | <q; Wn> x; t | ƒ D]- } | | } | | | | | d !| | <qk W| S(   Ni    i   (   R   R6   R   t   range(   R"   t   segsR(   t   Nsegst   Noffst   it   io(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR    s    	
!c         C  s   |  j  | ƒ d S(   s5  
        Set the color(s) of the line collection.  *c* can be a
        matplotlib color arg (all patches have same color), or a
        sequence or rgba tuples; if it is a sequence the patches will
        cycle through the sequence.

        ACCEPTS: matplotlib color arg or sequence of rgba tuples
        N(   R   (   R"   R°   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR±   "  s    	c         C  s   t  j d ƒ |  j | ƒ S(   s4  
        Set the color(s) of the line collection.  *c* can be a
        matplotlib color arg (all patches have same color), or a
        sequence or rgba tuples; if it is a sequence the patches will
        cycle through the sequence

        ACCEPTS: matplotlib color arg or sequence of rgba tuples
        s6   LineCollection.color deprecated; use set_color instead(   R’   R“   R±   (   R"   R°   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   color-  s    	c         C  s   |  j  S(   N(   R¾   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt	   get_color9  s    N(   Rq   RÍ   RÎ   R   R	   R  Rß   R?   R  R  R±   R  R  t
   get_colors(    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR  Œ  s(   
W		
				t   EventCollectionc           B  s·   e  Z d  Z d d d d d d d d „ Z d „  Z d „  Z d „  Z e Z Z	 d „  Z
 d	 „  Z d
 „  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sÞ   
    A collection of discrete events.

    An event is a 1-dimensional value, usually the position of something along
    an axis, such as time or length.  Events do not have an amplitude.  They
    are displayed as v
    i    i   R   c	         K  sƒ  | | d | | d f }
 t  | ƒ d k r7 g  } nt | d ƒ rd | j d k rd t d ƒ ‚ nÞ | d k s” | j ƒ  d k s” | j ƒ  d k rÜ | j ƒ  g  | D]% } g  |
 D] } | | f ^ q² ^ q¥ } t |  _ nf | j ƒ  d k r6| j ƒ  g  | D]% } g  |
 D] } | | f ^ q^ qÿ } t	 |  _ n t d	 ƒ ‚ t
 j |  | d
 | d | d | d | |	 �| |  _ | |  _ d S(   sÐ  
        *positions*
            a sequence of numerical values or a 1D numpy array.  Can be None

        *orientation* [ 'horizontal' | 'vertical' | None ]
            defaults to 'horizontal' if not specified or None

        *lineoffset*
            a single numerical value, corresponding to the offset of the center
            of the markers from the origin

        *linelength*
            a single numerical value, corresponding to the total height of the
            marker (i.e. the marker stretches from lineoffset+linelength/2 to
            lineoffset-linelength/2).  Defaults to 1

        *linewidth*
            a single numerical value

        *color*
            must be a sequence of RGBA tuples (eg arbitrary color
            strings, etc, not allowed).

        *linestyle* [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]

        *antialiased*
            1 or 2

        If *linewidth*, *color*, or *antialiased* is None, they
        default to their rcParams setting, in sequence form.

        *norm*
            None (optional for :class:`matplotlib.cm.ScalarMappable`)
        *cmap*
            None (optional for :class:`matplotlib.cm.ScalarMappable`)

        *pickradius* is the tolerance for mouse clicks picking a line.
        The default is 5 pt.

        The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
        If the :class:`~matplotlib.cm.ScalarMappable` array
        :attr:`~matplotlib.cm.ScalarMappable._A` is not None (ie a call to
        :meth:`~matplotlib.cm.ScalarMappable.set_array` has been made), at
        draw time a call to scalar mappable will be made to set the colors.

        **Example:**

        .. plot:: mpl_examples/pylab_examples/eventcollection_demo.py
        g       @i    RÈ   i   sE   if positions is an ndarry it cannot have dimensionality great than 1 R²   t
   horizontalt   verticals.   orientation must be 'horizontal' or 'vertical'R%   R  R'   R&   N(   R6   RF   RÈ   R7   R   R´   t   sortR‘   t   _is_horizontalR�   R  R	   t   _linelengtht   _lineoffset(   R"   t	   positionst   orientationt
   lineoffsett
   linelengtht	   linewidthR  t	   linestylet   antialiasedR1   t   segmentR  t   coord1t   coord2(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   G  s6    =	
/
/		c         C  sV   |  j  ƒ  } |  j ƒ  r d n d } g  } x% | D] } | j | d | f ƒ q1 W| S(   sW   
        return an array containing the floating-point values of the positions
        i    i   (   R  t   is_horizontalRe   (   R"   R  t   posR(  R/  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_positions¤  s    c         C  s  | d k s- t | d ƒ r> t | ƒ d k r> |  j g  ƒ d S|  j ƒ  } |  j ƒ  } | | d | | d f } t j | ƒ } | j ƒ  |  j	 ƒ  rÌ g  | D]% } g  | D] } | | f ^ q« ^ qž } n2 g  | D]% } g  | D] } | | f ^ qà ^ qÓ } |  j | ƒ d S(   sH   
        set the positions of the events to the specified value
        R6   i    Ng       @(
   R   RF   R6   R  t   get_lineoffsett   get_linelengthR   R   R$  R2  (   R"   R(  R*  R+  R/  R0  R1  R  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_positions¯  s     
2/c         C  sl   | d k s- t | d ƒ r1 t | ƒ d k r1 d S|  j ƒ  } t j | t j | ƒ g ƒ } |  j | ƒ d S(   sC   
        add one or more events at the specified positions
        R6   i    N(   R   RF   R6   R4  R   t   hstackR   R7  (   R"   t   positionR(  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   add_positionsÆ  s    c         C  s   |  j  S(   sN   
        True if the eventcollection is horizontal, False if vertical
        (   R%  (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR2  Ò  s    c         C  s   |  j  ƒ  r d Sd S(   sf   
        get the orientation of the event line, may be:
        [ 'horizontal' | 'vertical' ]
        R"  R#  (   R2  (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   get_orientationØ  s    c         C  s]   |  j  ƒ  } x- t | ƒ D] \ } } t j | ƒ | | <q W|  j | ƒ |  j ƒ  |  _ d S(   su   
        switch the orientation of the event line, either from vertical to
        horizontal or vice versus
        N(   R  t	   enumerateR   t   fliplrR  R2  R%  (   R"   R  R  R/  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   switch_orientationß  s
    c         C  s„   | d k s0 | j ƒ  d k s0 | j ƒ  d k r9 t } n' | j ƒ  d k rT t } n t d ƒ ‚ | |  j ƒ  k rv d S|  j ƒ  d S(   sž   
        set the orientation of the event line
        [ 'horizontal' | 'vertical' | None ]
        defaults to 'horizontal' if not specified or None
        R²   R"  R#  s.   orientation must be 'horizontal' or 'vertical'N(   R   R´   R‘   R�   R7   R2  R>  (   R"   R)  R2  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_orientationê  s    		c         C  s   |  j  S(   sE   
        get the length of the lines used to mark each event
        (   R&  (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR6  ü  s    c         C  s¡   | |  j  ƒ  k r d S|  j ƒ  } |  j ƒ  } |  j ƒ  r@ d n d } x> | D]6 } | | d | d | f <| | d | d | f <qM W|  j | ƒ | |  _ d S(   sE   
        set the length of the lines used to mark each event
        Ni   i    g       @(   R6  R5  R  R2  R  R&  (   R"   R+  R*  R  R3  R/  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_linelength  s    c         C  s   |  j  S(   sE   
        get the offset of the lines used to mark each event
        (   R'  (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR5    s    c         C  s¡   | |  j  ƒ  k r d S|  j ƒ  } |  j ƒ  } |  j ƒ  r@ d n d } x> | D]6 } | | d | d | f <| | d | d | f <qM W|  j | ƒ | |  _ d S(   sE   
        set the offset of the lines used to mark each event
        Ni   i    g       @(   R5  R6  R  R2  R  R'  (   R"   R*  R+  R  R3  R/  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   set_lineoffset  s    c         C  s   |  j  ƒ  d S(   sD   
        get the width of the lines used to mark each event
        i    (   RÅ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRÑ   &  s    c         C  s
   |  j  ƒ  S(   sz   
        get the style of the lines used to mark each event
        [ 'solid' | 'dashed' | 'dashdot' | 'dotted' ]
        (   RÆ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRÓ   ,  s    c         C  s   |  j  ƒ  d S(   sD   
        get the color of the lines used to mark each event
        i    (   R   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR  3  s    N(   Rq   RÍ   RÎ   R   R	   R4  R7  R:  t   extend_positionst   append_positionsR2  R;  R>  R?  R6  R@  R5  RA  RÑ   RÓ   R  (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR!  >  s.   U			

									t   CircleCollectionc           B  s8   e  Z d  Z e j d „  ƒ Z d „  Z e d „  ƒ Z RS(   s7   
    A collection of circles, drawn using splines.
    c         K  sE   t  j |  | � | |  _ |  j t j ƒ  ƒ t j j ƒ  g |  _	 d S(   sf   
        *sizes*
            Gives the area of the circle in points^2

        %(Collection)s
        N(
   R   R	   RÕ   R  RD   R^   RS   Rf   t   unit_circleR!   (   R"   RÖ   R1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   >  s    	c         C  s   |  j  S(   s   return sizes of circles(   RÕ   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR×   K  s    c         C  se   g  |  j  D]B } t j ƒ  j t j | ƒ |  j j d t j t j ƒ ƒ ^ q
 |  _	 t
 j |  | ƒ S(   Ng      R@(   RÕ   RD   RØ   RÙ   R   RÚ   RÛ   RÜ   R  R@   R   Rˆ   (   R"   R_   R•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ   O  s    R(	   Rq   RÍ   RÎ   R   RÝ   R	   R×   R   Rˆ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRD  :  s   	t   EllipseCollectionc           B  s;   e  Z d  Z e j d d „ ƒ Z d „  Z e d „  ƒ Z RS(   s8   
    A collection of ellipses, drawn using splines.
    t   pointsc         K  s©   t  j |  | � d t j | ƒ j ƒ  |  _ d t j | ƒ j ƒ  |  _ t j | ƒ j ƒ  t j d |  _ | |  _	 |  j
 t j ƒ  ƒ g  |  _ t j j ƒ  g |  _ d S(   sÁ  
        *widths*: sequence
            lengths of first axes (e.g., major axis lengths)

        *heights*: sequence
            lengths of second axes

        *angles*: sequence
            angles of first axes, degrees CCW from the X-axis

        *units*: ['points' | 'inches' | 'dots' | 'width' | 'height'
        | 'x' | 'y' | 'xy']

            units in which majors and minors are given; 'width' and
            'height' refer to the dimensions of the axes, while 'x'
            and 'y' refer to the *offsets* data units. 'xy' differs
            from all others in that the angle as plotted varies with
            the aspect ratio, and equals the specified angle only when
            the aspect ratio is unity.  Hence it behaves the same as
            the :class:`~matplotlib.patches.Ellipse` with
            axes.transData as its transform.

        Additional kwargs inherited from the base :class:`Collection`:

        %(Collection)s
        g      à?g     €f@N(   R   R	   R   Ræ   t   ravelt   _widthst   _heightsR  t   _anglest   _unitsR  RD   R^   R@   RS   Rf   RE  R!   (   R"   t   widthst   heightst   anglest   unitsR1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   ^  s    #		c   
      C  sò  g  |  _  |  j } |  j } |  j d k r3 d } nñ |  j d k r[ | j j | j j } nÉ |  j d k rƒ | j j | j j } n¡ |  j d k rž | j } n† |  j d k r½ | j d } ng |  j d k rÛ | j j } nI |  j d	 k rù | j j } n+ |  j d
 k rd } n t	 d |  j ƒ ‚ t
 j } xb t |  j |  j |  j ƒ D]E \ } } } | ƒ  j | | | | ƒ j | ƒ } |  j  j | ƒ qIW|  j d k rî| j j ƒ  j ƒ  j ƒ  }	 d |	 d d … d d … f <|  j | |	 ƒ ƒ n  d S(   sB   
        Calculate transforms immediately before drawing.
        Rì   i   R•   R–   t   inchesRG  g      R@t   widtht   heightt   dotsg      ð?s   unrecognized units: %si    Ni   (   R@   RG   RÛ   RL  t   bboxRR  t   viewLimRS  RÜ   R7   RD   RØ   Rg   RI  RJ  RK  RÙ   R  Re   RX   RM   t
   get_matrixt   copyR  (
   R"   t   axt   figt   sct   _affineR•   R–   t   at   transt   m(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   _set_transformsƒ  s8    						+&c         C  s   |  j  ƒ  t j |  | ƒ d  S(   N(   R`  R   Rˆ   (   R"   R_   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ   ¨  s    
(	   Rq   RÍ   RÎ   R   RÝ   R	   R`  R   Rˆ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRF  Z  s
   $	%t   PatchCollectionc           B  s#   e  Z d  Z e d „ Z d „  Z RS(   sþ   
    A generic collection of patches.

    This makes it easier to assign a color map to a heterogeneous
    collection of patches.

    This also may improve plotting speed, since PatchCollection will
    draw faster than a large number of patches.
    c         K  sù   | rØ d „  } g  | D] } | | ƒ ^ q } g  | D] } | j  ƒ  ^ q5 } g  | D] } | j ƒ  ^ qT } g  | D] } | j ƒ  ^ qs }	 g  | D] } | j ƒ  ^ q’ }
 t j |  d | d | d | d |	 d |
 ƒn t j |  | � |  j | ƒ d S(   s}  
        *patches*
            a sequence of Patch objects.  This list may include
            a heterogeneous assortment of different patch types.

        *match_original*
            If True, use the colors and linewidths of the original
            patches.  If False, new colors may be assigned by
            providing the standard collection arguments, facecolor,
            edgecolor, linewidths, norm or cmap.

        If any of *edgecolors*, *facecolors*, *linewidths*,
        *antialiaseds* are None, they default to their
        :data:`matplotlib.rcParams` patch setting, in sequence form.

        The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
        If the :class:`~matplotlib.cm.ScalarMappable` matrix _A is not
        None (ie a call to set_array has been made), at draw time a
        call to scalar mappable will be made to set the face colors.
        c         S  s&   |  j  ƒ  r |  j ƒ  Sd d d d g S(   Ni    (   t   get_fillR}   (   t   patch(    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   determine_facecolorÐ  s    
R#   R$   R%   R&   R'   N(   R~   RÑ   RÓ   t   get_antialiasedR   R	   R?   (   R"   t   patchest   match_originalR1   Rd  R[   R$   R#   R%   R&   R'   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   ¹  s     	
c         C  s;   g  | D]! } | j  ƒ  j | j ƒ  ƒ ^ q } | |  _ d  S(   N(   RJ   t   transform_patht   get_pathR!   (   R"   Rf  R[   RZ   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR?   ç  s    +(   Rq   RÍ   RÎ   R�   R	   R?   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRa  ®  s   	.t   TriMeshc           B  sG   e  Z d  Z d „  Z d „  Z d „  Z e d „  ƒ Z e d „  ƒ Z	 RS(   s¨   
    Class for the efficient drawing of a triangular mesh using
    Gouraud shading.

    A triangular mesh is a :class:`~matplotlib.tri.Triangulation`
    object.
    c         K  s„   t  j |  | � | |  _ d |  _ t |  _ t j j ƒ  |  _	 t
 j | j j d d ƒ | j j d d ƒ f ƒ } |  j	 j | ƒ d  S(   Nt   gouraudiÿÿÿÿi   (   R   R	   t   _triangulationt   _shadingR‘   R³   RD   RW   t   unitt   _bboxR   R8  R•   t   reshapeR–   t   update_from_data_xy(   R"   t   triangulationR1   Rì   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   õ  s    			c         C  s#   |  j  d  k r |  j ƒ  n  |  j  S(   N(   R!   R   R?   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR=     s    c         C  s   |  j  |  j ƒ |  _ d  S(   N(   t   convert_mesh_to_pathsRl  R!   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR?     s    c         C  su   t  j } |  j ƒ  } t j |  j | d t j f |  j | d t j f f d d ƒ} g  | D] } | | ƒ ^ q_ S(   sú   
        Converts a given mesh into a sequence of
        :class:`matplotlib.path.Path` objects for easier rendering by
        backends that do not directly support meshes.

        This function is primarily of use to backend implementers.
        .t   axisi   (   RS   Rf   t   get_masked_trianglesR   Rä   R•   t   newaxisR–   (   t   triRf   t	   trianglesRà   R•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRs    s
    		&c         C  s  |  j  ƒ  s d  S| j |  j j ƒ |  j ƒ  } |  j } | j ƒ  } t j | j	 | d t j
 f | j | d t j
 f f d d ƒ} |  j ƒ  |  j | } | j ƒ  } |  j | ƒ | j |  j ƒ  d ƒ | j | | | | j ƒ  ƒ | j ƒ  | j |  j j ƒ d  S(   N.Rt  i   i    (   Rn   Ro   Rp   Rq   RJ   Rl  Ru  R   Rä   R•   Rv  R–   Rs   R»   Rt   Ru   R   RÑ   t   draw_gouraud_trianglesRU   R„   R…   (   R"   R_   RY   Rw  Rx  Rà   R  R†   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ     s     	&

(
   Rq   RÍ   RÎ   R	   R=   R?   RÏ   Rs  R   Rˆ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRj  í  s   			t   QuadMeshc           B  s_   e  Z d  Z e d d „ Z d „  Z d „  Z e d „  ƒ Z d „  Z	 d „  Z
 e d „  ƒ Z RS(	   sÄ  
    Class for the efficient drawing of a quadrilateral mesh.

    A quadrilateral mesh consists of a grid of vertices. The
    dimensions of this array are (*meshWidth* + 1, *meshHeight* +
    1). Each vertex in the mesh has a different set of "mesh
    coordinates" representing its position in the topology of the
    mesh. For any values (*m*, *n*) such that 0 <= *m* <= *meshWidth*
    and 0 <= *n* <= *meshHeight*, the vertices at mesh coordinates
    (*m*, *n*), (*m*, *n* + 1), (*m* + 1, *n* + 1), and (*m* + 1, *n*)
    form one of the quadrilaterals in the mesh. There are thus
    (*meshWidth* * *meshHeight*) quadrilaterals in the mesh.  The mesh
    need not be regular and the polygons need not be convex.

    A quadrilateral mesh is represented by a (2 x ((*meshWidth* + 1) *
    (*meshHeight* + 1))) numpy array *coordinates*, where each row is
    the *x* and *y* coordinates of one of the vertices.  To define the
    function that maps from a data point to its corresponding color,
    use the :meth:`set_cmap` method.  Each of these arrays is indexed in
    row-major order by the mesh coordinates of the vertex (or the mesh
    coordinates of the lower left vertex, in the case of the
    colors).

    For example, the first entry in *coordinates* is the
    coordinates of the vertex at mesh coordinates (0, 0), then the one
    at (0, 1), then at (0, 2) .. (0, meshWidth), (1, 0), (1, 1), and
    so on.

    *shading* may be 'flat', or 'gouraud'
    t   flatc         K  s¿   t  j |  | � | |  _ | |  _ | |  _ | |  _ | |  _ t j j	 ƒ  |  _
 |  j
 j | j | d | d d f ƒ ƒ |  j j | d | d d f ƒ |  _ t j |  j t j ƒ |  _ d  S(   Ni   i   (   R   R	   t
   _meshWidtht   _meshHeightt   _coordinatest   _antialiasedRm  RD   RW   Rn  Ro  Rq  Rp  R   R   R   (   R"   t	   meshWidtht
   meshHeightt   coordinatesR.  t   shadingR1   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR	   R  s    						c         C  s#   |  j  d  k r |  j ƒ  n  |  j  S(   N(   R!   R   R?   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR=   d  s    c         C  s%   |  j  |  j |  j |  j ƒ |  _ d  S(   N(   Rs  R|  R}  R~  R!   (   R"   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR?   i  s    c      	   C  sõ   t  j } t j | ƒ r$ | j } n | } t j | d d … d d … f | d d … d d … f | d d … d d … f | d d … d d … f | d d … d d … f f d d ƒ} | j |  | d d f ƒ } g  | D] } | | ƒ ^ qß S(   sþ   
        Converts a given mesh into a sequence of
        :class:`matplotlib.path.Path` objects for easier rendering by
        backends that do not directly support quadmeshes.

        This function is primarily of use to backend implementers.
        i    iÿÿÿÿi   NRt  i   i   (   RS   Rf   RO   RP   RŸ   R   Rä   Rp  (   R€  R�  R‚  Rf   R°   RG  R•   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRs  m  s    			c         C  s  t  j | ƒ r | j } n | } | d d … d d … f } | d d … d d … f } | d d … d d … f } | d d … d d … f } | | | | d }	 t j | | |	 | | |	 | | |	 | | |	 f d d ƒ}
 |
 j | | d d d f ƒ }
 |  j ƒ  j | d | d d f ƒ } | d d … d d … f } | d d … d d … f } | d d … d d … f } | d d … d d … f } | | | | d } t j | | | | | | | | | | | | f d d ƒ} | j | | d d d f ƒ } |
 | f S(	   s³   
        Converts a given mesh into a sequence of triangles, each point
        with its own color.  This is useful for experiments using
        `draw_qouraud_triangle`.
        Niÿÿÿÿi   g      @Rt  i   i   i   (   RO   RP   RŸ   R   Rä   Rp  R}   (   R"   R€  R�  R‚  R[   t   p_at   p_bt   p_ct   p_dt   p_centerRx  R°   t   c_at   c_bt   c_ct   c_dt   c_centerR  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   convert_mesh_to_triangles‡  s:    				 &				 c         C  s   |  j  S(   N(   Ro  (   R"   RX   (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyR]   ±  s    c         C  sh  |  j  ƒ  s d  S| j |  j j |  j ƒ  ƒ |  j ƒ  } |  j ƒ  } |  j } |  j ƒ  rÁ t	 |  j ƒ rÁ |  j
 |  j d  d  … d f ƒ } |  j |  j d  d  … d f ƒ } t | | ƒ } qÁ n  t j | t j ƒ } d | _ |  j ƒ  | j sU|  j j |  j j d |  j j d d f ƒ } | j | ƒ } | j |  j j ƒ } t j ƒ  } n	 |  j } | j s…| j | ƒ } | j ƒ  } n  | j ƒ  } |  j | ƒ | j |  j ƒ  d ƒ |  j d k r|  j |  j  |  j! | ƒ \ }	 }
 | j" | |	 |
 | j# ƒ  ƒ nC | j$ | | j# ƒ  |  j  |  j! | | | |  j% ƒ  |  j& |  j' ƒ  ƒ
 | j( ƒ  | j) |  j j ƒ d  S(   Ni    i   iÿÿÿÿi   Rk  (   iÿÿÿÿi   (*   Rn   Ro   Rp   Rq   Rr   RJ   RI   R   Ra   R6   Rc   Rd   Rg   R   Ræ   R   R   Rs   RK   R~  Rp  RY   RD   R^   RN   RM   Rt   Ru   R   RÑ   Rm  RŽ  R|  R}  Ry  RU   t   draw_quad_meshR}   R  RÐ   R„   R…   (   R"   R_   RY   R)   R(   Rk   Rl   R‚  R†   Rx  R  (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRˆ   ´  sP    	""	
				
(   Rq   RÍ   RÎ   R‘   R	   R=   R?   RÏ   Rs  RŽ  R]   R   Rˆ   (    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyRz  3  s   			*	(4   RÎ   t
   __future__R    R’   t   numpyR   t   numpy.maRO   t
   matplotlibR    t   matplotlib.cbookR4   t   matplotlib.colorsR  R·   t   matplotlib.cmR
   R   t   matplotlib.transformsRD   t   matplotlib.artistR   R   t   matplotlib.backend_basesR¥   t   matplotlib.pathRj   RS   R   t   matplotlib.mlabRõ   R   R   R   t   interpdR    RÔ   RÞ   Rí   Rý   R	  R  R  R!  RD  RF  Ra  Rj  Rz  t   kwdoct   patchstrt   k(    (    (    sP   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/collections.pyt   <module>
   sR   ÿ ÿ {$=/A²ü T?F¶