§
    ‡Ûgn  ã                   óL   — d dl ZddlmZmZ ddlmZ d	d„Z G d„ d¦  «        ZdS )
é    Né   )Úmake_axes_locatableÚSize)ÚAxesç{®Gáz„?c                 óN  — t          | ¦  «        }|t          j        | ¦  «        z  }dd|z  z
  dz  t          j        | ¦  «        z  }dd|z  z
  dz  t          j        | ¦  «        z  }|                     t          j        | ¦  «        ||g¦  «         |                     |||||g¦  «         |                      |                     ddd¬¦  «        ¦  «         g }|€t          | ¦  «        }dD �]
}	 ||  	                    ¦   «         |  
                    d	¬
¦  «        f| | dœ|¤Ž}
|                     d|	¬¦  «        }|
                     |¦  «         |
j                             ¦   «         |
j                             ¦   «         z   D ]}|                     d¦  «         Œ	 |
j                             ¦   «         D ]}|j                             d¦  «         Œn# t$          $ r Y nw xY w|                     |
¦  «         �Œ|  	                    ¦   «         }|D ]}
|                     |
¦  «         Œ|S )a¦  
    Parameters
    ----------
    ax : `~matplotlib.axes.Axes`
        Axes instance to create the RGB Axes in.
    pad : float, optional
        Fraction of the Axes height to pad.
    axes_class : `matplotlib.axes.Axes` or None, optional
        Axes class to use for the R, G, and B Axes. If None, use
        the same class as *ax*.
    **kwargs :
        Forwarded to *axes_class* init for the R, G, and B Axes.
    r   é   é   r   éÿÿÿÿ)Úny1N)é   r	   r   T)Úoriginal)ÚsharexÚsharey)ÚnxÚnyF)r   r   ÚAxesYÚAxesXÚset_horizontalÚset_verticalÚset_axes_locatorÚnew_locatorÚtypeÚ
get_figureÚget_positionÚyaxisÚget_ticklabelsÚxaxisÚset_visibleÚaxisÚvaluesÚmajor_ticklabelsÚAttributeErrorÚappendÚadd_axes)ÚaxÚpadÚ
axes_classÚkwargsÚdividerÚpad_sizeÚxsizeÚysizeÚax_rgbr   Úax1ÚlocatorÚtr    Úfigs                  úV/granary/edev/quantum/lib/python3.11/site-packages/mpl_toolkits/axes_grid1/axes_rgb.pyÚmake_rgb_axesr4      sN  € õ " "Ñ%Ô%€Gà•T”Z ‘^”^Ñ#€Hà��#‘‰g�q‰[�DœJ r™NœNÑ*€EØ��#‘‰g�q‰[�DœJ r™NœNÑ*€Eà×Ò�DœJ r™NœN¨H°eÐ<Ñ=Ô=Ð=Ø×Ò˜% ¨5°(¸EÐBÑCÔCÐCà×Ò˜×+Ò+¨A¨q°bÐ+Ñ9Ô9Ñ:Ô:Ð:à€FØÐÝ˜"‘X”Xˆ
àð ñ ˆØˆj˜Ÿš™œ¨"¯/ª/À4¨/Ñ*HÔ*Hð 9Ø "¨2ð9ð 9Ø17ð9ð 9ˆà×%Ò%¨¨rÐ%Ñ2Ô2ˆØ×Ò˜WÑ%Ô%Ð%Ø”×)Ò)Ñ+Ô+¨c¬i×.FÒ.FÑ.HÔ.HÑHð 	!ð 	!ˆAØ�MŠM˜%Ñ Ô Ð Ð ð	ØœŸšÑ)Ô)ð 9ð 9�ØÔ%×1Ò1°%Ñ8Ô8Ð8Ð8ð9øåð 	ð 	ð 	ØˆDð	øøøð 	�Š�cÑÔÐÑà
�-Š-‰/Œ/€CØð ð ˆØ�Š�SÑÔÐÐà€Ms   Æ6GÇ
GÇGc                   ó(   — e Zd ZdZeZddœd„Zd„ ZdS )ÚRGBAxesu°  
    4-panel `~.Axes.imshow` (RGB, R, G, B).

    Layout::

        â”Œâ”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”�
        â”‚               â”‚  R  â”‚
        â”‚               â”œâ”€â”€â”€â”€â”€â”¤
        â”‚      RGB      â”‚  G  â”‚
        â”‚               â”œâ”€â”€â”€â”€â”€â”¤
        â”‚               â”‚  B  â”‚
        â””â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”´â”€â”€â”€â”€â”€â”˜

    Subclasses can override the ``_defaultAxesClass`` attribute.
    By default RGBAxes uses `.mpl_axes.Axes`.

    Attributes
    ----------
    RGB : ``_defaultAxesClass``
        The Axes object for the three-channel `~.Axes.imshow`.
    R : ``_defaultAxesClass``
        The Axes object for the red channel `~.Axes.imshow`.
    G : ``_defaultAxesClass``
        The Axes object for the green channel `~.Axes.imshow`.
    B : ``_defaultAxesClass``
        The Axes object for the blue channel `~.Axes.imshow`.
    r   )r'   c                óÄ  — |                      d| j        ¦  «        } ||i |¤Žx| _        }|                     ¦   «                              |¦  «         t          |f||dœ|¤Ž\  | _        | _        | _        | j        | j        | j        | j        fD ]P}|j	        dd…         j
                             d¦  «         |j	        dd…         j                             d¦  «         ŒQdS )aª  
        Parameters
        ----------
        pad : float, default: 0
            Fraction of the Axes height to put as padding.
        axes_class : `~matplotlib.axes.Axes`
            Axes class to use. If not provided, ``_defaultAxesClass`` is used.
        *args
            Forwarded to *axes_class* init for the RGB Axes
        **kwargs
            Forwarded to *axes_class* init for the RGB, R, G, and B Axes
        r(   )r'   r(   NÚw)ÚpopÚ_defaultAxesClassÚRGBr   r%   r4   ÚRÚGÚBr    ÚlineÚ	set_colorÚmajor_ticksÚset_markeredgecolor)Úselfr'   Úargsr)   r(   r&   r/   s          r3   Ú__init__zRGBAxes.__init__[   sø   € ð —Z’Z ¨dÔ.DÑEÔEˆ
Ø"˜
 DÐ3¨FÐ3Ð3Ð3ˆŒ�2Ø
�Š‰Œ× Ò  Ñ$Ô$Ð$Ý!.Øð":Ø Jð":ð ":Ø28ð":ð ":ÑˆŒ�”˜œð ”H˜dœf d¤f¨d¬fÐ5ð 	=ð 	=ˆCØŒH�Q�Q�QŒKÔ×&Ò& sÑ+Ô+Ð+ØŒH�Q�Q�QŒKÔ#×7Ò7¸Ñ<Ô<Ð<Ð<ð	=ð 	=ó    c           	      ó   — |j         |j         cxk    r|j         k    s*n t          d|j         › d|j         › d|j         › d�¦  «        ‚t          j        |||g¦  «        }t          j        |¦  «        }||dd…dd…df<   t          j        |¦  «        }||dd…dd…df<   t          j        |¦  «        }||dd…dd…df<    | j        j        |fi |¤Ž}	 | j        j        |fi |¤Ž}
 | j        j        |fi |¤Ž} | j	        j        |fi |¤Ž}|	|
