§
    (ý?ež  ã            	       ó  — d Z ddlmZmZ ddlmZmZmZmZ ddl	m
Z
 ddlmZ  G d„ d	¦  «        Z e¦   «         Ze                     ej        e
eeeee¦  «         d
„ Zdd„Zej        Zej                              e¦   «         ¬¦  «         dS )a	  
Non-separable transforms that map from data space to screen space.

Projections are defined as `~.axes.Axes` subclasses.  They include the
following elements:

- A transformation from data coordinates into display coordinates.

- An inverse of that transformation.  This is used, for example, to convert
  mouse positions from screen space back into data space.

- Transformations for the gridlines, ticks and ticklabels.  Custom projections
  will often need to place these elements in special locations, and Matplotlib
  has a facility to help with doing so.

- Setting up default values (overriding `~.axes.Axes.cla`), since the defaults
  for a rectilinear axes may not be appropriate.

- Defining the shape of the axes, for example, an elliptical axes, that will be
  used to draw the background of the plot and for clipping any data elements.

- Defining custom locators and formatters for the projection.  For example, in
  a geographic projection, it may be more convenient to display the grid in
  degrees, even if the data is in radians.

- Set up interactive panning and zooming.  This is left as an "advanced"
  feature left to the reader, but there is an example of this for polar plots
  in `matplotlib.projections.polar`.

- Any additional methods for additional convenience or features.

Once the projection axes is defined, it can be used in one of two ways:

- By defining the class attribute ``name``, the projection axes can be
  registered with `matplotlib.projections.register_projection` and subsequently
  simply invoked by name::

      fig.add_subplot(projection="my_proj_name")

- For more complex, parameterisable projections, a generic "projection" object
  may be defined which includes the method ``_as_mpl_axes``. ``_as_mpl_axes``
  should take no arguments and return the projection's axes subclass and a
  dictionary of additional arguments to pass to the subclass' ``__init__``
  method.  Subsequently a parameterised projection can be initialised with::

      fig.add_subplot(projection=MyProjection(param1=param1_value))

  where MyProjection is an object which implements a ``_as_mpl_axes`` method.

A full-fledged and heavily annotated example is in
:doc:`/gallery/misc/custom_projection`.  The polar plot functionality in
`matplotlib.projections.polar` may also be of interest.
é   )ÚaxesÚ
_docstringé   )Ú
AitoffAxesÚ
HammerAxesÚLambertAxesÚMollweideAxes)Ú	PolarAxesé    )ÚAxes3Dc                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )ÚProjectionRegistryz?A mapping of registered projection names to projection classes.c                 ó   — i | _         d S ©N©Ú_all_projection_types©Úselfs    ú?lib/python3.11/site-packages/matplotlib/projections/__init__.pyÚ__init__zProjectionRegistry.__init__@   s   € Ø%'ˆÔ"Ð"Ð"ó    c                 ó2   — |D ]}|j         }|| j        |<   ŒdS )z"Register a new set of projections.N)Únamer   )r   ÚprojectionsÚ
projectionr   s       r   ÚregisterzProjectionRegistry.registerC   s2   € à%ð 	:ð 	:ˆJØ”?ˆDØ/9ˆDÔ& tÑ,Ð,ð	:ð 	:r   c                 ó   — | j         |         S )z'Get a projection class from its *name*.r   )r   r   s     r   Úget_projection_classz'ProjectionRegistry.get_projection_classI   s   € àÔ)¨$Ô/Ð/r   c                 ó*   — t          | j        ¦  «        S )z9Return the names of all projections currently registered.)Úsortedr   r   s    r   Úget_projection_namesz'ProjectionRegistry.get_projection_namesM   s   € ådÔ0Ñ1Ô1Ð1r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r!   © r   r   r   r   =   sV   € € € € € ØIÐIð(ð (ð (ð:ð :ð :ð0ð 0ð 0ð2ð 2ð 2ð 2ð 2r   r   c                 ó:   — t                                | ¦  «         d S r   )Úprojection_registryr   )Úclss    r   Úregister_projectionr*   ^   s   € Ý× Ò  Ñ%Ô%Ð%Ð%Ð%r   Nc                 óŠ   — | €d} 	 t                                | ¦  «        S # t          $ r}t          d| z  ¦  «        |‚d}~ww xY w)z|
    Get a projection class from its name.

    If *projection* is None, a standard rectilinear projection is returned.
    NÚrectilinearzUnknown projection %r)r(   r   ÚKeyErrorÚ
ValueError)r   Úerrs     r   r   r   b   sb   € ð ÐØ"ˆ
ðHÝ"×7Ò7¸
ÑCÔCÐCøÝð Hð Hð HÝÐ0°:Ñ=Ñ>Ô>ÀCÐGøøøøðHøøøs   †   
Aª=½A)Úprojection_namesr   )r%   Ú r   r   Úgeor   r   r   r	   Úpolarr
   Úmpl_toolkits.mplot3dr   r   r(   r   ÚAxesr*   r   r!   ÚinterpdÚupdater&   r   r   ú<module>r8      s6  ðð4ð 4ðl  Ð Ð Ð Ð Ð Ð Ð Ø CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CÐ CØ Ð Ð Ð Ð Ð Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'ð2ð 2ð 2ð 2ð 2ñ 2ô 2ð 2ð* )Ð(Ñ*Ô*Ð Ø × Ò Ø„IØØØØØØ
ñô ð ð&ð &ð &ðHð Hð Hð Hð +Ô?Ð Ø 
Ô × Ò Ð+?Ð+?Ñ+AÔ+AÐ Ñ BÔ BÐ BÐ BÐ Br   