Ë
    ¨eh„U  ã                   óÒ   — d Z ddl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  G d„ d«      Z G d	„ d
e«      Z G d„ de«      Zd„ Z G d„ de«      Z G d„ de«      Zd„ Z	 dd„Zy)zJ
Helper classes to adjust the positions of multiple axes at drawing time.
é    N)Ú_api)ÚSubplotSpecé   )Ú	axes_sizec                   ó¸   — e Zd ZdZ	 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d„Zd„ Zd„ Zd„ Zd„ Zed„ «       Zed„ «       Zdd„Zd„ Zd„ Zdd„Zy)ÚDivideraQ  
    An Axes positioning class.

    The divider is initialized with lists of horizontal and vertical sizes
    (:mod:`mpl_toolkits.axes_grid1.axes_size`) based on which a given
    rectangular area will be divided.

    The `new_locator` method then creates a callable object
    that can be used as the *axes_locator* of the axes.
    Nc                 ó¤   — || _         || _        || _        || _        || _        | j                  |«       || _        d| _        d| _        d| _	        y)aã  
        Parameters
        ----------
        fig : Figure
        pos : tuple of 4 floats
            Position of the rectangle that will be divided.
        horizontal : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
            Sizes for horizontal division.
        vertical : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
            Sizes for vertical division.
        aspect : bool, optional
            Whether overall rectangular area is reduced so that the relative
            part of the horizontal and vertical scales have the same scale.
        anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}, default: 'C'
            Placement of the reduced rectangle, when *aspect* is True.
        r   N)
Ú_figÚ_posÚ_horizontalÚ	_verticalÚ_anchorÚ
set_anchorÚ_aspectÚ
_xrefindexÚ
_yrefindexÚ_locator)ÚselfÚfigÚposÚ
horizontalÚverticalÚaspectÚanchors          úb/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/mpl_toolkits/axes_grid1/axes_divider.pyÚ__init__zDivider.__init__   sP   € ð( ˆŒ	ØˆŒ	Ø%ˆÔØ!ˆŒØˆŒØ�‰˜ÔØˆŒØˆŒØˆŒØˆ�ó    c                 óŒ   — t        j                  | j                  «       D �cg c]  }|j                  |«      ‘Œ c}«      S c c}w ©N)ÚnpÚarrayÚget_horizontalÚget_size©r   ÚrendererÚss      r   Úget_horizontal_sizeszDivider.get_horizontal_sizes;   s1   € Ü�x‰x°t×7JÑ7JÓ7LÖM°!˜Ÿ™ HÕ-ÒMÓNÐNùÒMó   ¢Ac                 óŒ   — t        j                  | j                  «       D �cg c]  }|j                  |«      ‘Œ c}«      S c c}w r   )r    r!   Úget_verticalr#   r$   s      r   Úget_vertical_sizeszDivider.get_vertical_sizes>   s1   € Ü�x‰x°t×7HÑ7HÓ7JÖK°!˜Ÿ™ HÕ-ÒKÓLÐLùÒKr(   c                 ó   — || _         y)z¶
        Set the position of the rectangle.

        Parameters
        ----------
        pos : tuple of 4 floats
            position of the rectangle that will be divided
        N©r   )r   r   s     r   Úset_positionzDivider.set_positionA   s   € ð ˆ�	r   c                 ó   — | j                   S )z%Return the position of the rectangle.r-   ©r   s    r   Úget_positionzDivider.get_positionL   s   € à�y‰yÐr   c                 óþ   — t        |t        «      r7t        j                  t        j
                  j                  |¬«       || _        yt        |t        t        f«      rt        |«      dk7  rt        d«      ‚|| _        y)a�  
        Parameters
        ----------
        anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}
            Either an (*x*, *y*) pair of relative coordinates (0 is left or
            bottom, 1 is right or top), 'C' (center), or a cardinal direction
            ('SW', southwest, is bottom left, etc.).

        See Also
        --------
        .Axes.set_anchor
        )r   é   zanchor must be str or 2-tupleN)Ú
