§
    ‡Ûg'M  ã                   ó  — d Z ddlZddlZ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mZmZ  G d	„ d
¦  «        Z G d„ d¦  «        Z G d„ d¦  «        Z G d„ de¦  «        Z G d„ dej        ¦  «        Z G d„ de¦  «        ZeZeZdS )a�  
Axislines includes modified implementation of the Axes class. The
biggest difference is that the artists responsible for drawing the axis spine,
ticks, ticklabels and axis labels are separated out from Matplotlib's Axis
class. Originally, this change was motivated to support curvilinear
grid. Here are a few reasons that I came up with a new axes class:

* "top" and "bottom" x-axis (or "left" and "right" y-axis) can have
  different ticks (tick locations and labels). This is not possible
  with the current Matplotlib, although some twin axes trick can help.

* Curvilinear grid.

* angled ticks.

In the new axes class, xaxis and yaxis is set to not visible by
default, and new set of artist (AxisArtist) are defined to draw axis
line, ticks, ticklabels and axis label. Axes.axis attribute serves as
a dictionary of these artists, i.e., ax.axis["left"] is a AxisArtist
instance responsible to draw left y-axis. The default Axes.axis contains
"bottom", "left", "top" and "right".

AxisArtist can be considered as a container artist and has the following
children artists which will draw ticks, labels, etc.

* line
* major_ticks, major_ticklabels
* minor_ticks, minor_ticklabels
* offsetText
* label

Note that these are separate artists from `matplotlib.axis.Axis`, thus most
tick-related functions in Matplotlib won't work. For example, color and
markerwidth of the ``ax.axis["bottom"].major_ticks`` will follow those of
Axes.xaxis unless explicitly specified.

In addition to AxisArtist, the Axes will have *gridlines* attribute,
which obviously draws grid lines. The gridlines needs to be separated
from the axis as some gridlines can never pass any axis.
é    N)Ú_api)ÚPath)Úmpl_axesé   )ÚAxislineStyle)Ú
AxisArtistÚGridlinesCollectionc                   ód   — e Zd ZdZ G d„ d¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )	ÚAxisArtistHelperaG  
    Axis helpers should define the methods listed below.  The *axes* argument
    will be the axes attribute of the caller artist.

    ::

        # Construct the spine.

        def get_line_transform(self, axes):
            return transform

        def get_line(self, axes):
            return path

        # Construct the label.

        def get_axislabel_transform(self, axes):
            return transform

        def get_axislabel_pos_angle(self, axes):
            return (x, y), angle

        # Construct the ticks.

        def get_tick_transform(self, axes):
            return transform

        def get_tick_iterators(self, axes):
            # A pair of iterables (one for major ticks, one for minor ticks)
            # that yield (tick_position, tick_angle, tick_label).
            return iter_major, iter_minor
    c                   ó²   — e Zd ZdZd„ Z  ej        d¦  «         ed„ d„ ¦  «        ¦  «        Z  ej        d¦  «         ed„ d„ ¦  «        ¦  «        Z	d„ Z
d	S )
úAxisArtistHelper._BasezBase class for axis helper.c                 ó   — d S ©N© ©ÚselfÚaxess     úW/granary/edev/quantum/lib/python3.11/site-packages/mpl_toolkits/axisartist/axislines.pyÚ
update_limz!AxisArtistHelper._Base.update_limZ   s   € ØˆDó    ú3.6c                 ó   — dS ©Ngñhãˆµøä>r   ©r   s    r   ú<lambda>zAxisArtistHelper._Base.<lambda>^   ó   €  '€ r   c                 ó   — d S r   r   ©r   Úvalues     r   r   zAxisArtistHelper._Base.<lambda>^   ó   € ¸t€ r   c                 ó   — dS r   r   r   s    r   r   zAxisArtistHelper._Base.<lambda>`   r   r   c                 ó   — d S r   r   r   s     r   r   zAxisArtistHelper._Base.<lambda>`   r    r   c                 óð   — | j         dk    r)t          j        t          j        ||¦  «        d¬¦  «        S | j         dk    r)t          j        t          j        ||¦  «        d¬¦  «        S t	          d¦  «        ‚)aÂ  
            Create a (*values.shape, 2)-shape array representing (x, y) pairs.

            *values* go into the coordinate determined by ``self.nth_coord``.
            The other coordinate is filled with the constant *const*.

            Example::

                >>> self.nth_coord = 0
                >>> self._to_xy([1, 2, 3], const=0)
                array([[1, 0],
                       [2, 0],
                       [3, 0]])
            r   éÿÿÿÿ©Úaxisr   zUnexpected nth_coord)Ú	nth_coordÚnpÚstackÚbroadcast_arraysÚ
