§
    ‡Ûg‘V  ã                   óÚ   — d dl mZ d dlZd dlZd dlmZmZ d dlm	Z	 ddl
mZmZmZ ddlmZ d„ Z G d	„ d
¦  «        Z ej        ed¦  «        Z G d„ d¦  «        Z G d„ de¦  «        ZeZdS )é    )ÚNumberN)Ú_apiÚcbook)ÚSubplotSpecé   )ÚSizeÚSubplotDividerÚDivider)ÚAxesc                 óš   — | }| }| j         d                              ||¬¦  «         | j         d                              ||¬¦  «         d S )NÚbottom©Ú
ticklabelsÚlabelÚleft)ÚaxisÚtoggle)ÚaxÚ	bottom_onÚleft_onÚ
bottom_offÚleft_offs        úW/granary/edev/quantum/lib/python3.11/site-packages/mpl_toolkits/axes_grid1/axes_grid.pyÚ
_tick_onlyr      sU   € Ø�€JØˆ{€HØ„GˆHÔ×Ò¨
¸*ÐÑEÔEÐEØ„GˆF„O×Ò h°hÐÑ?Ô?Ð?Ð?Ð?ó    c                   ó:   ‡ — e Zd Zˆ fd„Zddœd„Zd„ Zˆ fd„Zˆ xZS )ÚCbarAxesBasec                óH   •— || _          t          ¦   «         j        |i |¤Ž d S ©N)ÚorientationÚsuperÚ__init__)Úselfr    ÚargsÚkwargsÚ	__class__s       €r   r"   zCbarAxesBase.__init__   s-   ø€ Ø&ˆÔØ�‰ŒÔ˜$Ð) &Ð)Ð)Ð)Ð)Ð)r   N)Úticksc                óN   — | j         dv rdnd} | j        j        |f| ||dœ|¤Ž}|S )N©Útopr   Ú
horizontalÚvertical)Úcaxr    r'   )r    ÚfigureÚcolorbar)r#   Úmappabler'   r%   r    Úcbs         r   r/   zCbarAxesBase.colorbar   sU   € à Ô,Ð0AÐAÐAˆLˆLØð 	ð "ˆTŒ[Ô! (ð 9°À+Ø(-ð9ð 9Ø17ð9ð 9ˆàˆ	r   c                 óX   — | j         | j                 }|                     ||¬¦  «         d S )Nr   )r   r    r   )r#   Úbr   s      r   Útoggle_labelzCbarAxesBase.toggle_label!   s-   € ØŒy˜Ô)Ô*ˆØ�Š˜q¨ˆÑ*Ô*Ð*Ð*Ð*r   c                 ód   •— | j         }t          ¦   «                              ¦   «          || _         d S r   )r    r!   Úcla)r#   r    r&   s     €r   r6   zCbarAxesBase.cla%   s*   ø€ ØÔ&ˆÝ‰Œ�Š‰ŒˆØ&ˆÔÐÐr   )Ú__name__Ú
__module__Ú__qualname__r"   r/   r4   r6   Ú__classcell__©r&   s   @r   r   r      s~   ø€ € € € € ð*ð *ð *ð *ð *ð +/ð ð ð ð ð ð+ð +ð +ð'ð 'ð 'ð 'ð 'ð 'ð 'ð 'ð 'r   r   zCbar{}c                   ó‚   — e Zd ZdZeZ	 	 	 ddddddddœ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S )ÚGridaq  
    A grid of Axes.

    In Matplotlib, the Axes location (and size) is specified in normalized
    figure coordinates. This may not be ideal for images that needs to be
    displayed with a given aspect ratio; for example, it is difficult to
    display multiple images of a same size with some fixed padding between
    them.  AxesGrid can be used in such case.
    NÚrowç{®Gáz”?FTÚL)Ú	share_allÚshare_xÚshare_yÚ
label_modeÚ
axes_classÚaspectc                ó  — |\  | _         | _        |€| j         | j        z  }n+d|cxk     r| j         | j        z  k    sn t          d¦  «        ‚|| _        t	          t
          j        t          j        |d¦  «        ¦  «        \  | _	        | _
        t          j        ddg|¬¦  «         || _        |€| j        }n3t          |t           t"          f¦  «        r|\  }}t%          j        |fi |¤Ž}t)          g g |¬¦  «        }t          |t*          t,          f¦  «        rt/          ||fi |¤Ž| _        n_t3          |¦  «        d	k    rt/          |g|¢R i |¤Ž| _        n6t3          |¦  «        d