isinstanceÚstrr   Úcheck_in_listÚmtransformsÚBboxÚcoefsÚtupleÚlistÚlenÚ	TypeErrorr   )r   r   s     r   r   zDivider.set_anchorP   sa   € ô �fœcÔ"Ü×Ñœ{×/Ñ/×5Ñ5¸fÕEð ˆ�ô ˜F¤U¬D MÔ2´c¸&³kÀQÒ6FÜÐ;Ó<Ð<Øˆ�r   c                 ó   — | j                   S )zReturn the anchor.)r   r0   s    r   Ú
get_anchorzDivider.get_anchord   ó   € à�|‰|Ðr   c                  ó   — y r   © r0   s    r   Úget_subplotspeczDivider.get_subplotspech   s   € Ør   c                 ó   — || _         y)z—
        Parameters
        ----------
        h : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
            sizes for horizontal division
        N©r   )r   Úhs     r   Úset_horizontalzDivider.set_horizontalk   s   € ð ˆÕr   c                 ó   — | j                   S )zReturn horizontal sizes.rE   r0   s    r   r"   zDivider.get_horizontalt   s   € à×ÑÐr   c                 ó   — || _         y)z•
        Parameters
        ----------
        v : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
            sizes for vertical division
        N©r   )r   Úvs     r   Úset_verticalzDivider.set_verticalx   s   € ð ˆ�r   c                 ó   — | j                   S )zReturn vertical sizes.rJ   r0   s    r   r*   zDivider.get_vertical�   s   € à�~‰~Ðr   c                 ó   — || _         y)zE
        Parameters
        ----------
        aspect : bool
        N©r   ©r   r   s     r   Ú
set_aspectzDivider.set_aspect…   s   € ð ˆ�r   c                 ó   — | j                   S )zReturn aspect.rO   r0   s    r   Ú
get_aspectzDivider.get_aspect�   r@   r   c                 ó   — || _         y r   ©r   )r   r   s     r   Úset_locatorzDivider.set_locator‘   s	   € Ø ˆ�r   c                 ó   — | j                   S r   rU   r0   s    r   Úget_locatorzDivider.get_locator”   s   € Ø�}‰}Ðr   c                 ór   — | j                   €| j                  «       S | j                  ||«      j                  S r   )r   r1   Úbounds)r   Úaxr%   s      r   Úget_position_runtimezDivider.get_position_runtime—   s2   € Ø�=‰=Ð Ø×$Ñ$Ó&Ð&à—=‘=  XÓ.×5Ñ5Ð5r   c                 óB   — | j                  d«      \  }}|r||z
  |z  S dS )Nr   )Úsum)ÚsizesÚtotalÚrel_sumÚabs_sums       r   Ú_calc_kzDivider._calc_k�   s,   € ð !Ÿ9™9 Q›<Ñˆ�Ù.5�˜‘ 7Ñ*Ð<¸1Ð<r   c                 ó<   — t        j                  dg| |dgz  ¢«      S )Nr   r   )r    Úcumsum)r_   Úks     r   Ú_calc_offsetszDivider._calc_offsets¤   s#   € ô �y‰y˜!Ð/˜u¨¨1 v™~Ð/Ó0Ð0r   c                 óÒ   — |€|dz   }|€|dz   }| j                   }| j                  }t        j                  | j                  ||z
  ||z
  ||z
  ||z
  «      }| j
                  |_        |S )aâ  
        Return an axes locator callable for the specified cell.

        Parameters
        ----------
        nx, nx1 : int
            Integers specifying the column-position of the
            cell. When *nx1* is None, a single *nx*-th column is
            specified. Otherwise, location of columns spanning between *nx*
            to *nx1* (but excluding *nx1*-th column) is specified.
        ny, ny1 : int
            Same as *nx* and *nx1*, but for row positions.
        r   )r   r   Ú	functoolsÚpartialÚ_locaterC   )r   ÚnxÚnyÚnx1Úny1ÚxrefÚyrefÚlocators           r   Únew_locatorzDivider.new_locatorª   sw   € ð ˆ;Ø�q‘&ˆCØˆ;Ø�q‘&ˆCð �‰ˆØ�‰ˆÜ×#Ñ#Ø�L‰L˜"˜t™) R¨$¡Y°°d±