ValueError)r   ÚvaluesÚconsts      r   Ú_to_xyzAxisArtistHelper._Base._to_xyb   sq   € ð Œ~ Ò"Ð"Ý”x¥Ô 3°F¸EÑ BÔ BÈÐLÑLÔLÐLØ” 1Ò$Ð$Ý”x¥Ô 3°E¸6Ñ BÔ BÈÐLÑLÔLÐLå Ð!7Ñ8Ô8Ð8r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ú
deprecatedÚpropertyÚdelta1Údelta2r.   r   r   r   Ú_Baser   W   s¦   € € € € € Ø)Ð)ð	ð 	ð 	ð (��” Ñ'Ô'ØˆHÐ)Ð)Ð+CÐ+CÑDÔDñFô Fˆà'��” Ñ'Ô'ØˆHÐ)Ð)Ð+CÐ+CÑDÔDñFô Fˆð	9ð 	9ð 	9ð 	9ð 	9r   r7   c                   óŽ   ‡ — e Zd ZdZ  ej        d¦  «         ed„ ¦  «        ¦  «        Zdˆ fd„	Zd„ Z	d„ Z
d„ Zd	„ Zd
„ Zd„ Zˆ xZS )úAxisArtistHelper.Fixedz7Helper class for a fixed (in the axes coordinate) axis.ú3.7c                 ó&   — dddddœ| j                  S )N)r   r   )r   r   ©r   r   ©ÚleftÚrightÚbottomÚtop)Ú_locr   s    r   r   zAxisArtistHelper.Fixed.<lambda>|   s"   €  &°6Ø$*°6ð;ð ;Ø;?¼9ôF€ r   Nc                 óz  •— |�|nt          j        dddddœ|¬¦  «        | _        |dk    r|dvs
|dk    r|dvrt          j        dd	|›d
�¬¦  «         || _        dddddœ|         | _        t          ¦   «                              ¦   «          t          |  	                    d| j        ¬¦  «        ¦  «        | _
        dS )z5``nth_coord = 0``: x-axis; ``nth_coord = 1``: y-axis.Nr   r   ©r@   rA   r>   r?   )Úloc)r>   r?   ©r@   rA   r:   zloc=zI is incompatible with {nth_coord=}; support is deprecated since %(since)s)Úmessager<   ©r-   )r   Úcheck_getitemr'   Úwarn_deprecatedrB   Ú_posÚsuperÚ__init__r   r.   Ú_path)r   rE   r'   Ú	__class__s      €r   rM   zAxisArtistHelper.Fixed.__init__   s   ø€ ð 'Ð2�	�	ÝÔ"Ø ¨°AÀÐBÐBÈðMñ Mô Mð ŒNð ˜Q’� 3Ð.?Ð#?Ð#?Ø  A’~�~¨#Ð5FÐ*FÐ*FÝÔ$Øð $J cð $Jð $Jð $JðKñ Kô Kð Kð ˆDŒIØ#$¨Q¸ÀAÐFÐFÀsÔKˆDŒIÝ‰GŒG×ÒÑÔÐå˜dŸkšk¨&¸¼	˜kÑBÔBÑCÔCˆDŒJˆJˆJr   c                 ó   — | j         S r   ©r'   r   s    r   Úget_nth_coordz$AxisArtistHelper.Fixed.get_nth_coord�   ó
   € Ø”>Ð!r   c                 ó   — | j         S r   )rN   r   s     r   Úget_linezAxisArtistHelper.Fixed.get_line•   s
   € Ø”:Ðr   c                 ó   — |j         S r   ©Ú	transAxesr   s     r   Úget_line_transformz)AxisArtistHelper.Fixed.get_line_transform˜   rS   r   c                 ó   — |j         S r   rW   r   s     r   Úget_axislabel_transformz.AxisArtistHelper.Fixed.get_axislabel_transform�   rS   r   c                 ó>   — t          dddd¬¦  «        | j                 S )ú˜
            Return the label reference position in transAxes.

            get_label_transform() returns a transform of (transAxes+offset)
            ))ç        ç      à?éZ   ))ç      ð?r_   r`   ))r_   r^   r   ))r_   ra   r   r=   )ÚdictrB   r   s     r   Úget_axislabel_pos_anglez.AxisArtistHelper.Fixed.get_axislabel_pos_angle    s2   € õ ˜_Ø-Ø-Ø*ð,ñ ,ô ,ð -1¬Iô7ð 7r   c                 óh   — |                      ¦   «         |                     ¦   «         g| j                 S r   )Úget_xaxis_transformÚget_yaxis_transformr'   r   s     r   Úget_tick_transformz)AxisArtistHelper.Fixed.get_tick_transform­   s6   € Ø×,Ò,Ñ.Ô.Ø×,Ò,Ñ.Ô.ð0Ø04´ô@ð @r   r   )r/   r0   r1   r2   r   r3   r4   Úpassthru_ptrM   rR   rU   rY   r[   rc   rg   Ú__classcell__©rO   s   @r   ÚFixedr9   x   så   ø€ € € € € ØEÐEà,�o�d”o eÑ,Ô,¨X¨XðFð Fñ.Gô .Gñ Hô Hˆð	Dð 	Dð 	Dð 	Dð 	Dð 	Dð"	"ð 	"ð 	"ð
	ð 	ð 	ð	"ð 	"ð 	"ð
	"ð 	"ð 	"ð		7ð 		7ð 		7ð	@ð 	@ð 	@ð 	@ð 	@ð 	@ð 	@r   rk   c                   ó*   ‡ — e Zd Zˆ fd„Zd„ Zd„ Zˆ xZS )úAxisArtistHelper.Floatingc                 ód   •— || _         || _        t          ¦   «                              ¦   «          d S r   )r'   Ú_valuerL   rM   )r   r'   r   rO   s      €r   rM   z"AxisArtistHelper.Floating.__init__³   s-   ø€ Ø&ˆDŒNØˆDŒKÝ‰GŒG×ÒÑÔÐÐÐr   c                 ó   — | j         S r   rQ   r   s    r   rR   z'AxisArtistHelper.Floating.get_nth_coord¸   rS   r   c                 ó    — t          d¦  «        ‚)Nz6get_line method should be defined by the derived class)ÚRuntimeErrorr   s     r   rU   z"AxisArtistHelper.Floating.get_line»   s   € ÝØHñJô Jð Jr   )r/   r0   r1   rM   rR   rU   ri   rj   s   @r   ÚFloatingrm   ±   s]   ø€ € € € € ð	ð 	ð 	ð 	ð 	ð
	"ð 	"ð 	"ð	Jð 	Jð 	Jð 	Jð 	Jð 	Jð 	Jr   rs   N)r/   r0   r1   r2   r7   rk   rs   r   r   r   r   r   5   s¯   € € € € € ðð ðB9ð 9ð 9ð 9ð 9ñ 9ô 9ð 9ðB7@ð 7@ð 7@ð 7@ð 7@�ñ 7@ô 7@ð 7@ðrJð Jð Jð Jð J�5ñ Jô Jð Jð Jð Jr   r   c                   óZ   — e Zd Z G d„ dej        ¦  «        Z G d„ dej        ¦  «        ZdS )ÚAxisArtistHelperRectlinearc                   ó&   ‡ — e Zd Zdˆ fd„	Zd„ Zˆ xZS )ú AxisArtistHelperRectlinear.FixedNc                 óˆ   •— t          ¦   «                              ||¦  «         |j        |j        g| j                 | _        dS )zŽ
            nth_coord = along which coordinate value varies
            in 2D, nth_coord = 0 ->  x axis, nth_coord = 1 -> y axis
            N)rL   rM   ÚxaxisÚyaxisr'   r&   )r   r   rE   r'   rO   s       €r   rM   z)AxisArtistHelperRectlinear.Fixed.__init__Ä   s:   ø€ õ
 ‰GŒG×Ò˜S )Ñ,Ô,Ð,Øœ T¤ZÐ0°´Ô@ˆDŒIˆIˆIr   c                 ó”  ‡ ‡	‡
‡— ‰ j         dv rd\  Š	Š
nd\  Š	Š
‰ j        j        }|                     ¦   «         }|j                             |¦  «        }‰ j        j        }|                     ¦   «         }|j                             |¦  «        }‰                      |¦  «        |j        z
  Šˆ	ˆ
ˆ ˆfd„} |||¦  «         |||¦  «        fS )ú tick_loc, tick_angle, tick_labelrF   ©r`   r   ©r   r`   c              3   ó   •K  — t          | |¦  «        D ]i\  }}‰                     |‰j        ¬¦  «        }‰	                     |¦  «        }t          j                             d|‰j                 ¦  «        r|‰‰|fV — Œjd S )NrH   r<   )Úzipr.   rK   Ú	transformÚmplÚ
transformsÚ_interval_contains_closer'   )
ÚlocsÚlabelsrE   ÚlabelÚcÚc2Úangle_normalÚangle_tangentr   Útick_to_axess
         €€€€r   Ú_fz?AxisArtistHelperRectlinear.Fixed.get_tick_iterators.<locals>._fß   s™   øè è € Ý"% d¨FÑ"3Ô"3ð Dð D‘J�C˜ØŸš C¨t¬y˜Ñ9Ô9�Aà%×/Ò/°Ñ2Ô2�BÝ”~×>Ò>Ø" B t¤~Ô$6ñ8ô 8ð Dà ¨}¸eÐCÐCÐCÐCøðDð Dr   )	rB   r&   ÚmajorÚlocatorÚ	formatterÚformat_ticksÚminorrg   rX   )r   r   rŽ   Ú
major_locsÚmajor_labelsr’   Ú
minor_locsÚminor_labelsr�   rŠ   r‹   rŒ   s   `        @@@r   Úget_tick_iteratorsz3AxisArtistHelperRectlinear.Fixed.get_tick_iteratorsÎ   sï   øøøø€ àŒyÐ-Ð-Ð-Ø.3Ñ+�˜m˜mà.3Ñ+�˜mà”I”OˆEØŸš™œˆJØ œ?×7Ò7¸
ÑCÔCˆLà”I”OˆEØŸš™œˆJØ œ?×7Ò7¸
ÑCÔCˆLà×2Ò2°4Ñ8Ô8¸4¼>ÑIˆLðDð Dð Dð Dð Dð Dð Dð Dð �2�j ,Ñ/Ô/°°°JÀÑ1MÔ1MÐMÐMr   r   )r/   r0   r1   rM   r—   ri   rj   s   @r   rk   rw   Â   sY   ø€ € € € € ð	Að 	Að 	Að 	Að 	Að 	Að	Nð 	Nð 	Nð 	Nð 	Nð 	Nð 	Nr   rk   c                   óF   ‡ — e Zd Z	 d	ˆ fd„	Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	ˆ xZ
S )
ú#AxisArtistHelperRectlinear.Floatingr@   c                 ó–   •— t          ¦   «                              ||¦  «         || _        |j        |j        g| j                 | _        d S r   )rL   rM   Ú_axis_directionry   rz   r'   r&   )r   r   r'   Úpassingthrough_pointÚaxis_directionrO   s        €r   rM   z,AxisArtistHelperRectlinear.Floating.__init__ë   sA   ø€ å‰GŒG×Ò˜YÐ(<Ñ=Ô=Ð=Ø#1ˆDÔ Øœ T¤ZÐ0°´Ô@ˆDŒIˆIˆIr   c                 óÊ   — d| j         z
  }|j        |j        z
  }|                     | j        | j        g¦  «        }t          |                      d||         ¬¦  «        ¦  «        S )Nr   r<   rH   )r'   Ú	transDatarX   r�   ro   r   r.   )r   r   Úfixed_coordÚdata_to_axesÚps        r   rU   z,AxisArtistHelperRectlinear.Floating.get_lineñ   sZ   € Ø˜dœnÑ,ˆKØœ>¨D¬NÑ:ˆLØ×&Ò&¨¬°T´[Ð'AÑBÔBˆAÝ˜Ÿš F°!°K´.˜ÑAÔAÑBÔBÐBr   c                 ó   — |j         S r   rW   r   s     r   rY   z6AxisArtistHelperRectlinear.Floating.get_line_transform÷   rS   r   c                 ó   — |j         S r   rW   r   s     r   r[   z;AxisArtistHelperRectlinear.Floating.get_axislabel_transformú   rS   r   c                 ó  — ddg| j                  }d| j         z
  }|j        |j        z
  }|                     | j        | j        g¦  «        }|                      d||         ¬¦  «        }d||         cxk    rdk    rn n||fS dS )r]   r   r`   r   r_   rH   )NN)r'   rŸ   rX   r�   ro   r.   )r   r   Úangler    r¡   r¢   Úvertss          r   rc   z;AxisArtistHelperRectlinear.Floating.get_axislabel_pos_angleý   s™   € ð ˜�G˜DœNÔ+ˆEØ˜dœnÑ,ˆKØœ>¨D¬NÑ:ˆLØ×&Ò&¨¬°T´[Ð'AÑBÔBˆAØ—K’K ¨1¨[¬>�KÑ:Ô:ˆEØ�E˜+Ô&Ð+Ð+Ò+Ð+¨!Ò+Ð+Ð+Ð+Ð+Ø˜e�|Ð#à!�zr   c                 ó   — |j         S r   )rŸ   r   s     r   rg   z6AxisArtistHelperRectlinear.Floating.get_tick_transform  rS   r   c                 ó|  ‡ ‡	‡
‡— ‰ j         dk    rd\  Š	Š
nd\  Š	Š
‰ j        j        }|                     ¦   «         }|j                             |¦  «        }‰ j        j        }|                     ¦   «         }|j                             |¦  «        }|j        |j        z
  Šˆ	ˆ
ˆˆ fd„} |||¦  «         |||¦  «        fS )r|   r   r}   r~   c              3   óð   •K  — t          | |¦  «        D ]a\  }}‰
                     |‰
j        ¬¦  «        }‰	                     |¦  «        \  }}d|cxk    rdk    rn ŒId|cxk    rdk    rn ŒY|‰‰|fV — Œbd S )NrH   r   r   )r€   r.   ro   r�   )r…   r†   rE   r‡   rˆ   Úc1r‰   rŠ   r‹   r¡   r   s          €€€€r   r�   zBAxisArtistHelperRectlinear.Floating.get_tick_iterators.<locals>._f!  s§   øè è € Ý"% d¨FÑ"3Ô"3ð Dð D‘J�C˜ØŸš C¨t¬{˜Ñ;Ô;�AØ)×3Ò3°AÑ6Ô6‘F�B˜Ø˜B�|�|’|�| !’|�|�|�|�|¨¨R¨¨ª¨°1ª¨¨¨¨Ø ¨}¸eÐCÐCÐCÐCøð	Dð Dr   )	r'   r&   rŽ   r�   r�   r‘   r’   rŸ   rX   )r   r   rŽ   r“   r”   r’   r•   r–   r�   rŠ   r‹   r¡   s   `        @@@r   r—   z6AxisArtistHelperRectlinear.Floating.get_tick_iterators  sâ   øøøø€ àŒ~ Ò"Ð"Ø.3Ñ+�˜m˜mà.3Ñ+�˜mà”I”OˆEØŸš™œˆJØ œ?×7Ò7¸
ÑCÔCˆLà”I”OˆEØŸš™œˆJØ œ?×7Ò7¸
ÑCÔCˆLàœ>¨D¬NÑ:ˆLðDð Dð Dð Dð Dð Dð Dð Dð �2�j ,Ñ/Ô/°°°JÀÑ1MÔ1MÐMÐMr   ©r@   )r/   r0   r1   rM   rU   rY   r[   rc   rg   r—   ri   rj   s   @r   rs   r™   ê   sª   ø€ € € € € à:Bð	Að 	Að 	Að 	Að 	Að 	Að	Cð 	Cð 	Cð	"ð 	"ð 	"ð	"ð 	"ð 	"ð	"ð 	"ð 	"ð 	"ð 	"ð 	"ð	Nð 	Nð 	Nð 	Nð 	Nð 	Nð 	Nr   rs   N)r/   r0   r1   r   rk   rs   r   r   r   ru   ru   À   sƒ   € € € € € ð&Nð &Nð &Nð &Nð &NÐ Ô&ñ &Nô &Nð &NðP>Nð >Nð >Nð >Nð >NÐ#Ô,ñ >Nô >Nð >Nð >Nð >Nr   ru   c                   ób   ‡ — e Zd Zˆ fd„Zd„ Zd„ Zd„ Z ej        d¦  «        d„ ¦   «         Z	ˆ xZ
S )ÚGridHelperBasec                 óV   •— d | _         t          ¦   «                              ¦   «          d S r   )Ú_old_limitsrL   rM   )r   rO   s    €r   rM   zGridHelperBase.__init__-  s'   ø€ ØˆÔÝ‰Œ×ÒÑÔÐÐÐr   c                 óÊ   — |                      ¦   «         \  }}|                     ¦   «         \  }}| j        ||||fk    r%|                      ||||¦  «         ||||f| _        d S d S r   )Úget_xlimÚget_ylimr°   Ú_update_grid)r   r   Úx1Úx2Úy1Úy2s         r   r   zGridHelperBase.update_lim1  st   € Ø—’‘”‰ˆˆBØ—’‘”‰ˆˆBØÔ  B¨¨BÐ/Ò/Ð/Ø×Ò˜b " b¨"Ñ-Ô-Ð-Ø " B¨¨BÐ/ˆDÔÐÐð 0Ð/r   c                 ó   — dS )z>Cache relevant computations when the axes limits have changed.Nr   )r   rµ   r·   r¶   r¸   s        r   r´   zGridHelperBase._update_grid8  s   € € € r   c                 ó   — g S )zÄ
        Return list of grid lines as a list of paths (list of points).

        Parameters
        ----------
        which : {"both", "major", "minor"}
        axis : {"both", "x", "y"}
        r   )r   Úwhichr&   s      r   Úget_gridlineszGridHelperBase.get_gridlines;  s	   € ð ˆ	r   r   c                 ó   — t          d|j        t          j        d         t          j        d         t          j        d         ¬¦  «        }|                     |¦  «         |                     | ¦  «         |j                             |¦  «         |S )ú‘
        Create and return a new GridlineCollection instance.

        *which* : "major" or "minor"
        *axis* : "both", "x" or "y"

        Nú