k    rt5          ||fi |¤Ž| _        nt7          d¦  «        ‚| j                             ¦   «         }t          j        | j         | j        fdt<          ¬¦  «        }t?          | j        ¦  «        D ]W}|                       |¦  «        \  }}|r|d         x}}n|r
|d|f         nd}|	r
||df         nd} |||||¬¦  «        |||f<   ŒX| !                    | j        dk    rdnd¬¦  «         "                    ¦   «         | _#        |j$         "                    ¦   «         | _%        | "                    ¦   «         | _&        | j%        d         d         | _'        |  (                    ¦   «          | j#        D ]}| )                    |¦  «         Œ|  *                    |
¦  «         dS )aÂ  
        Parameters
        ----------
        fig : `.Figure`
            The parent figure.
        rect : (float, float, float, float), (int, int, int), int, or     `~.SubplotSpec`
            The axes position, as a ``(left, bottom, width, height)`` tuple,
            as a three-digit subplot position code (e.g., ``(1, 2, 1)`` or
            ``121``), or as a `~.SubplotSpec`.
        nrows_ncols : (int, int)
            Number of rows and columns in the grid.
        ngrids : int or None, default: None
            If not None, only the first *ngrids* axes in the grid are created.
        direction : {"row", "column"}, default: "row"
            Whether axes are created in row-major ("row by row") or
            column-major order ("column by column").  This also affects the
            order in which axes are accessed using indexing (``grid[index]``).
        axes_pad : float or (float, float), default: 0.02
            Padding or (horizontal padding, vertical padding) between axes, in
            inches.
        share_all : bool, default: False
            Whether all axes share their x- and y-axis.  Overrides *share_x*
            and *share_y*.
        share_x : bool, default: True
            Whether all axes of a column share their x-axis.
        share_y : bool, default: True
            Whether all axes of a row share their y-axis.
        label_mode : {"L", "1", "all", "keep"}, default: "L"
            Determines which axes will get tick labels:

            - "L": All axes on the left column get vertical tick labels;
              all axes on the bottom row get horizontal tick labels.
            - "1": Only the bottom left axes is labelled.
            - "all": All axes are labelled.
            - "keep": Do not do anything.

        axes_class : subclass of `matplotlib.axes.Axes`, default: None
        aspect : bool, default: False
            Whether the axes aspect ratio follows the aspect ratio of the data
            limits.
        Nr   z7ngrids must be positive and not larger than nrows*ncolsé   Úcolumnr>   )Ú	direction)r+   r,   rF   é   é   zIncorrect rect format)Údtype)r   r   )ÚsharexÚshareyÚCÚF)Úorderéÿÿÿÿ)+Ú_nrowsÚ_ncolsÚ
ValueErrorÚngridsÚmapr   ÚFixedÚnpÚbroadcast_toÚ_horiz_pad_sizeÚ_vert_pad_sizer   Úcheck_in_listÚ
_directionÚ_defaultAxesClassÚ
isinstanceÚlistÚtupleÚ	functoolsÚpartialÚdictr   r   r	   Ú_dividerÚlenr
   Ú	TypeErrorÚget_positionÚfullÚobjectÚrangeÚ_get_col_rowÚravelÚtolistÚaxes_allÚTÚaxes_columnÚaxes_rowÚaxes_llcÚ_init_locatorsÚadd_axesÚset_label_mode)r#   ÚfigÚrectÚnrows_ncolsrW   rJ   Úaxes_padrA   rB   rC   rD   rE   rF   Úclsr%   ÚkwÚ
axes_arrayÚiÚcolr>   rN   rO   r   s                          r   r"   zGrid.__init__;   sY  € ðp $/Ñ ˆŒ�T”[àˆ>Ø”[ 4¤;Ñ.ˆFˆFà�vÐ:Ð:Ò:Ð: ¤¨t¬{Ñ!:Ò:Ð:Ð:Ð:Ý ØMñOô Oð Oð ˆŒå47ÝŒJ�œ¨°!Ñ4Ô4ñ56ô 56Ñ1ˆÔ˜dÔ1õ 	Ô˜H eÐ,¸	ÐBÑBÔBÐBØ#ˆŒàÐØÔ/ˆJˆJÝ˜
¥T­5 MÑ2Ô2ð 	:Ø$‰KˆC�Ý"Ô*¨3Ð9Ð9°&Ð9Ð9ˆJå˜R¨"°VÐ<Ñ<Ô<ˆÝ�d�V¥[Ð1Ñ2Ô2ð 	5Ý*¨3°Ð;Ð;¸Ð;Ð;ˆDŒMˆMÝ�‰YŒY˜!Š^ˆ^Ý*¨3Ð<°Ð<Ð<Ð<¸Ð<Ð<ˆDŒMˆMÝ�‰YŒY˜!Š^ˆ^Ý# C¨Ð4Ð4°Ð4Ð4ˆDŒMˆMåÐ3Ñ4Ô4Ð4àŒ}×)Ò)Ñ+Ô+ˆå”W˜dœk¨4¬;Ð7¸ÅVÐLÑLÔLˆ
Ý�t”{Ñ#Ô#ð 	9ð 	9ˆAØ×(Ò(¨Ñ+Ô+‰HˆC�Øð AØ",¨TÔ"2Ð2�˜˜à/6Ð@˜ A s FÔ+Ð+¸D�Ø/6Ð@˜ C¨ FÔ+Ð+¸D�Ø#- :Ø�T &°ð$9ñ $9ô $9ˆJ�s˜C�xÑ Ð à"×(Ò(Øœ¨EÒ1Ð1�#�#°sð )ñ <ô <ß<BºF¹H¼Hð 	Œà%œ<×.Ò.Ñ0Ô0ˆÔØ"×)Ò)Ñ+Ô+ˆŒØÔ(¨Ô+¨BÔ/ˆŒà×ÒÑÔÐà”-ð 	ð 	ˆBØ�LŠL˜ÑÔÐÐà×Ò˜JÑ'Ô'Ð'Ð'Ð'r   c                 óz  — g }g }t          | j        ¦  «        D ]i}|r|                     | j        ¦  «         |                     t	          |¦  «        ¦  «         t          j        d¦  «        }|                     |¦  «         Œjg }g }t          | j        ¦  «        D ]i}|r|                     | j        ¦  «         |                     t	          |¦  «        ¦  «         t          j        d¦  «        }|                     |¦  «         Œjt          | j	        ¦  «        D ]m}|  
                    |¦  «        \  }}	| j                             ||         || j        dz
  |	z
           ¬¦  «        }
