ó
 m[c           @` sŁ   d  d l  m Z m Z m Z m Z d  d l Z d d l m Z m Z m	 Z	 m
 Z
 d d l m Z d  d l m Z d e f d     YZ e   Z e j e j e e e e	 e
  d	   Z d d
  Z d   Z d   Z d S(   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNi   (   t
   AitoffAxest
   HammerAxest   LambertAxest   MollweideAxes(   t	   PolarAxes(   t   axest   ProjectionRegistryc           B` s2   e  Z d  Z d   Z d   Z d   Z d   Z RS(   uA   
    Manages the set of projections available to the system.
    c         C` s   i  |  _  d  S(   N(   t   _all_projection_types(   t   self(    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   __init__   s    c         G` s+   x$ | D] } | j  } | |  j | <q Wd S(   u6   
        Register a new set of projection(s).
        N(   t   nameR   (   R   t   projectionst
   projectionR   (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   register   s    	c         C` s   |  j  | S(   u9   
        Get a projection class from its *name*.
        (   R   (   R   R   (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   get_projection_class   s    c         C` s   t  |  j  S(   uZ   
        Get a list of the names of all projections currently
        registered.
        (   t   sortedR   (   R   (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   get_projection_names   s    (   t   __name__t
   __module__t   __doc__R   R   R   R   (    (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyR
   
   s
   			c         C` s   t  j |   d  S(   N(   t   projection_registryR   (   t   cls(    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   register_projection0   s    c         C` sN   |  d k r d }  n  y t j |   SWn! t k
 rI t d |    n Xd S(   u   
    Get a projection class from its name.

    If *projection* is None, a standard rectilinear projection is
    returned.
    u   rectilinearu   Unknown projection '%s'N(   t   NoneR   R   t   KeyErrort
   ValueError(   R   (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyR   4   s    	c         O` sė   | j  d t  } | j  d d  } | r^ | d k	 rU | d k rU t d |   n  d } n  t | t j  s| | d k r t |  } nA t | d  r¼ | j	   \ } } | j
 |   n t d |   |  j | |   } | | | f S(   u  
    Handle the args/kwargs to for add_axes/add_subplot/gca,
    returning::

        (axes_proj_class, proj_class_kwargs, proj_stack_key)

    Which can be used for new axes initialization/identification.

    .. note:: **kwargs** is modified in place.

    u   polaru
   projectionuN   polar=True, yet projection=%r. Only one of these arguments should be supplied.u   _as_mpl_axesuL   projection must be a string, None or implement a _as_mpl_axes method. Got %rN(   t   popt   FalseR   R   t
   isinstancet   sixt   string_typesR   t   hasattrt   _as_mpl_axest   updatet	   TypeErrort	   _make_key(   t   figuret   argst   kwargst   ispolarR   t   projection_classt   extra_kwargst   key(    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   process_projection_requirementsD   s"    	
c           C` s
   t  j   S(   u4   
    Get a list of acceptable projection names.
    (   R   R   (    (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyR   j   s    (   t
   __future__R    R   R   R   R!   t   geoR   R   R   R   t   polarR   t
   matplotlibR	   t   objectR
   R   R   t   AxesR   R   R   R/   R   (    (    (    s>   lib/python2.7/site-packages/matplotlib/projections/__init__.pyt   <module>   s"   ""			&