grid.colorúgrid.linestyleúgrid.linewidth©r�   ÚcolorsÚ
linestylesÚ
linewidths)r	   rŸ   r‚   ÚrcParamsÚ_set_artist_propsÚset_grid_helperr   )r   ÚaxÚ	gridliness      r   Únew_gridlineszGridHelperBase.new_gridlinesF  s†   € õ (Ø˜BœLµ´¸lÔ1KÝ”|Ð$4Ô5Ý”|Ð$4Ô5ð7ñ 7ô 7ˆ	ð 	×Ò˜YÑ'Ô'Ð'Ø×!Ò! $Ñ'Ô'Ð'à
Œ×!Ò! )Ñ,Ô,Ð,ð
 Ðr   )r/   r0   r1   rM   r   r´   r¼   r   r3   rË   ri   rj   s   @r   r®   r®   +  s�   ø€ € € € € ðð ð ð ð ð0ð 0ð 0ðMð Mð Mð	ð 	ð 	ð €T„_�UÑÔðð ñ Ôðð ð ð ð r   r®   c                   óB   ‡ — e Zd Zˆ fd„Z	 	 	 	 d	d„Z	 	 d
d„Zdd„Zˆ xZS )ÚGridHelperRectlinearc                 óV   •— t          ¦   «                              ¦   «          || _        d S r   )rL   rM   r   )r   r   rO   s     €r   rM   zGridHelperRectlinear.__init__`  s$   ø€ Ý‰Œ×ÒÑÔÐØˆŒ	ˆ	ˆ	r   Nc                 ó¦   — |€t          j        d¦  «         | j        }t                               |||¦  «        }|€|}t          ||||¬¦  «        }|S )Nz6'new_fixed_axis' explicitly requires the axes keyword.)Úoffsetr�   )r   Úwarn_externalr   ru   rk   r   )r   rE   r'   r�   rÐ   r   Ú_helperÚaxislines           r   Únew_fixed_axisz#GridHelperRectlinear.new_fixed_axisd  sq   € ð ˆ<ÝÔØHñJô Jð Jà”9ˆDå,×2Ò2°4¸¸iÑHÔHˆàÐ!Ø ˆNÝ˜d G°FØ-;ð ñ  ô  ˆð ˆr   r@   c                 ó  — |€t          j        d¦  «         | j        }t                               ||||¦  «        }t          |||¬¦  «        }|j                             d¦  «         |j                             |j        j	        ¦  «         |S )Nz9'new_floating_axis' explicitly requires the axes keyword.)r�   T)
r   rÑ   r   ru   rs   r   ÚlineÚset_clip_onÚset_clip_boxÚbbox)r   r'   r   r�   r   rÒ   rÓ   s          r   Únew_floating_axisz&GridHelperRectlinear.new_floating_axisz  s•   € ð
 ˆ<ÝÔØKñMô Mð Mà”9ˆDå,×5Ò5Ø�)˜U Nñ4ô 4ˆõ ˜d G¸NÐKÑKÔKˆàŒ×!Ò! $Ñ'Ô'Ð'ØŒ×"Ò" 8¤=Ô#5Ñ6Ô6Ð6Øˆr   rŽ   Úbothc                 óŽ  — t          j        g d¢|¬¦  «         t          j        g d¢|¬¦  «         g }|dv r²g }| j                             ¦   «         \  }}|dv r6|                     | j        j        j                             ¦   «         ¦  «         |dv r6|                     | j        j        j                             ¦   «         ¦  «         |D ]}| 	                    ||g||gg¦  «         Œ|dv rØ| j         
                    ¦   «         \  }}	g }| j        j        j        d	         r6|                     | j        j        j                             ¦   «         ¦  «         | j        j        j        d	         r6|                     | j        j        j                             ¦   «         ¦  «         |D ]}
| 	                    ||	g|
|
gg¦  «         Œ|S )
z¾
        Return list of gridline coordinates in data coordinates.

        Parameters
        ----------
        which : {"both", "major", "minor"}
        axis : {"both", "x", "y"}
        )rÛ   rŽ   r’   )r»   )rÛ   ÚxÚyr%   )rÛ   rÝ   )rÛ   rŽ   )rÛ   r’   )rÛ   rÞ   ÚgridOn)r   Úcheck_in_listr   r³   Úextendry   rŽ   r�   r’   Úappendr²   rz   Ú_major_tick_kwÚ_minor_tick_kw)r   r»   r&   rÊ   r…   r·   r¸   rÝ   rµ   r¶   rÞ   s              r   r¼   z"GridHelperRectlinear.get_gridlines�  sÑ  € õ 	ÔÐ5Ð5Ð5¸UÐCÑCÔCÐCÝÔÐ-Ð-Ð-°DÐ9Ñ9Ô9Ð9Øˆ	à�=Ð Ð ØˆDØ”Y×'Ò'Ñ)Ô)‰FˆB�ØÐ)Ð)Ð)Ø—’˜DœIœOÔ1×9Ò9Ñ;Ô;Ñ<Ô<Ð<ØÐ)Ð)Ð)Ø—’˜DœIœOÔ1×9Ò9Ñ;Ô;Ñ<Ô<Ð<àð 5ð 5�Ø× Ò  1 a &¨2¨r¨(Ð!3Ñ4Ô4Ð4Ð4à�=Ð Ð Ø”Y×'Ò'Ñ)Ô)‰FˆB�ØˆDØŒyŒÔ-¨hÔ7ð =Ø—’˜DœIœOÔ1×9Ò9Ñ;Ô;Ñ<Ô<Ð<ØŒyŒÔ-¨hÔ7ð =Ø—’˜DœIœOÔ1×9Ò9Ñ;Ô;Ñ<Ô<Ð<àð 5ð 5�Ø× Ò  2 r (¨Q°¨FÐ!3Ñ4Ô4Ð4Ð4àÐr   )NNNN)r@   N)rŽ   rÛ   )r/   r0   r1   rM   rÔ   rÚ   r¼   ri   rj   s   @r   rÍ   rÍ   ^  sŠ   ø€ € € € € ðð ð ð ð ð
 "&Ø&*Ø"Ø ð	ð ð ð ð. *2Ø#ðð ð ð ð&#ð #ð #ð #ð #ð #ð #ð #r   rÍ   c                   ó²   ‡ — e Zd Zd„ Zddœˆ fd„
Zdd„Zed„ ¦   «         Z ej	        d¦  «        dd„¦   «         Z
ˆ fd	„Zd
„ Zdˆ fd„	Zˆ fd„Zdd„Zdd„Zˆ xZS )ÚAxesc                 ó@   — t          j        j        | j        g|¢R i |¤ŽS r   )Úmaxesræ   r&   r   )r   ÚargsÚkwargss      r   Ú__call__zAxes.__call__µ  s&   € ÝŒzŒ˜tœyÐ:¨4Ð:Ð:Ð:°6Ð:Ð:Ð:r   N)Úgrid_helperc                ó¢   •— d| _         |r|nt          | ¦  «        | _         t          ¦   «         j        |i |¤Ž |                      d¦  «         d S )NT)Ú_axisline_onrÍ   Ú_grid_helperrL   rM   Útoggle_axisline)r   rì   ré   rê   rO   s       €r   rM   zAxes.__init__¸  s`   ø€ Ø ˆÔØ,7ð =˜[˜[Ý"6°tÑ"<Ô"<ð 	Ôà�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ø×Ò˜TÑ"Ô"Ð"Ð"Ð"r   c                 ó–  — |€| j          }|r_d| _         | j        d d …                              d¦  «         | j                             d¦  «         | j                             d¦  «         d S d| _         | j        d d …                              d¦  «         | j                             d¦  «         | j                             d¦  «         d S )NTF)rî   ÚspinesÚset_visiblery   rz   )r   Úbs     r   rð   zAxes.toggle_axisline¿  sÊ   € Øˆ9ØÔ%Ð%ˆAØð 		)Ø $ˆDÔØŒK˜˜˜ŒN×&Ò& uÑ-Ô-Ð-ØŒJ×"Ò" 5Ñ)Ô)Ð)ØŒJ×"Ò" 5Ñ)Ô)Ð)Ð)Ð)à %ˆDÔØŒK˜˜˜ŒN×&Ò& tÑ,Ô,Ð,ØŒJ×"Ò" 4Ñ(Ô(Ð(ØŒJ×"Ò" 4Ñ(Ô(Ð(Ð(Ð(r   c                 ó   — | j         S r   )Ú
_axislinesr   s    r   r&   z	Axes.axisÍ  s
   € àŒÐr   r   c                 ó\   — |€|                       ¦   «         }|                     | ¦  «        }|S )r¾   )Úget_grid_helperrË   )r   rì   rÊ   s      r   rË   zAxes.new_gridlinesÑ  s4   € ð ÐØ×.Ò.Ñ0Ô0ˆKà×-Ò-¨dÑ3Ô3ˆ	ØÐr   c                 ó@  •‡ ‡— t          d ‰ j        t          j        d         t          j        d         t          j        d         ¬¦  «        x‰ _        }‰                      |¦  «         |                     ‰                      ¦   «         ¦  «         t          ¦   «          	                    ¦   «          | 
                    ‰ j        j        ¦  «         t          j                             ‰ ¦  «        ‰ _        ‰                      ¦   «         j        Š‰ j                             ˆˆ fd„dD ¦   «         ¦  «         ‰ j        d         ‰ j        d         fD ]P}|j                             d	¦  «         |j                             d	¦  «         |j                             d	¦  «         ŒQd S )