| j        |                              |
¦  «         Œn| j                             |¦  «         | j                             |¦  «         d S )Nr   ©ÚnxÚny)rm   rU   Úappendr\   rh   r   ÚScaledrT   r]   rW   rn   rg   Únew_locatorrq   Úset_axes_locatorÚset_horizontalÚset_vertical)r#   ÚhÚh_ax_posÚ_ÚszÚvÚv_ax_posr€   r�   r>   Úlocators              r   rv   zGrid._init_locators­   s¥  € àˆØˆÝ�t”{Ñ#Ô#ð 	ð 	ˆAØð /Ø—’˜Ô-Ñ.Ô.Ð.Ø�OŠO�C ™FœFÑ#Ô#Ð#Ý”˜Q‘”ˆBØ�HŠH�R‰LŒLˆLˆLàˆØˆÝ�t”{Ñ#Ô#ð 	ð 	ˆAØð .Ø—’˜Ô,Ñ-Ô-Ð-Ø�OŠO�C ™FœFÑ#Ô#Ð#Ý”˜Q‘”ˆBØ�HŠH�R‰LŒLˆLˆLå�t”{Ñ#Ô#ð 	7ð 	7ˆAØ×(Ò(¨Ñ+Ô+‰HˆC�Ø”m×/Ò/Ø˜C”= X¨d¬k¸A©oÀÑ.CÔ%Dð 0ñ Fô FˆGàŒM˜!Ô×-Ò-¨gÑ6Ô6Ð6Ð6àŒ×$Ò$ QÑ'Ô'Ð'ØŒ×"Ò" 1Ñ%Ô%Ð%Ð%Ð%r   c                 ó‚   — | j         dk    rt          || j        ¦  «        \  }}nt          || j        ¦  «        \  }}||fS )NrI   )r_   ÚdivmodrT   rU   )r#   Únr�   r>   s       r   rn   zGrid._get_col_rowÊ   sD   € ØŒ?˜hÒ&Ð&Ý˜a ¤Ñ-Ô-‰HˆC��å˜a ¤Ñ-Ô-‰HˆC�à�Cˆxˆr   c                 ó*   — t          | j        ¦  «        S r   )rh   rq   ©r#   s    r   Ú__len__zGrid.__len__Ó   s   € Ý�4”=Ñ!Ô!Ð!r   c                 ó   — | j         |         S r   )rq   )r#   r€   s     r   Ú__getitem__zGrid.__getitem__Ö   s   € ØŒ}˜QÔÐr   c                 ó   — | j         | j        fS )zV
        Return the number of rows and columns of the grid as (nrows, ncols).
        )rT   rU   r—   s    r   Úget_geometryzGrid.get_geometryÙ   s   € ð Œ{˜DœKÐ'Ð'r   c                 óN   — |d         | j         _        |d         | j        _        dS )z¾
        Set the padding between the axes.

        Parameters
        ----------
        axes_pad : (float, float)
            The padding (horizontal pad, vertical pad) in inches.
        r   r   N©r\   Ú