¸CÀ$¹JóHˆà"&×"6Ñ"6ˆÔØˆr   c                 óX  — || j                   z  }|| j                   z  }|| j                  z  }|| j                  z  }| j                  j                  j                  | j                  j
                  z  \  }}| j                  ||«      \  }	}
}}| j                  |«      }| j                  |«      }| j                  |||z  «      }| j                  |||z  «      }| j                  «       r¾t        ||«      }| j                  ||«      }| j                  ||«      }|d   |d   z
  |z  }|d   |d   z
  |z  }t        j                  j                  |	|
||«      }t        j                  j                  |	|
||«      }|j!                  | j#                  «       |«      j$                  \  }}n(| j                  ||«      }| j                  ||«      }|	|
}}|€d}|€d}|||   |z  z   ||   ||   z
  |z  }}|||   |z  z   ||   ||   z
  |z  }}t        j                  j                  ||||«      S )a  
        Implementation of ``divider.new_locator().__call__``.

        The axes locator callable returned by ``new_locator()`` is created as
        a `functools.partial` of this method with *nx*, *ny*, *nx1*, and *ny1*
        specifying the requested cell.
        éÿÿÿÿr   )r   r   r
   ÚbboxÚsizeÚdpir\   r'   r+   rc   rS   Úminrg   r7   r8   Úfrom_boundsÚanchoredr?   Úp0)r   rl   rm   rn   ro   Úaxesr%   Úfig_wÚfig_hÚxÚyÚwrF   ÚhsizesÚvsizesÚk_hÚk_vrf   ÚoxÚoyÚwwÚhhÚpbÚpb1Úx0Úy0Úx1Úw1Úy1Úh1s                                 r   rk   zDivider._locateÊ   s0  € ð 	ˆd�o‰oÑˆØˆt�‰ÑˆØ
ˆd�o‰oÑˆØˆt�‰Ñˆà—y‘y—~‘~×*Ñ*¨T¯Y©Y¯]©]Ñ:‰ˆˆuØ×.Ñ.¨t°XÓ>‰
ˆˆ1ˆa�à×*Ñ*¨8Ó4ˆØ×(Ñ(¨Ó2ˆØ�l‰l˜6 5¨1¡9Ó-ˆØ�l‰l˜6 5¨1¡9Ó-ˆà�?‰?ÔÜ�C˜“ˆAØ×#Ñ# F¨AÓ.ˆBØ×#Ñ# F¨AÓ.ˆBà�R‘&˜2˜a™5‘. EÑ)ˆBØ�R‘&˜2˜a™5‘. EÑ)ˆBÜ×!Ñ!×-Ñ-¨a°°A°qÓ9ˆBÜ×"Ñ"×.Ñ.¨q°!°R¸Ó<ˆCØ—\‘\ $§/¡/Ó"3°RÓ8×;Ñ;‰FˆB‘ð ×#Ñ# F¨CÓ0ˆBØ×#Ñ# F¨CÓ0ˆBØ˜�ˆBàˆ;ØˆCØˆ;ØˆCà�b˜‘f˜u‘nÑ$ r¨#¡w°°B±Ñ'7¸5Ñ&@ˆBˆØ�b˜‘f˜u‘nÑ$ r¨#¡w°°B±Ñ'7¸5Ñ&@ˆBˆä×Ñ×+Ñ+¨B°°B¸Ó;Ð;r   c                 óŠ  — t        j                  g d¢|¬«       |dk(  r2| j                  j                  d|«       | xj                  dz  c_        y |dk(  r| j                  j                  |«       y |dk(  r2| j                  j                  d|«       | xj                  dz  c_        y | j                  j                  |«       y )N©ÚleftÚrightÚbottomÚtop©Úpositionr•   r   r   r–   r—   )r   r6   r   Úinsertr   Úappendr   r   )r   rš   rw   s      r   Úappend_sizezDivider.append_sizeù   sš   € Ü×ÑÒ=Ø$,õ	.à�vÒØ×Ñ×#Ñ# A tÔ,Ø�OŠO˜qÑ ŽOØ˜Ò Ø×Ñ×#Ñ# DÕ)Ø˜Ò!Ø�N‰N×!Ñ! ! TÔ*Ø�OŠO˜qÑ ŽOà�N‰N×!Ñ! $Õ'r   c                 óp   — |€g d¢}|D ]+  }| j                  |t        j                  ||«      |z   «       Œ- y)a5  
        Add auto-adjustable padding around *use_axes* to take their decorations
        (title, labels, ticks, ticklabels) into account during layout.

        Parameters
        ----------
        use_axes : `~matplotlib.axes.Axes` or list of `~matplotlib.axes.Axes`
            The Axes whose decorations are taken into account.
        pad : float, default: 0.1
            Additional padding in inches.
        adjust_dirs : list of {"left", "right", "bottom", "top"}, optional
            The sides where padding is added; defaults to all four sides.
        Nr”   )r�   ÚSizeÚ_AxesDecorationsSize)r   Úuse_axesÚpadÚadjust_dirsÚds        r   Úadd_auto_adjustable_areaz Divider.add_auto_adjustable_area  sB   € ð ÐÚ<ˆKØò 	NˆAØ×Ñ˜Q¤× 9Ñ 9¸(ÀAÓ FÈÑ LÕMñ	Nr   )NÚC)F©NN)çš™™™™™¹?N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r'   r+   r.   r1   r   r?   rC   rG   r"   rL   r*   rQ   rS   rV   rX   r\   Ústaticmethodrc   rg   rs   rk   r�   r¥   rB   r   r   r   r      s¢   „ ñ	ð &)óò>OòMò	òòò(òòò òòóòò!òò6ð ñ=ó ð=ð ñ1ó ð1ó