Nr¿   rÀ   rÁ   rÂ   c                 ó.   •— i | ]}| ‰|‰|¬ ¦  «        “ŒS ))rE   r   r�   r   )Ú.0rE   rÔ   r   s     €€r   ú
<dictcomp>zAxes.clear.<locals>.<dictcomp>ô  s<   ø€ ð  ;ð  ;ð  ;àð �� C¨dÀ3ÐGÑGÔGð ;ð  ;ð  ;r   rD   rA   r?   F)r	   rŸ   r‚   rÆ   rÊ   rÇ   rÈ   rø   rL   ÚclearÚset_clip_pathr   Úpatchr   ræ   ÚAxisDictrö   rÔ   Úupdater‡   ró   Úmajor_ticklabelsÚminor_ticklabels)r   rÊ   rÓ   rÔ   rO   s   `  @€r   rý   z
Axes.clearà  s“  øøø€ õ &9Ø˜DœNÝ”< Ô-Ý”|Ð$4Ô5Ý”|Ð$4Ô5ð	&7ñ &7ô &7ð 	7ˆŒ˜ð
 	×Ò˜yÑ)Ô)Ð)Ø×!Ò! $×"6Ò"6Ñ"8Ô"8Ñ9Ô9Ð9å‰Œ�Š‰Œˆð 	×Ò ¤	¤Ñ0Ô0Ð0õ #œ-×0Ò0°Ñ6Ô6ˆŒØ×-Ò-Ñ/Ô/Ô>ˆØŒ×Òð  ;ð  ;ð  ;ð  ;ð  ;à9ð ;ñ  ;ô  ;ñ 	<ô 	<ð 	<ð œ¨Ô/°´ÀÔ1IÐJð 	9ð 	9ˆHØŒN×&Ò& uÑ-Ô-Ð-ØÔ%×1Ò1°%Ñ8Ô8Ð8ØÔ%×1Ò1°%Ñ8Ô8Ð8Ð8ð	9ð 	9r   c                 ó   — | j         S r   )rï   r   s    r   rø   zAxes.get_grid_helperü  s   € ØÔ Ð r   rŽ   rÛ   c                 ón  •—  t          ¦   «         j        |f||dœ|¤Ž | j        sdS |€\| j        j        j        d         pD| j        j        j        d         p-| j        j        j        d         p| j        j        j        d         }| j         	                    |||¬¦  «          | j        j	        di |¤Ž dS )zW
        Toggle the gridlines, and optionally set the properties of the lines.
        )r»   r&   Nrß   )r»   r&   Úvisibler   )
rL   Úgridrî   r   ry   rä   rã   rz   rÊ   Úset)r   r  r»   r&   rê   rO   s        €r   r  z	Axes.gridÿ  sÔ   ø€ ð 	�‰ŒŒ�WÐ? E°Ð?Ð?¸Ð?Ð?Ð?ØÔ ð 	ØˆFØˆ?Ø”y”Ô5°hÔ?ð CØœ)œ/Ô8¸ÔBðCàœ)œ/Ô8¸ÔBðCð œ)œ/Ô8¸ÔBð ð 	Œ×Ò ¨T¸7ÐÑCÔCÐCØˆŒÔÐ$Ð$˜VÐ$Ð$Ð$Ð$Ð$r   c                 óÆ   •— | j         r#g | j                             ¦   «         ¢| j        ‘}ng }|                     t          ¦   «                              ¦   «         ¦  «         |S r   )rî   rö   r,   rÊ   rá   rL   Úget_children)r   ÚchildrenrO   s     €r   r
  zAxes.get_children  s[   ø€ ØÔð 	ØB˜œ×/Ò/Ñ1Ô1ÐB°4´>ÐBˆHˆHàˆHØ�Š�™œ×,Ò,Ñ.Ô.Ñ/Ô/Ð/Øˆr   c                 ób   — |                       ¦   «         }|                     |d d || ¬¦  «        }|S )N)r'   r�   rÐ   r   )rø   rÔ   )r   rE   rÐ   Úghr&   s        r   rÔ   zAxes.new_fixed_axis  sB   € Ø×!Ò!Ñ#Ô#ˆØ× Ò  Ø+/Ø04Ø(.Ø&*ð	 !ñ #ô #ˆð ˆr   r@   c                 ó`   — |                       ¦   «         }|                     |||| ¬¦  «        }|S )N)r�   r   )rø   rÚ   )r   r'   r   r�   r  r&   s         r   rÚ   zAxes.new_floating_axis#  s>   € Ø×!Ò!Ñ#Ô#ˆØ×#Ò# I¨uØ3AØ)-ð $ñ /ô /ˆð ˆr   r   )NrŽ   rÛ   r¬   )r/   r0   r1   rë   rM   rð   r4   r&   r   r3   rË   rý   rø   r  r
  rÔ   rÚ   ri   rj   s   @r   ræ   ræ   ³  s9  ø€ € € € € ð;ð ;ð ;ð +/ð #ð #ð #ð #ð #ð #ð #ð)ð )ð )ð )ð ðð ñ „Xðð €T„_�UÑÔðð ð ñ Ôðð9ð 9ð 9ð 9ð 9ð8!ð !ð !ð%ð %ð %ð %ð %ð %ð$ð ð ð ð ðð ð ð ðð ð ð ð ð ð ð r   ræ   c                   ó   ‡ — e Zd Zˆ fd„Zˆ xZS )ÚAxesZeroc           	      ó„  •— t          ¦   «                              ¦   «          |                      ¦   «         j        }| j                              |ddd| ¬¦  «         |ddd| ¬¦  «        ¬¦  «         dD ]L}| j        |         j                             | j        ¦  «         | j        |          	                    d¦  «         ŒMd S )	Nr   r^   r@   )r'   r   r�   r   r   r>   )ÚxzeroÚyzeroF)