||fS )aË  
        Create the four images {rgb, r, g, b}.

        Parameters
        ----------
        r, g, b : array-like
            The red, green, and blue arrays.
        **kwargs :
            Forwarded to `~.Axes.imshow` calls for the four images.

        Returns
        -------
        rgb : `~matplotlib.image.AxesImage`
        r : `~matplotlib.image.AxesImage`
        g : `~matplotlib.image.AxesImage`
        b : `~matplotlib.image.AxesImage`
        zInput shapes (z, z) do not matchNr   r   r	   )
ÚshapeÚ
ValueErrorÚnpÚdstackÚ
zeros_liker;   Úimshowr<   r=   r>   )rC   ÚrÚgÚbr)   r;   r<   r=   r>   Úim_rgbÚim_rÚim_gÚim_bs                r3   Ú
imshow_rgbzRGBAxes.imshow_rgbr   sd  € ð$ ”˜1œ7Ð-Ð-Ò-Ð- a¤gÒ-Ð-Ð-Ð-ÝØN ¤ÐNÐN¨A¬GÐNÐN°q´wÐNÐNÐNñPô Pð PåŒi˜˜A˜q˜	Ñ"Ô"ˆÝŒM˜#ÑÔˆØˆˆ!ˆ!ˆ!ˆQˆQˆQ�ˆ'‰
ÝŒM˜#ÑÔˆØˆˆ!ˆ!ˆ!ˆQˆQˆQ�ˆ'‰
ÝŒM˜#ÑÔˆØˆˆ!ˆ!ˆ!ˆQˆQˆQ�ˆ'‰
Ø �”” Ð/Ð/¨Ð/Ð/ˆØˆtŒvŒ}˜QÐ)Ð) &Ð)Ð)ˆØˆtŒvŒ}˜QÐ)Ð) &Ð)Ð)ˆØˆtŒvŒ}˜QÐ)Ð) &Ð)Ð)ˆØ�t˜T 4Ð'Ð'rF   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r:   rE   rU   © rF   r3   r6   r6   <   sQ   € € € € € ðð ð8 Ðà"#ð =ð =ð =ð =ð =ð. (ð  (ð  (ð  (ð  (rF   r6   )r   N)	ÚnumpyrJ   Úaxes_dividerr   r   Úmpl_axesr   r4   r6   rZ   rF   r3   ú<module>r^      sŒ   ðØ Ð Ð Ð à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø Ð Ð Ð Ð Ð ð2ð 2ð 2ð 2ðjV(ð V(ð V(ð V(ð V(ñ V(ô V(ð V(ð V(ð V(rF   