ò@-<ò^(ôNr   r   c                   ó@   ‡ — e Zd ZdZdddddœˆ fd„
Zd„ Zd„ Zd„ Zˆ xZS )	ÚSubplotDividerzT
    The Divider class whose rectangle area is specified as a subplot geometry.
    Nr¦   ©r   r   r   r   c                óœ   •— || _         t        ‰| �	  |g d¢|xs g |xs g ||¬«       | j                  t	        j
                  ||«      «       y)a”  
        Parameters
        ----------
        fig : `~matplotlib.figure.Figure`

        *args : tuple (*nrows*, *ncols*, *index*) or int
            The array of subplots in the figure has dimensions ``(nrows,
            ncols)``, and *index* is the index of the subplot being created.
            *index* starts at 1 in the upper left corner and increases to the
            right.

            If *nrows*, *ncols*, and *index* are all single digit numbers, then
            *args* can be passed as a single 3-digit number (e.g. 234 for
            (2, 3, 4)).
        horizontal : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`, optional
            Sizes for horizontal division.
        vertical : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`, optional
            Sizes for vertical division.
        aspect : bool, optional
            Whether overall rectangular area is reduced so that the relative
            part of the horizontal and vertical scales have the same scale.
        anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}, default: 'C'
            Placement of the reduced rectangle, when *aspect* is True.
        )r   r   r   r   r°   N)ÚfigureÚsuperr   Úset_subplotspecr   Ú_from_subplot_args)r   r   r   r   r   r   ÚargsÚ	__class__s          €r   r   zSubplotDivider.__init__   sR   ø€ ð6 ˆŒÜ‰Ñ˜šlØ$.Ò$4°"¸xº~È2Ø &¨vð 	ô 	7ð 	×Ñœ[×;Ñ;¸CÀÓFÕGr   c                 óh   — | j                  «       j                  | j                  «      j                  S )z%Return the bounds of the subplot box.)rC   r1   r²   rZ   r0   s    r   r1   zSubplotDivider.get_positionA  s&   € à×#Ñ#Ó%×2Ñ2°4·;±;Ó?×FÑFÐFr   c                 ó   — | j                   S )zGet the SubplotSpec instance.)Ú_subplotspecr0   s    r   rC   zSubplotDivider.get_subplotspecE  s   € à× Ñ Ð r   c                 óf   — || _         | j                  |j                  | j                  «      «       y)zSet the SubplotSpec instance.N)rº   r.   r1   r²   )r   Úsubplotspecs     r   r´   zSubplotDivider.set_subplotspecI  s'   € à'ˆÔØ×Ñ˜+×2Ñ2°4·;±;Ó?Õ@r   )	r©   rª   r«   r¬   r   r1   rC   r´   Ú__classcell__©r·   s   @r   r¯   r¯     s,   ø„ ñð /3¸TØ SöHòBGò!öAr   r¯   c                   óf   ‡ — e Zd ZdZdˆ fd„	Zddœd„Zdd„Zdd„Zdddœd„Zd	„ Z	d