rL   rý   rø   rÚ   rö   r  rÖ   rþ   rÿ   ró   )r   rÚ   ÚkrO   s      €r   rý   zAxesZero.clear-  sã   ø€ Ý‰Œ�Š‰ŒˆØ ×0Ò0Ñ2Ô2ÔDÐØŒ×ÒØ#Ð#Ø 2°hÀTðKñ Kô Kà#Ð#Ø 2°fÀ4ðIñ Iô Ið 	ñ 	
ô 	
ð 	
ð $ð 	2ð 	2ˆAØŒO˜AÔÔ#×1Ò1°$´*Ñ=Ô=Ð=ØŒO˜AÔ×*Ò*¨5Ñ1Ô1Ð1Ð1ð	2ð 	2r   )r/   r0   r1   rý   ri   rj   s   @r   r  r  +  s8   ø€ € € € € ð2ð 2ð 2ð 2ð 2ð 2ð 2ð 2ð 2r   r  )r2   Únumpyr(   Ú
matplotlibr‚   r   Úmatplotlib.axesr   rè   Úmatplotlib.pathr   Úmpl_toolkits.axes_grid1r   Úaxisline_styler   Úaxis_artistr   r	   r   ru   r®   rÍ   ræ   r  ÚSubplotÚSubplotZeror   r   r   ú<module>r     sÙ  ðð'ð 'ðR Ð Ð Ð à Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø )Ð )Ð )Ð )Ð )Ð )Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8ðHJð HJð HJð HJð HJñ HJô HJð HJðVhNð hNð hNð hNð hNñ hNô hNð hNðV0ð 0ð 0ð 0ð 0ñ 0ô 0ð 0ðfRð Rð Rð Rð R˜>ñ Rô Rð Rðjuð uð uð uð uˆ5Œ:ñ uô uð uðp2ð 2ð 2ð 2ð 2ˆtñ 2ô 2ð 2ð  €Ø€€€r   