fixed_sizer]   )r#   r|   s     r   Úset_axes_padzGrid.set_axes_padß   s(   € ð +3°1¬+ˆÔÔ'Ø)1°!¬ˆÔÔ&Ð&Ð&r   c                 ó2   — | j         j        | j        j        fS )zœ
        Return the axes padding.

        Returns
        -------
        hpad, vpad
            Padding (horizontal pad, vertical pad) in inches.
        rž   r—   s    r   Úget_axes_padzGrid.get_axes_padë   s    € ð Ô$Ô/ØÔ#Ô.ð0ð 	0r   c                 ó:   — | j                              |¦  «         dS )z%Set the aspect of the SubplotDivider.N)rg   Ú
set_aspect)r#   rF   s     r   r¤   zGrid.set_aspect÷   s   € àŒ× Ò  Ñ(Ô(Ð(Ð(Ð(r   c                 ó4   — | j                              ¦   «         S )z(Return the aspect of the SubplotDivider.)rg   Ú
get_aspectr—   s    r   r¦   zGrid.get_aspectû   s   € àŒ}×'Ò'Ñ)Ô)Ð)r   c                 óH  — |dk    r| j         D ]}t          |dd¦  «         ŒdS |dk    rœ| j        d         dd…         D ]}t          |dd¬¦  «         Œ| j        d         d         }t          |dd¬¦  «         | j        d	d…         D ];}|dd…         D ]}t          |dd¬¦  «         Œ|d         }t          |dd¬¦  «         Œ<dS |d
k    r7| j         D ]}t          |dd¬¦  «         Œ| j        }t          |dd¬¦  «         dS |dk    rt	          j        ddd¬¦  «         dS dS )aÀ  
        Define which axes have tick labels.

        Parameters
        ----------
        mode : {"L", "1", "all", "keep"}
            The label mode:

            - "L": All axes on the left column get vertical tick labels;
              all axes on the bottom row get horizontal tick labels.
            - "1": Only the bottom left axes is labelled.
            - "all": All axes are labelled.
            - "keep": Do not do anything.
        ÚallFr@   r   NrS   T)r   r   r   Ú1Úkeepz3.7zGrid label_modez©Passing an undefined label_mode is deprecated since %(since)s and will become an error %(removal)s. To silence this warning, pass "keep", which gives the same behaviour.)ÚnameÚmessage)rq   r   rs   ru   r   Úwarn_deprecated)r#   Úmoder   r�   s       r   rx   zGrid.set_label_modeÿ   s¼  € ð �5Š=ˆ=Ø”mð -ð -�Ý˜2˜u eÑ,Ô,Ð,Ð,ð-ð -à�SŠ[ˆ[àÔ& qÔ)¨#¨2¨#Ô.ð >ð >�Ý˜2¨°uÐ=Ñ=Ô=Ð=Ð=àÔ! !Ô$ RÔ(ˆBÝ�r U°EÐ:Ñ:Ô:Ð:àÔ'¨¨¨Ô+ð >ð >�à˜c˜r˜cœ(ð Að A�BÝ˜r¨T¸4Ð@Ñ@Ô@Ð@Ð@ð ˜”W�Ý˜2¨¸Ð=Ñ=Ô=Ð=Ð=ð>ð >ð �SŠ[ˆ[Ø”mð =ð =�Ý˜2¨°tÐ<Ñ<Ô<Ð<Ð<à”ˆBÝ�r U°EÐ:Ñ:Ô:Ð:Ð:Ð:ð �vŠ~ˆ~ÝÔ$ØÐ 1ðFðGñ Gô Gð Gð Gð Gð ˆ~r   c                 ó   — | j         S r   )rg   r—   s    r   Úget_dividerzGrid.get_divider3  s
   € ØŒ}Ðr   c                 ó:   — | j                              |¦  «         d S r   )rg   Úset_locator)r#   r’   s     r   r‰   zGrid.set_axes_locator6  s   € ØŒ×!Ò! 'Ñ*Ô*Ð*Ð*Ð*r   c                 ó4   — | j                              ¦   «         S r   )rg   Úget_locatorr—   s    r   Úget_axes_locatorzGrid.get_axes_locator9  s   € ØŒ}×(Ò(Ñ*Ô*Ð*r   ©Nr>   r?   )r7   r8   r9   Ú__doc__r   r`   r"   rv   rn   r˜   rš   rœ   r    r¢   r¤   r¦   rx   r°   r‰   rµ   © r   r   r=   r=   .   s1  € € € € € ðð ð Ðð
 Ø Øðp(ð !ØØØØ Øðp(ð p(ð p(ð p(ð p(ðd&ð &ð &ð:ð ð ð"ð "ð "ð ð  ð  ð(ð (ð (ð
5ð 
5ð 
5ð
0ð 
0ð 
0ð)ð )ð )ð*ð *ð *ð2Gð 2Gð 2Gðhð ð ð+ð +ð +ð+ð +ð +ð +ð +r   r=   c                   óB   ‡ — e Zd Z	 	 	 ddddddddddd	œ	ˆ fd
„Zd„ Zˆ xZS )Ú	ImageGridNr>   r?   FTr@   Úrightz5%)	rA   rF   rD   Ú	cbar_modeÚcbar_locationÚcbar_padÚ	cbar_sizeÚcbar_set_caxrE   c       	         óº  •— t          j        g d¢|
¬¦  «         t          j        g d¢|¬¦  «         |
| _        || _        || _        || _        t          ¦   «                              |||||||dd||	|¬¦  «         | j        D ]}| 	                    |¦  «         Œ|r½| j        dk    r| j
        D ]}| j        d         |_        ŒdS | j        d	k    rbt          | j
        ¦  «        D ]K\  }}|                      |¦  «        \  }}| j        d
