ó
±éRc           @   sk   d  d l  j Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d	 „  ƒ  YZ d S(
   iÿÿÿÿNt	   Containerc           B   s}   e  Z d  Z d „  Z d „  Z d d „ Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z RS(   s$   
    Base class for containers.
    c         C   s   d t  |  ƒ S(   Ns    <Container object of %d artists>(   t   len(   t   self(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   __repr__	   s    c         O   s   t  j |  | d ƒ S(   Ni    (   t   tuplet   __new__(   t   clst   klt   kwargs(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR      s    c         C   s5   t  |  _ d |  _ i  |  _ d  |  _ |  j | ƒ d  S(   Ni    (   t   Falset   eventsont   _oidt   _propobserverst   Nonet   _remove_methodt	   set_label(   R   R   t   label(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   __init__   s
    				c         C   s   | |  _  d  S(   N(   R   (   R   t   f(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   set_remove_method   s    c         C   s8   x |  D] } | j  ƒ  q W|  j r4 |  j |  ƒ n  d  S(   N(   t   removeR   (   R   t   c(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR      s    	c         C   s   |  j  j ƒ  } d  | d <| S(   NR   (   t   __dict__t   copyR   (   R   t   d(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   __getstate__#   s    
c         C   s   |  j  S(   sC   
        Get the label used for this artist in the legend.
        (   t   _label(   R   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt	   get_label*   s    c         C   s6   | d k	 r d | f |  _ n	 d |  _ |  j ƒ  d S(   s|   
        Set the label to *s* for auto legend.

        ACCEPTS: string or anything printable with '%s' conversion.
        s   %sN(   R   R   t   pchanged(   R   t   s(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR   0   s    	c         C   s)   |  j  } | |  j | <|  j  d 7_  | S(   sî   
        Adds a callback function that will be called whenever one of
        the :class:`Artist`'s properties changes.

        Returns an *id* that is useful for removing the callback with
        :meth:`remove_callback` later.
        i   (   R   R   (   R   t   funct   oid(    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   add_callback<   s    	c         C   s&   y |  j  | =Wn t k
 r! n Xd S(   s“   
        Remove a callback based on its *id*.

        .. seealso::

            :meth:`add_callback`
               For adding callbacks

        N(   R   t   KeyError(   R   R   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   remove_callbackI   s    
c         C   s.   x' |  j  j ƒ  D] \ } } | |  ƒ q Wd S(   sg   
        Fire an event when property changed, calling all of the
        registered callbacks.
        N(   R   t   items(   R   R   R   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR   X   s    c         C   s   t  t j |  ƒ ƒ S(   N(   t   listt   cbookt   flatten(   R   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   get_children`   s    N(   t   __name__t
   __module__t   __doc__R   R   R   R   R   R   R   R   R   R    R"   R   R'   (    (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR       s   		
								t   BarContainerc           B   s   e  Z d d  „ Z RS(   c         K   s)   | |  _  | |  _ t j |  | | � d  S(   N(   t   patchest   errorbarR    R   (   R   R,   R-   R   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR   f   s    		N(   R(   R)   R   R   (    (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR+   d   s   t   ErrorbarContainerc           B   s   e  Z e e d  „ Z RS(   c         K   s2   | |  _  | |  _ | |  _ t j |  | | � d  S(   N(   t   linest   has_xerrt   has_yerrR    R   (   R   R/   R0   R1   R   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR   n   s    			(   R(   R)   R	   R   (    (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR.   l   s   t   StemContainerc           B   s   e  Z d  „  Z RS(   c         K   sA   | \ } } } | |  _  | |  _ | |  _ t j |  | | � d  S(   N(   t
   markerlinet	   stemlinest   baselineR    R   (   R   t   markerline_stemlines_baselineR   R3   R4   R5   (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR   w   s
    			(   R(   R)   R   (    (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyR2   u   s   (   t   matplotlib.cbookR%   R   R    R+   R.   R2   (    (    (    sN   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/matplotlib/container.pyt   <module>   s   `	