
    hk                     V    S SK Jr  S SKrSSKJrJr  SSKJrJ	r	  S	S jr
 " S S5      rg)
    )
MethodTypeN   )make_axes_locatableSize)AxesSimpleAxisArtistc                    [        U 5      nU[        R                  " U 5      -  nSSU-  -
  S-  [        R                  " U 5      -  nSSU-  -
  S-  [        R                  " U 5      -  nUR	                  [        R                  " U 5      XV/5        UR                  XuXuU/5        U R                  UR                  SSSS95        / nUc  [        U 5      nS H  n	U" U R                  5       U R                  SS	94X S
.UD6n
UR                  SU	S9nU
R                  U5        U
R                  R                  5       U
R                  R                  5       -    H  nUR                  S5        M      U
R                  R!                  5        H  nUR"                  R                  S5        M      UR'                  U
5        M     U R                  5       nU H  n
UR)                  U
5        M     U$ ! [$         a     NMf = f)at  
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   )ny1)   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                  R/var/www/html/env/lib/python3.13/site-packages/mpl_toolkits/axes_grid1/axes_rgb.pymake_rgb_axesr5   	   s    ""%GTZZ^#H#gq[DJJrN*E#gq[DJJrN*EDJJrNH<=%5EBC++Aqb+9:F"X
"//4/*H 9 "9179%%r%2W%))+cii.F.F.HHAMM%  I	)%%11%8 *
 	c  --/CS  M  		s   /<G,,
G98G9c                   0    \ rS rSrSr\rSS.S jrS rSr	g)	RGBAxes>   uX  
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                x   UR                  SU R                  5      nU" U0 UD6=U l        nUR                  5       R	                  U5        [        U4XS.UD6u  U l        U l        U l        U R                  U R                  U R                  U R                  4 GH  n[        UR                  [        5      (       a  [        R                  " U 5      nUR                  [        UR                   SUR"                  S   5      [        UR                   SUR"                  S   5      [        UR$                  SUR"                  S   5      [        UR$                  SUR"                  S   5      S	9  OUR                  nUS
S
 R&                  R)                  S5        US
S
 R*                  R-                  S5        GM     g
)aR  
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)   r   bottomr
   topleftright)r:   r;   r<   r=   Nw)pop_defaultAxesClassRGBr   r&   r5   RGB
isinstancer!   r   r   AxisDictupdater   r   spinesr   line	set_colormajor_ticksset_markeredgecolor)selfr(   argsr*   r)   r'   r0   ads           r4   __init__RGBAxes.__init__]   sa    ZZd.D.DE
"D3F332
  $!.":":28": HHdffdffdff5C#((J//]]4(		+CIIq#**X:NO(Aszz%7HI)#))Q

68JK*399aG9LM	  O XXqEJJ  %qE11#6 6    c           	         UR                   UR                   s=:X  a  UR                   :X  d5  O  [        SUR                    SUR                    SUR                    S35      e[        R                  " XU/5      n[        R                  " U5      nXSS2SS2S4'   [        R                  " U5      nX'SS2SS2S4'   [        R                  " U5      nX8SS2SS2S4'   U R
                  R                  " U40 UD6n	U R                  R                  " U40 UD6n
U R                  R                  " U40 UD6nU R                  R                  " U40 UD6nXX4$ )aY  
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_likerA   imshowrB   rC   rD   )rM   rgbr*   rA   rB   rC   rD   im_rgbim_rim_gim_bs                r4   
imshow_rgbRGBAxes.imshow_rgb}   s   $ 177-agg- 	AGG9Bqwwi~NP Piiq	"MM#!Q'
MM#!Q'
MM#!Q'
//vv}}Q)&)vv}}Q)&)vv}}Q)&)T''rR   )rD   rC   rB   rA   N)
__name__
__module____qualname____firstlineno____doc__r   r@   rP   ra   __static_attributes__ rR   r4   r7   r7   >   s    8 "# 7@ (rR   r7   )g{Gz?N)typesr   numpyrV   axes_dividerr   r   mpl_axesr   r   r5   r7   ri   rR   r4   <module>rn      s#      3 ,2j_( _(rR   