„ Z
d„ Zd„ Zˆ xZS )ÚAxesDividerz0
    Divider based on the preexisting axes.
    Nc                 ó  •— || _         |€t        j                  |«      | _        n|| _        |€t        j                  |«      | _        n|| _        t        ‰| �  |j                  «       d| j                  g| j
                  gdd¬«       y)zw
        Parameters
        ----------
        axes : :class:`~matplotlib.axes.Axes`
        xref
        yref
        Nr¦   )r   r   r   r   r   r   )	Ú_axesrŸ   ÚAxesXÚ_xrefÚAxesYÚ_yrefr³   r   Ú
get_figure)r   r}   rp   rq   r·   s       €r   r   zAxesDivider.__init__T  sw   ø€ ð ˆŒ
Øˆ<ÜŸ™ DÓ)ˆD�JàˆDŒJØˆ<ÜŸ™ DÓ)ˆD�JàˆDŒJä‰Ñ˜TŸ_™_Ó.°DØ%)§Z¡Z L¸D¿J¹J¸<Ø $¨Sð 	õ 	2r   )Ú
axes_classc                ó„   — | j                   }|€t        |«      } ||j                  «       |j                  d¬«      fi |¤ŽS ©NT)Úoriginal)rÂ   ÚtyperÇ   r1   )r   rÈ   Úkwargsr}   s       r   Ú_get_new_axeszAxesDivider._get_new_axesj  sH   € Ø�z‰zˆØÐÜ˜d›ˆJÙ˜$Ÿ/™/Ó+¨T×->Ñ->ÈÐ->Ó-Mñ $Ø"ñ$ð 	$r   c                 óB  — |€ t         j                  d   | j                  z  }|rdnd}|rMt        |t        j
                  «      s!t	        j                  || j                  ¬«      }| j                  ||«       t        |t        j
                  «      s!t	        j                  || j                  ¬«      }| j                  ||«       | j                  |rdnt        | j                  «      dz
  | j                  ¬«      } | j                  di |¤Ž}|j                  |«       |S )	z³
        Helper method for ``append_axes("left")`` and ``append_axes("right")``.

        See the documentation of `append_axes` for more details.

        :meta private:
        zfigure.subplot.wspacer•   r–   ©Úfraction_refr   r   ©rl   rm   rB   )ÚmplÚrcParamsrÄ   r4   rŸ   Ú_BaseÚfrom_anyr�   rs   r<   r   r   rÎ   Úset_axes_locator©r   rw   r¢   Ú
pack_startrÍ   r   rr   r[   s           r   Únew_horizontalzAxesDivider.new_horizontalq  sî   € ð ˆ;Ü—,‘,Ð6Ñ7¸$¿*¹*ÑDˆCÙ"‰f¨ˆÙÜ˜c¤4§:¡:Ô.Ü—m‘m C°d·j±jÔA�Ø×Ñ˜S #Ô&Ü˜$¤§
¡
Ô+Ü—=‘= °D·J±JÔ?ˆDØ×Ñ˜˜dÔ#Ø×"Ñ"Ù‰q¤C¨×(8Ñ(8Ó$9¸AÑ$=Ø�‰ð #ó  ˆð  ˆT×ÑÑ) &Ñ)ˆØ
×Ñ˜GÔ$Øˆ	r   c                 óB  — |€ t         j                  d   | j                  z  }|rdnd}|rMt        |t        j
                  «      s!t	        j                  || j                  ¬«      }| j                  ||«       t        |t        j
                  «      s!t	        j                  || j                  ¬«      }| j                  ||«       | j                  | j                  |rdnt        | j                  «      dz
  ¬«      } | j                  di |¤Ž}|j                  |«       |S )	z³
        Helper method for ``append_axes("top")`` and ``append_axes("bottom")``.

        See the documentation of `append_axes` for more details.

        :meta private:
        zfigure.subplot.hspacer—   r˜   rÐ   r   r   rÒ   rB   )rÓ   rÔ   rÆ   r4   rŸ   rÕ   rÖ   r�   rs   r   r<   r   rÎ   r×   rØ   s           r   Únew_verticalzAxesDivider.new_verticalŠ  sì   € ð ˆ;Ü—,‘,Ð6Ñ7¸$¿*¹*ÑDˆCÙ$‰h¨%ˆÙÜ˜c¤4§:¡:Ô.Ü—m‘m C°d·j±jÔA�Ø×Ñ˜S #Ô&Ü˜$¤§