v r| j        |         |_        Œ9| j        |         |_        ŒLdS t          | j
        | j        ¦  «        D ]\  }}||_        ŒdS dS )a`	  
        Parameters
        ----------
        fig : `.Figure`
            The parent figure.
        rect : (float, float, float, float) or int
            The axes position, as a ``(left, bottom, width, height)`` tuple or
            as a three-digit subplot position code (e.g., "121").
        nrows_ncols : (int, int)
            Number of rows and columns in the grid.
        ngrids : int or None, default: None
            If not None, only the first *ngrids* axes in the grid are created.
        direction : {"row", "column"}, default: "row"
            Whether axes are created in row-major ("row by row") or
            column-major order ("column by column").  This also affects the
            order in which axes are accessed using indexing (``grid[index]``).
        axes_pad : float or (float, float), default: 0.02in
            Padding or (horizontal padding, vertical padding) between axes, in
            inches.
        share_all : bool, default: False
            Whether all axes share their x- and y-axis.
        aspect : bool, default: True
            Whether the axes aspect ratio follows the aspect ratio of the data
            limits.
        label_mode : {"L", "1", "all"}, default: "L"
            Determines which axes will get tick labels:

            - "L": All axes on the left column get vertical tick labels;
              all axes on the bottom row get horizontal tick labels.
            - "1": Only the bottom left axes is labelled.
            - "all": all axes are labelled.

        cbar_mode : {"each", "single", "edge", None}, default: None
            Whether to create a colorbar for "each" axes, a "single" colorbar
            for the entire grid, colorbars only for axes on the "edge"
            determined by *cbar_location*, or no colorbars.  The colorbars are
            stored in the :attr:`cbar_axes` attribute.
        cbar_location : {"left", "right", "bottom", "top"}, default: "right"
        cbar_pad : float, default: None
            Padding between the image axes and the colorbar axes.
        cbar_size : size specification (see `.Size.from_any`), default: "5%"
            Colorbar size.
        cbar_set_cax : bool, default: True
            If True, each axes in the grid has a *cax* attribute that is bound
            to associated *cbar_axes*.
        axes_class : subclass of `matplotlib.axes.Axes`, default: None
        )ÚeachÚsingleÚedgeN)r¼   )r   r»   r   r*   )r½   T)rJ   r|   rA   rB   rC   rF   rD   rE   rÃ   r   rÄ   ©r   r»   N)r   r^   Ú_colorbar_modeÚ_colorbar_locationÚ_colorbar_padÚ_colorbar_sizer!   r"   Ú	cbar_axesrw   rq   r-   Ú	enumeratern   Úzip)r#   ry   rz   r{   rW   rJ   r|   rA   rF   rD   r¼   r½   r¾   r¿   rÀ   rE   r   Úindexr�   r>   r-   r&   s                        €r   r"   zImageGrid.__init__@  sÕ  ø€ õ@ 	ÔÐ;Ð;Ð;Ø%.ð	0ñ 	0ô 	0ð 	0åÔÐ=Ð=Ð=Ø)6ð	8ñ 	8ô 	8ð 	8à'ˆÔØ"/ˆÔØ%ˆÔØ'ˆÔõ 	‰Œ×ÒØ��{ FØ¨(Ø¨°tÀFØ!¨jð	 	ñ 	:ô 	:ð 	:ð ”.ð 	ð 	ˆBØ�LŠL˜ÑÔÐÐàð 	!ØÔ" hÒ.Ð.Øœ-ð /ð /�BØ!œ^¨AÔ.�B”F�Fð/ð /àÔ$¨Ò.Ð.Ý!*¨4¬=Ñ!9Ô!9ð 5ð 5‘I�E˜2Ø#×0Ò0°Ñ7Ô7‘H�C˜ØÔ.Ð2CÐCÐCØ!%¤°Ô!4˜œ˜à!%¤°Ô!4˜œ˜ð5ð 5õ  # 4¤=°$´.ÑAÔAð !ð !‘G�B˜Ø �B”F�Fð	!ð 	!ð!ð !r   c                 ó€  ‡ — ‰ j         €,‰ j        dv r‰ j        j        ‰ _         n‰ j        j        ‰ _         ˆ fd„t          ‰ j        ¦  «        D ¦   «         ‰ _        ‰ j        }‰ j        }g }g }g }g }|dk    �r¹|dv �r´|dk    r™‰ j	        t          j        ‰ j        ¦  «        z  }|                     t          j        ‰ j        |¦  «        ¦  «         |                     t          j        ‰ j         |¦  «        ¦  «         ‰ j                             ddd¬¦  «        }nž|d	k    r˜‰ j        t          j        ‰ j        ¦  «        z  }|                     t          j        ‰ j        |¦  «        ¦  «         |                     t          j        ‰ j         |¦  «        ¦  «         ‰ j                             ddd¬
¦  «        }t          ‰ j        ¦  «        D ]"}	‰ j        |	                              d¦  «         Œ#‰ j        d                              |¦  «         ‰ j        d                              d¦  «         t-          ‰ j        d         ¦  «        D �]Û\  }
}|r|                     ‰ j        ¦  «         |r#t          j        |d‰ j        d         ¬¦  «        }n-t          j        ‰ j        d         d‰ j        d         ¬¦  «        }|dk    rŽ|dk    s|dk    r‚|
dk    r||                     t3          |¦  «        ¦  «         |                     t          j        ‰ j        |¦  «        ¦  «         |                     t          j        ‰ j         |¦  «        ¦  «         |                     t3          |¦  «        ¦  «         |                     |¦  «         |dk    r–|dk    s|dk    rŠ|
‰ j        dz
  k    r||                     t          j        ‰ j         |¦  «        ¦  «         |                     t3          |¦  «        ¦  «         |                     t          j        ‰ j        |¦  «        ¦  «         �ŒÝg }g }t-          ‰ j        d         d d d…         ¦  «        D �]Û\  }}|r|                     ‰ j        ¦  «         |r#t          j        |d‰ j        d         ¬¦  «        }n-t          j        ‰ j        d         d‰ j        d         ¬¦  «        }|d	k    rŽ|dk    s|dk    r‚|dk    r||                     t3          |¦  «        ¦  «         |                     t          j        ‰ j        |¦  «        ¦  «         |                     t          j        ‰ j         |¦  «        ¦  «         |                     t3          |¦  «        ¦  «         |                     |¦  «         |dk    r–|dk    s|dk    rŠ|‰ j	        dz
  k    r||                     t          j        ‰ j         |¦  «        ¦  «         |                     t3          |¦  «        ¦  «         |                     t          j        ‰ j        |¦  «        ¦  «         �ŒÝt          ‰ j        ¦  «        D �]è}	‰                      |	¦  «        \  }
}‰ j                             ||
         |‰ j	        dz
  |z
           ¬¦  «        }‰ j        |	                              |¦  «         |dk    r‘|dv r4‰ j                             ||
         |‰ j	        dz
  |z
           ¬¦  «        }n7|dv r3‰ j                             ||
         |‰ j	        dz
  |z
           ¬¦  «        }‰ j        |	                              |¦  «         �Œ|dk    rÝ|dk    r|
dk    s|dk    rc|
‰ j        dz
  k    rU‰ j                             |d         |‰ j	        dz
  |z
           ¬¦  «        }‰ j        |                              |¦  «         �Œ€|d	k    r|‰ j	        dz
  k    s|dk    rN|dk    rH‰ j                             ||
         |d         ¬¦  «        }‰ j        |
                              |¦  «         �Œê|dk    �rº|dk    r™‰ j	        t          j        ‰ j        ¦  «        z  }|                     t          j        ‰ j         |¦  «        ¦  «         |                     t          j        ‰ j        |¦  «        ¦  «         ‰ j                             ddd¬¦  «        }nž|dk    r˜‰ j        t          j        ‰ j        ¦  «        z  }|                     t          j        ‰ j         |¦  «        ¦  «         |                     t          j        ‰ j        |¦  «        ¦  «         ‰ j                             ddd¬
¦  «        }|dv rwt          ‰ j        ¦  «        D ]"}	‰ j        |	                              d¦  «         Œ#‰ j        d                              |¦  «         ‰ j        d                              d¦  «         �n |dk    r8t          ‰ j        ¦  «        D ]"}	‰ j        |	                              d¦  «         Œ#nâ|dk    r�|dv r‰ j	        }n‰ j        }t          |¦  «        D ]"}	‰ j        |	                              d¦  «         Œ#t          |	dz   ‰ j        ¦  «        D ]"}‰ j        |                              d¦  «         Œ#n[t          ‰ j        ¦  «        D ]F}	‰ j        |	                              d¦  «         ‰ j        |	                              g d¢d¬¦  «         ŒG‰ j                             |¦  «         ‰ j                             |¦  «         d S )NrÅ   c                 ó¨   •— g | ]N} t          ‰j        ¦  «        ‰j        d          j        ‰j                             ¦   «         ‰j        ¬¦  «        ‘ŒOS )r   )r    )Ú_cbaraxes_class_factoryr`   rq   r.   rg   rj   rÇ   )Ú.0rŽ   r#   s     €r   ú
<listcomp>z,ImageGrid._init_locators.<locals>.<listcomp>«  sk   ø€ ð )ð )ð )ð ð <Õ# DÔ$:Ñ;Ô;Ø”˜aÔ Ô'¨¬×)CÒ)CÑ)EÔ)EØ Ô3ð5ñ 5ô 5ð)ð )ð )r   rÃ   )r   r   r   r   rS   )r„   r…   Úny1r   )r„   Únx1r…   FTÚaxes)rF   Úref_axrÂ   rÄ   r»   r   r*   rƒ   )r»   r   r)   éþÿÿÿ)r»   r*   )ç      ð?rØ   çü©ñÒMbP?rÙ   Úactive)Úwhich)rÈ   rÇ   r\   rŸ   r]   rm   rW   rÊ   rÆ   rT   r   ÚAxesXru   r†   Úfrom_anyrÉ   rg   rˆ   rU   ÚAxesYÚset_visibler‰   rË   rt   rq   rh   rs   rn   Úset_positionrŠ   r‹   )r#   Úcb_modeÚcb_locationrŒ   r�   r�   Úh_cb_posr�   r’   r€   r�   r   r‘   Úv_cb_posr>   ÚcountÚjs   `                r   rv   zImageGrid._init_locators¢  s  ø€ ð ÔÐ%àÔ&Ð*;Ð;Ð;Ø%)Ô%9Ô%D�Ô"Ð"à%)Ô%8Ô%C�Ô"ð)ð )ð )ð )õ ˜4œ;Ñ'Ô'ð	)ñ )ô )ˆŒð Ô%ˆØÔ-ˆàˆØˆàˆØˆØ�hÒÑ ;Ð2DÐ#DÑ#DØ˜fÒ$Ð$Ø”[¥4¤:¨d¬mÑ#<Ô#<Ñ<�Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@Ø—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?Øœ-×3Ò3°q¸QÀBÐ3ÑGÔG��Ø Ò(Ð(Ø”[¥4¤:¨d¬mÑ#<Ô#<Ñ<�Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@Ø—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?Øœ-×3Ò3°q¸bÀQÐ3ÑGÔG�Ý˜4œ;Ñ'Ô'ð 5ð 5�Ø”˜qÔ!×-Ò-¨eÑ4Ô4Ð4Ð4ØŒN˜1Ô×.Ò.¨wÑ7Ô7Ð7ØŒN˜1Ô×)Ò)¨$Ñ/Ô/Ð/å  ¤¨qÔ!1Ñ2Ô2ð 	Añ 	A‰GˆC�Øð /Ø—’˜Ô-Ñ.Ô.Ð.àð HÝ”Z ¨6¸$¼-ÈÔ:JÐKÑKÔK��å”Z ¤¨aÔ 0Ø'-°d´mÀAÔ6FðHñ Hô H�ð ˜vÒ%Ð%Ø  FÒ*Ð*Ø$¨Ò.Ð.°3¸!²8°8Ø—’¥ A¡¤Ñ'Ô'Ð'Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@Ø—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?à�OŠO�C ™FœFÑ#Ô#Ð#Ø�HŠH�R‰LŒLˆLà˜wÒ&Ð&Ø  FÒ*Ð*Ø$¨Ò.Ð.°3¸$¼+È¹/Ò3IÐ3IØ—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?Ø—’¥ A¡¤Ñ'Ô'Ð'Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@ùàˆØˆÝ  Ô!1°!Ô!4°T°T°r°TÔ!:Ñ;Ô;ð 	Añ 	A‰GˆC�Øð .Ø—’˜Ô,Ñ-Ô-Ð-àð HÝ”Z ¨6¸$¼-ÈÔ:JÐKÑKÔK��å”Z ¤¨aÔ 0Ø'-°d´mÀAÔ6FðHñ Hô H�ð ˜xÒ'Ð'Ø  FÒ*Ð*Ø$¨Ò.Ð.°3¸!²8°8Ø—’¥ A¡¤Ñ'Ô'Ð'Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@Ø—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?à�OŠO�C ™FœFÑ#Ô#Ð#Ø�HŠH�R‰LŒLˆLà˜uÒ$Ð$Ø  FÒ*Ð*Ø$¨Ò.Ð.°3¸$¼+È¹/Ò3IÐ3IØ—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?Ø—’¥ A¡¤Ñ'Ô'Ð'Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@ùå�t”{Ñ#Ô#ð 	Bñ 	BˆAØ×(Ò(¨Ñ+Ô+‰HˆC�Ø”m×/Ò/°8¸C´=Ø3;¸D¼KÈ¹MÈ#Ñ<MÔ3Nð 0ñ Pô PˆGàŒM˜!Ô×-Ò-¨gÑ6Ô6Ð6à˜&Ò Ð ØÐ"3Ð3Ð3Ø"œm×7Ò7Ø# Cœ=¨X°d´kÀA±oÈÑ6KÔ-Lð 8ñ Nô N�G�Gð !Ð$5Ð5Ð5Ø"œm×7Ò7Ø# Cœ=¨X°d´kÀA±oÈÑ6KÔ-Lð 8ñ Nô N�Gð ”˜qÔ!×2Ò2°7Ñ;Ô;Ð;Ñ;Ø˜FÒ"Ð"Ø 6Ò)Ð)¨c°Qªh¨hØ&¨'Ò1Ð1°c¸T¼[È1¹_Ò6LÐ6LØ"œm×7Ò7Ø# Aœ;¨8°D´KÀ!±OÀcÑ4IÔ+Jð 8ñ Lô L�Gà”N 3Ô'×8Ò8¸ÑAÔAÐAÑAØ! XÒ-Ð-°#¸¼Àq¹Ò2HÐ2HØ$¨Ò-Ð-°#¸²(°(Ø"œm×7Ò7¸8ÀC¼=Ø;CÀA¼;ð 8ñ Hô H�Gà”N 3Ô'×8Ò8¸ÑAÔAÐAùà�hÒÑØ˜gÒ%Ð%Ø”[¥4¤:¨d¬mÑ#<Ô#<Ñ<�Ø—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@Øœ-×3Ò3°r¸aÀRÐ3ÑHÔH��Ø Ò%Ð%Ø”[¥4¤:¨d¬mÑ#<Ô#<Ñ<�Ø—’�œ tÔ'9¸2Ñ>Ô>Ñ?Ô?Ð?Ø—’�œ tÔ':¸BÑ?Ô?Ñ@Ô@Ð@Øœ-×3Ò3°q¸bÀRÐ3ÑHÔH�ØÐ.Ð.Ð.Ý˜tœ{Ñ+Ô+ð 9ð 9�AØ”N 1Ô%×1Ò1°%Ñ8Ô8Ð8Ð8Ø”˜qÔ!×2Ò2°7Ñ;Ô;Ð;Ø”˜qÔ!×-Ò-¨dÑ3Ô3Ð3ùØ˜ÒÐÝ˜4œ;Ñ'Ô'ð 4ð 4�Ø”˜qÔ!×-Ò-¨dÑ3Ô3Ð3Ð3ð4à˜ÒÐØÐ/Ð/Ð/Øœ��àœ�Ý˜5‘\”\ð 4ð 4�Ø”˜qÔ!×-Ò-¨dÑ3Ô3Ð3Ð3Ý˜1˜q™5 $¤+Ñ.Ô.ð 5ð 5�Ø”˜qÔ!×-Ò-¨eÑ4Ô4Ð4Ð4ð5õ ˜4œ;Ñ'Ô'ð ?ð ?�Ø”˜qÔ!×-Ò-¨eÑ4Ô4Ð4Ø”˜qÔ!×.Ò.Ð/EÐ/EÐ/EØ5=ð /ñ ?ô ?ð ?ð ?ð 	Œ×$Ò$ QÑ'Ô'Ð'ØŒ×"Ò" 1Ñ%Ô%Ð%Ð%Ð%r   r¶   )r7   r8   r9   r"   rv   r:   r;   s   @r   rº   rº   =  sŽ   ø€ € € € € ð Ø Øð`!ð !ØØØØ&ØØØ"Ø ð`!ð `!ð `!ð `!ð `!ð `!ð `!ðD^&ð ^&ð ^&ð ^&ð ^&ð ^&ð ^&r   rº   )Únumbersr   rd   ÚnumpyrZ   Ú
matplotlibr   r   Úmatplotlib.gridspecr   Úaxes_dividerr   r	   r
   Úmpl_axesr   r   r   Ú_make_class_factoryrÐ   r=   rº   ÚAxesGridr¸   r   r   ú<module>rï      sI  ðØ Ð Ð Ð Ð Ð Ø Ð Ð Ð à Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "Ð "Ð "Ø +Ð +Ð +Ð +Ð +Ð +à 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ð 7Ø Ð Ð Ð Ð Ð ð@ð @ð @ð'ð 'ð 'ð 'ð 'ñ 'ô 'ð 'ð. 4˜%Ô3°LÀ(ÑKÔKÐ ðL+ð L+ð L+ð L+ð L+ñ L+ô L+ð L+ð^C&ð C&ð C&ð C&ð C&�ñ C&ô C&ð C&ðL €€€r   