¡
Ô+Ü—=‘= °D·J±JÔ?ˆDØ×Ñ˜˜dÔ#Ø×"Ñ"Ø�‰Ù‰q¤C¨¯©Ó$7¸!Ñ$;ð #ó =ˆð  ˆT×ÑÑ) &Ñ)ˆØ
×Ñ˜GÔ$Øˆ	r   c                óô   — t        j                  | j                  df| j                  df| j                  df| j                  dfdœ|¬«      \  }} |||f||dœ|¤Ž}| j                  j                  |«       |S )am  
        Add a new axes on a given side of the main axes.

        Parameters
        ----------
        position : {"left", "right", "bottom", "top"}
            Where the new axes is positioned relative to the main axes.
        size : :mod:`~mpl_toolkits.axes_grid1.axes_size` or float or str
            The axes width or height.  float or str arguments are interpreted
            as ``axes_size.from_any(size, AxesX(<main_axes>))`` for left or
            right axes, and likewise with ``AxesY`` for bottom or top axes.
        pad : :mod:`~mpl_toolkits.axes_grid1.axes_size` or float or str
            Padding between the axes.  float or str arguments are interpreted
            as for *size*.  Defaults to :rc:`figure.subplot.wspace` times the
            main Axes width (left or right axes) or :rc:`figure.subplot.hspace`
            times the main Axes height (bottom or top axes).
        axes_class : subclass type of `~.axes.Axes`, optional
            The type of the new axes.  Defaults to the type of the main axes.
        **kwargs
            All extra keywords arguments are passed to the created axes.
        TFr”   r™   )rÙ   rÈ   )r   Úcheck_getitemrÚ   rÜ   r
   Úadd_axes)	r   rš   rw   r¢   rÈ   rÍ   Úcreate_axesrÙ   r[   s	            r   Úappend_axeszAxesDivider.append_axes£  s˜   € ô. #'×"4Ñ"4Ø×(Ñ(¨$Ð/Ø×)Ñ)¨5Ð1Ø×(Ñ(¨$Ð/Ø×%Ñ% uÐ-ñ	6
ð
 ô#Ñˆ�Zñ Ø�#ðOØ",¸ñOØGMñOˆà�	‰	×Ñ˜2ÔØˆ	r   c                 ót   — | j                   €!| j                  j                  «       }|dk(  ryy| j                   S )NÚautoFT)r   rÂ   rS   rP   s     r   rS   zAxesDivider.get_aspectÅ  s6   € Ø�<‰<ÐØ—Z‘Z×*Ñ*Ó,ˆFØ˜ÒØàà—<‘<Ðr   c                 ó‚   — | j                   €(| j                  j                  d¬«      }|j                  S | j                   S rÊ   )r   rÂ   r1   rZ   )r   rv   s     r   r1   zAxesDivider.get_positionÏ  s7   € Ø�9‰9ÐØ—:‘:×*Ñ*°DÐ*Ó9ˆDØ—;‘;Ðà—9‘9Ðr   c                 óf   — | j                   €| j                  j                  «       S | j                   S r   )r   rÂ   r?   r0   s    r   r?   zAxesDivider.get_anchorÖ  s)   € Ø�<‰<ÐØ—:‘:×(Ñ(Ó*Ð*à—<‘<Ðr   c                 ó6   — | j                   j                  «       S r   )rÂ   rC   r0   s    r   rC   zAxesDivider.get_subplotspecÜ  s   € Ø�z‰z×)Ñ)Ó+Ð+r   r§   )NFr   )r©   rª   r«   r¬   r   rÎ   rÚ   rÜ   rá   rS   r1   r?   rC   r½   r¾   s   @r   rÀ   rÀ   O  sB   ø„ ñõ2ð, +/ô $óó2ð2 À$ô  òD òò ö,r   rÀ   c	                 ó¤  — ||z  }	||z  }
t        |«      }|j                  \  }}|j                  \  }}t        j                  g |¢d‘«      }d|d |…df<   ||dd d…f<   g | ¢|	|j	                  «       z
  ‘}t        j
                  j                  ||«      �^ }}||
kD  r|
|z
  |z  }t        j                  dg||z  |z   ¢«      }|d   |d   z
  |z  }|d   \  }}|d   |z  |z   |z  }t        j                  j                  | |||«      }t        j                  j                  | |||«      }|j                  ||«      j                  \  }}||||fS )Nr   ru   )r<   ÚTr    Údiagr^   ÚlinalgÚsolvere   r7   r8   rz   r{   r|   )r€   r�   r‚   rF   Úsummed_widthsÚequal_heightsr~   r   r   Útotal_widthÚ
max_heightÚnÚeq_relsÚeq_abssÚsm_relsÚsm_abssÚAÚBÚkarrayÚheightr‡   r‰   Úh0_relÚh0_absrŠ   r‹   rŒ   r�   rŽ   s                                r   rk   rk   ã  s  € à˜!‘)€KØ˜‘€Jô 	ˆMÓ€AØ$—‘Ñ€GˆWØ$—‘Ñ€GˆWÜ
�‰��'�˜1�Ó€AØ€A€b€q€bˆ"€f�IØ€A€bˆ#ˆ2ˆ#€g�JØ2ˆGˆ8Ð2�k G§K¡K£MÑ1Ð2€Aô
 —i‘i—o‘o a¨Ó+�O€VˆVØ�
ÒØ˜wÑ&¨'Ñ1ˆô 
�‰�AÐ5˜ 6Ñ)¨GÑ3Ð5Ó	6€BØ
ˆR‰&�2�a‘5‰.˜EÑ	!€BØ" 1Ñ%�N€FˆFØ
�‰)�FÑ
˜VÑ
# uÑ	,€BÜ	×	Ñ	×	%Ñ	% a¨¨A¨qÓ	1€BÜ
×
Ñ
×
&Ñ
& q¨!¨R°Ó
4€CØ�\‰\˜& "Ó%×(Ñ(�F€Bˆàˆr�2�rˆ>Ðr   c                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )ÚHBoxDividerzÆ
    A `.SubplotDivider` for laying out axes horizontally, while ensuring that
    they have equal heights.

    Examples
    --------
    .. plot:: gallery/axes_grid1/demo_axes_hbox_divider.py
    c                 ó(   •— t         ‰| �  |d|d«      S )a‘  
        Create an axes locator callable for the specified cell.

        Parameters
        ----------
        nx, nx1 : int
            Integers specifying the column-position of the
            cell. When *nx1* is None, a single *nx*-th column is
            specified. Otherwise, location of columns spanning between *nx*
            to *nx1* (but excluding *nx1*-th column) is specified.
        r   ©r³   rs   )r   rl   rn   r·   s      €r   rs   zHBoxDivider.new_locator  s   ø€ ô ‰wÑ" 2 q¨#¨qÓ1Ð1r   c                 óö  — || j                   z  }|| j                   z  }| j                  j                  j                  | j                  j                  z  \  }}| j                  ||«      \  }	}
}}| j                  |«      }| j                  |«      }t        |	|
||||||| j                  «       «	      \  }}}}|€d}|||   |z  z   ||   ||   z
  |z  }}||}}t        j                  j                  ||||«      S ©Nru   )r   r
   rv   rw   rx   r\   r'   r+   rk   r?   r7   r8   rz   )r   rl   rm   rn   ro   r}   r%   r~   r   r€   r�   r‚   rF   Ú	summed_wsÚequal_hsr�   rŽ   r‡   rŠ   r�   r�   r‘   r’   s                          r   rk   zHBoxDivider._locate  s  € à
ˆd�o‰oÑˆØˆt�‰ÑˆØ—y‘y—~‘~×*Ñ*¨T¯Y©Y¯]©]Ñ:‰ˆˆuØ×.Ñ.¨t°XÓ>‰
ˆˆ1ˆa�Ø×-Ñ-¨hÓ7ˆ	Ø×*Ñ*¨8Ó4ˆÜ Øˆq�!�Q˜	 8¨U°E¸4¿?¹?Ó;LóN‰ˆˆB��Bàˆ;ØˆCØ�b˜‘f˜u‘nÑ$ r¨#¡w°°B±Ñ'7¸5Ñ&@ˆBˆØ�RˆBˆÜ×Ñ×+Ñ+¨B°°B¸Ó;Ð;r   r   ©r©   rª   r«   r¬   rs   rk   r½   r¾   s   @r   rü   rü     s   ø„ ñõ2ö<r   rü   c                   ó*   ‡ — e Zd ZdZdˆ fd„	Zd„ Zˆ xZS )ÚVBoxDividerzm
    A `.SubplotDivider` for laying out axes vertically, while ensuring that
    they have equal widths.
    c                 ó(   •— t         ‰| �  d|d|«      S )a…  
        Create an axes locator callable for the specified cell.

        Parameters
        ----------
        ny, ny1 : int
            Integers specifying the row-position of the
            cell. When *ny1* is None, a single *ny*-th row is
            specified. Otherwise, location of rows spanning between *ny*
            to *ny1* (but excluding *ny1*-th row) is specified.
        r   rþ   )r   rm   ro   r·   s      €r   rs   zVBoxDivider.new_locator3  s   ø€ ô ‰wÑ" 1 b¨!¨SÓ1Ð1r   c                 óö  — || j                   z  }|| j                   z  }| j                  j                  j                  | j                  j                  z  \  }}| j                  ||«      \  }	}
}}| j                  |«      }| j                  |«      }t        |
|	||||||| j                  «       «	      \  }}}}|€d}||}}|||   |z  z   ||   ||   z
  |z  }}t        j                  j                  ||||«      S r   )r   r
   rv   rw   rx   r\   r+   r'   rk   r?   r7   r8   rz   )r   rl   rm   rn   ro   r}   r%   r~   r   r€   r�   r‚   rF   Ú	summed_hsÚequal_wsrŽ   r�   rˆ   r‰   r�   r�   r‘   r’   s                          r   rk   zVBoxDivider._locateA  s  € à
ˆd�o‰oÑˆØˆt�‰ÑˆØ—y‘y—~‘~×*Ñ*¨T¯Y©Y¯]©]Ñ:‰ˆˆuØ×.Ñ.¨t°XÓ>‰
ˆˆ1ˆa�Ø×+Ñ+¨HÓ5ˆ	Ø×,Ñ,¨XÓ6ˆÜ Øˆq�!�Q˜	 8¨U°E¸4¿?¹?Ó;LóN‰ˆˆB��Bàˆ;ØˆCØ�RˆBˆØ�b˜‘f˜u‘nÑ$ r¨#¡w°°B±Ñ'7¸5Ñ&@ˆBˆÜ×Ñ×+Ñ+¨B°°B¸Ó;Ð;r   r   r  r¾   s   @r   r  r  -  s   ø„ ñõ
2ö<r   r  c                 ód   — t        | «      }|j                  dd¬«      }| j                  |«       |S )Nr   rÒ   )rÀ   rs   r×   )r}   Údividerrr   s      r   Úmake_axes_locatabler  R  s4   € Ü˜$Ó€GØ×!Ñ! Q¨1Ð!Ó-€GØ×Ñ˜'Ô"à€Nr   c                 óV   — |€g d¢}t        | «      }|€| }|j                  |||¬«       y)aG  
    Add auto-adjustable padding around *ax* to take its decorations (title,
    labels, ticks, ticklabels) into account during layout, using
    `.Divider.add_auto_adjustable_area`.

    By default, padding is determined from the decorations of *ax*.
    Pass *use_axes* to consider the decorations of other Axes instead.
    Nr”   )r¡   r¢   r£   )r  r¥   )r[   r¡   r¢   r£   r  s        r   Úmake_axes_area_auto_adjustabler  Z  s>   € ð ÐÚ8ˆÜ! "Ó%€GØÐØˆØ×$Ñ$¨h¸CØ1<ð %õ >r   )Nr¨   N)r¬   ri   Únumpyr    Ú
matplotlibrÓ   r   Úmatplotlib.gridspecr   Úmatplotlib.transformsÚ
transformsr7   Ú r   rŸ   r   r¯   rÀ   rk   rü   r  r  r  rB   r   r   ú<module>r     s}   ðñó ã ã Ý Ý +Ý +Ý ÷HNñ HNôV1A�Wô 1AôhN,�'ô N,òhôB&<�.ô &<ôR"<�.ô "<òJð 15ô>r   