U
    d»{j�b  ã                   @   sÚ   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 G dd	„ d	ƒZG d
d„ dƒZG dd„ deƒZG dd„ deƒZdd„ Zdd„ Zdd„ ZG dd„ deƒZG dd„ deƒZdd„ Zddd„ZdS ) zJ
Helper classes to adjust the positions of multiple axes at drawing time.
é    N)Ú_api)ÚSubplotBase)ÚSubplotSpecé   )Ú	axes_sizec                   @   sä   e Zd ZdZd5dd„Zdd„ Zdd	„ Ze d
¡dd„ ƒZ	e
dd„ ƒZe
dd„ ƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd6d"d#„Zd$d%„ Zd&d'„ Zd(d)„ Zd*d+„ Zd7d,d-„Zd8d.d/„Zd0d1„ Zd9d3d4„ZdS ):Ú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.
    NÚCc                 C   sD   || _ || _|| _|| _|| _|  |¡ || _d| _d| _d| _	dS )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
            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'}
            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Úanchor© r   úc/var/www/html/bwave/python/venv/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/axes_divider.pyÚ__init__   s    
zDivider.__init__c                    s   ‡ fdd„|   ¡ D ƒS )Nc                    s   g | ]}|  ˆ ¡‘qS r   ©Úget_size©Ú.0Ús©Úrendererr   r   Ú
<listcomp>;   s     z0Divider.get_horizontal_sizes.<locals>.<listcomp>)Úget_horizontal©r   r#   r   r"   r   Úget_horizontal_sizes:   s    zDivider.get_horizontal_sizesc                    s   ‡ fdd„|   ¡ D ƒS )Nc                    s   g | ]}|  ˆ ¡‘qS r   r   r   r"   r   r   r$   >   s     z.Divider.get_vertical_sizes.<locals>.<listcomp>)Úget_verticalr&   r   r"   r   Úget_vertical_sizes=   s    zDivider.get_vertical_sizesú3.5c                 C   s$   t  |  ¡ ¡}t  |  ¡ ¡}||fS ©N)ÚSizeZAddListr(   r%   )r   ZvsizeZhsizer   r   r   Úget_vsize_hsize@   s    zDivider.get_vsize_hsizec                 C   sF   d\}}| D ]\}}||7 }||7 }q|dkr>|| | }|S dS d S )N)ç        r.   r.   r   )ÚlZ
total_sizeZrs_sumZas_sumÚ_rsÚ_asÚkr   r   r   Ú_calc_kF   s    
zDivider._calc_kc                 C   s2   dg}| D ]"\}}|  |d ||  | ¡ q
|S ©Nr.   éÿÿÿÿ)Úappend)r/   r2   Úoffsetsr0   r1   r   r   r   Ú_calc_offsetsU   s    zDivider._calc_offsetsc                 C   s
   || _ dS )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   r   r   r   Úset_position\   s    	zDivider.set_positionc                 C   s   | j S )z%Return the position of the rectangle.r9   ©r   r   r   r   Úget_positiong   s    zDivider.get_positionc                 C   sJ   t |tƒrtjtjj|d� n"t |ttfƒr8t	|ƒdkr@t
dƒ‚|| _dS )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ÚBboxZcoefsÚtupleÚlistÚlenÚ	TypeErrorr   )r   r   r   r   r   r   k   s
    
zDivider.set_anchorc                 C   s   | j S )zReturn the anchor.)r   r;   r   r   r   Ú
get_anchor   s    zDivider.get_anchorc                 C   s
   || _ dS )z—
        Parameters
        ----------
        h : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
            sizes for horizontal division
        N©r   )r   Úhr   r   r   Úset_horizontalƒ   s    zDivider.set_horizontalc                 C   s   | j S )zReturn horizontal sizes.rH   r;   r   r   r   r%   Œ   s    zDivider.get_horizontalc                 C   s
   || _ dS )z•
        Parameters
        ----------
        v : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`
            sizes for vertical division
        N©r   )r   Úvr   r   r   Úset_vertical�   s    zDivider.set_verticalc                 C   s   | j S )zReturn vertical sizes.rK   r;   r   r   r   r(   ™   s    zDivider.get_verticalFc                 C   s
   || _ dS )zE
        Parameters
        ----------
        aspect : bool
        N©r   ©r   r   r   r   r   Ú
set_aspect�   s    zDivider.set_aspectc                 C   s   | j S )zReturn aspect.rN   r;   r   r   r   Ú
get_aspect¥   s    zDivider.get_aspectc                 C   s
   || _ d S r+   ©r   )r   r   r   r   r   Úset_locator©   s    zDivider.set_locatorc                 C   s   | j S r+   rR   r;   r   r   r   Úget_locator¬   s    zDivider.get_locatorc                 C   s$   | j d kr|  ¡ S |   ||¡jS d S r+   )r   r<   Úbounds)r   Úaxr#   r   r   r   Úget_position_runtime¯   s    
zDivider.get_position_runtimec                 C   s¬  | j jj| j j \}}|  ||¡\}	}
}}|  |¡}|  |¡}|  ||| ¡}|  ||| ¡}|  ¡ rìt	||ƒ}|  
||¡}|  
||¡}|d |d  | }|d |d  | }tj |	|
||¡}tj |	|
||¡}| |  ¡ |¡j\}}n"|  
||¡}|  
||¡}|	|
 }}|dk�r.tjddd� |d }|dk�rNtjddd� |d }||| |  || ||  |  }}||| |  || ||  |  }}tj ||||¡S )	a¾  
        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.
        axes
        renderer
        r5   r   Nr*   ú‡Support for passing nx1=None to mean nx+1 is deprecated since %(since)s; in a future version, nx1=None will mean 'up to the last cell'.©Úmessager   ú‡Support for passing ny1=None to mean ny+1 is deprecated since %(since)s; in a future version, ny1=None will mean 'up to the last cell'.)r	   ÚbboxÚsizeÚdpirW   r'   r)   r3   rQ   Úminr8   rA   rB   Úfrom_boundsÚanchoredrG   Úp0r   Úwarn_deprecated)r   ÚnxÚnyÚnx1Úny1Úaxesr#   Úfig_wÚfig_hÚxÚyÚwrI   ZhsizesZvsizesZk_hZk_vr2   ÚoxÚoyÚwwÚhhÚpbÚpb1Úx0Úy0Úx1Úw1Úy1Úh1r   r   r   Úlocateµ   sB    




 ÿ
 ÿ&&zDivider.locatec                 C   s0   t | |||dk	r|n|d |dk	r&|n|d ƒS )aÜ  
        Return a new `AxesLocator` 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.
        Nr   ©ÚAxesLocator)r   rd   re   rf   rg   r   r   r   Únew_locatorî   s      ýzDivider.new_locatorc                 C   sˆ   t jddddg|d� |dkr<| j d|¡ |  jd7  _nH|dkrR| j |¡ n2|dkrx| j d|¡ |  jd7  _n| j |¡ d S )NÚleftÚrightÚbottomÚtop©Úpositionr   r   )r   r@   r   Úinsertr   r6   r   r   )r   rƒ   r]   r   r   r   Úappend_size  s    ÿzDivider.append_sizeçš™™™™™¹?c                 C   s:   |dkrddddg}|D ]}|   |t ||¡| ¡ qdS )a  
        Add auto-adjustable padding around *use_axes* to take their decorations
        (title, labels, ticks, ticklabels) into account during layout.

        Parameters
        ----------
        use_axes : `~.axes.Axes` or list of `~.axes.Axes`
            The Axes whose decorations are taken into account.
        pad : float, optional
            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   r€   r�   )r…   r,   Z_AxesDecorationsSize)r   Úuse_axesÚpadÚadjust_dirsÚdr   r   r   Úadd_auto_adjustable_area  s    z Divider.add_auto_adjustable_area)Nr   )F)NNNN)NN)r†   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r'   r)   r   Ú
deprecatedr-   Ústaticmethodr3   r8   r:   r<   r   rG   rJ   r%   rM   r(   rP   rQ   rS   rT   rW   rz   r}   r…   r‹   r   r   r   r   r      s:      ÿ



		

9
r   c                   @   s*   e Zd ZdZd	dd„Zdd„ Zdd„ ZdS )
r|   z`
    A callable object which returns the position and size of a given
    AxesDivider cell.
    Nc                 C   s|   || _ |j}|j}|| ||  | _| _|dkrFtjddd� |d }|dkrdtjddd� |d }|| | _|| | _dS )aÃ  
        Parameters
        ----------
        axes_divider : AxesDivider
        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.
        Nr*   rX   rY   r   r[   )	Ú_axes_dividerr   r   Ú_nxÚ_nyr   rc   Ú_nx1Ú_ny1)r   Zaxes_dividerrd   re   rf   rg   r   r   r   r   r   r   )  s$     ÿ ÿ
zAxesLocator.__init__c                 C   s>   | j j}| j j}| j  | j| | j| | j| | j| ||¡S r+   )r’   r   r   rz   r“   r”   r•   r–   )r   rh   r#   r   r   r   r   r   Ú__call__M  s    ûzAxesLocator.__call__c                 C   s   t | jdƒr| j ¡ S d S d S ©NÚget_subplotspec)Úhasattrr’   r™   r;   r   r   r   r™   Y  s    
zAxesLocator.get_subplotspec)NN)rŒ   r�   rŽ   r�   r   r—   r™   r   r   r   r   r|   #  s   
$r|   c                       sD   e Zd ZdZdddddœ‡ fdd„
Zdd„ Zd	d
„ Zdd„ Z‡  ZS )ÚSubplotDividerzT
    The Divider class whose rectangle area is specified as a subplot geometry.
    Nr   ©r   r   r   r   c                   sD   || _ tƒ j|ddddg|pg |p$g ||d� |  t ||¡¡ dS )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)).
        r   r   rœ   N)ÚfigureÚsuperr   Úset_subplotspecr   Z_from_subplot_args)r   r   r   r   r   r   Úargs©Ú	__class__r   r   r   e  s      þzSubplotDivider.__init__c                 C   s   |   ¡  | j¡jS )z%Return the bounds of the subplot box.)r™   r<   r�   rU   r;   r   r   r   r<   |  s    zSubplotDivider.get_positionc                 C   s   | j S )zGet the SubplotSpec instance.)Ú_subplotspecr;   r   r   r   r™   €  s    zSubplotDivider.get_subplotspecc                 C   s   || _ |  | | j¡¡ dS )zSet the SubplotSpec instance.N)r£   r:   r<   r�   )r   Zsubplotspecr   r   r   rŸ   „  s    zSubplotDivider.set_subplotspec)	rŒ   r�   rŽ   r�   r   r<   r™   rŸ   Ú__classcell__r   r   r¡   r   r›   `  s    ÿr›   c                       s„   e Zd ZdZd‡ fdd„	Zddœdd„Zdd	d
„Zddd„Zej	dddd�dddœdd„ƒZ
dd„ Zdd„ Zdd„ Zdd„ Z‡  ZS ) ÚAxesDividerz0
    Divider based on the preexisting axes.
    Nc                    sf   || _ |dkrt |¡| _n|| _|dkr8t |¡| _n|| _tƒ j| ¡ d| jg| jgddd� dS )zw
        Parameters
        ----------
        axes : :class:`~matplotlib.axes.Axes`
        xref
        yref
        Nr   )r   r   r   r   r   r   )	Ú_axesr,   ZAxesXÚ_xrefZAxesYÚ_yrefrž   r   Ú
get_figure)r   rh   ZxrefZyrefr¡   r   r   r   �  s      þzAxesDivider.__init__)Ú
axes_classc                K   sB   | j }|d kr(t|tƒr |j}nt|ƒ}|| ¡ |jdd�f|ŽS ©NT)Úoriginal)r¦   r>   r   Z_axes_classÚtyper©   r<   )r   rª   Úkwargsrh   r   r   r   Ú_get_new_axes¥  s    
ÿzAxesDivider._get_new_axesFc                 K   sô   |dkrt jd | j }|rft|tjƒs8tj|| jd�}|rZ| j d|¡ |  j	d7  _	n| j 
|¡ t|tjƒs‚tj|| jd�}|r´| j d|¡ |  j	d7  _	| jd| jd�}n&| j 
|¡ | jt| jƒd | jd�}| jf |Ž}| |¡ |S )z³
        Helper method for ``append_axes("left")`` and ``append_axes("right")``.

        See the documentation of `append_axes` for more details.

        :meta private:
        Nzfigure.subplot.wspace©Zfraction_refr   r   ©rd   re   )ÚmplÚrcParamsr§   r>   r,   Ú_BaseÚfrom_anyr   r„   r   r6   r}   r   rE   r¯   Úset_axes_locator©r   r]   rˆ   Ú
pack_startr®   ÚlocatorrV   r   r   r   Únew_horizontal¯  s.     ÿ
zAxesDivider.new_horizontalc                 K   sô   |dkrt jd | j }|rft|tjƒs8tj|| jd�}|rZ| j d|¡ |  j	d7  _	n| j 
|¡ t|tjƒs‚tj|| jd�}|r´| j d|¡ |  j	d7  _	| j| jdd�}n&| j 
|¡ | j| jt| jƒd d�}| jf |Ž}| |¡ |S )z³
        Helper method for ``append_axes("top")`` and ``append_axes("bottom")``.

        See the documentation of `append_axes` for more details.

        :meta private:
        Nzfigure.subplot.hspacer°   r   r   r±   )r²   r³   r¨   r>   r,   r´   rµ   r   r„   r   r6   r}   r   rE   r¯   r¶   r·   r   r   r   Únew_verticalÏ  s.     ÿ
zAxesDivider.new_verticalr*   Úadd_to_figurezax.remove())ÚalternativeTc          
      K   s`   t j| jdf| jdf| jdf| jdfdœ|d�\}}|||f||dœ|—Ž}	|r\| 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.
        TF)r~   r   r€   r�   r‚   )r¸   rª   )r   Zcheck_getitemrº   r»   r	   Zadd_axes)
r   rƒ   r]   rˆ   r¼   rª   r®   Zcreate_axesr¸   rV   r   r   r   Úappend_axesï  s(    üû
 ÿ ÿÿzAxesDivider.append_axesc                 C   s0   | j d kr&| j ¡ }|dkr dS dS n| j S d S )NÚautoFT)r   r¦   rQ   rO   r   r   r   rQ     s    

zAxesDivider.get_aspectc                 C   s(   | j d kr| jjdd�}|jS | j S d S r«   )r
   r¦   r<   rU   )r   r\   r   r   r   r<     s    
zAxesDivider.get_positionc                 C   s   | j d kr| j ¡ S | j S d S r+   )r   r¦   rG   r;   r   r   r   rG   $  s    

zAxesDivider.get_anchorc                 C   s   t | jdƒr| j ¡ S d S d S r˜   )rš   r¦   r™   r;   r   r   r   r™   *  s    
zAxesDivider.get_subplotspec)NN)NF)NF)NT)rŒ   r�   rŽ   r�   r   r¯   rº   r»   r   Zdelete_parameterr¾   rQ   r<   rG   r™   r¤   r   r   r¡   r   r¥   Š  s   

 
 ÿ#
r¥   c                 C   sà   t |ƒ}t |¡j\}}t | ¡j\}}t |d |d f¡}	t |d ¡}
t |	d |…d |…f |¡ d|	d |…df< ||	dd d…f< | |
d |…< |t|ƒ |
d< tj |	|
¡}|d d… }|d }||krÜ|| | }|S )Nr   r5   )	rE   ÚnpZasarrayÚTZzerosZfill_diagonalÚsumZlinalgZsolve)Úsummed_widthsÚequal_heightsÚtotal_widthÚ
max_heightÚnZeq_rsZeq_asZsm_rsZsm_asÚAÚBZkarray_and_heightÚkarrayÚheightr   r   r   Ú_determine_karray4  s     rÌ   c                 C   s<   dg}t | |ƒD ]&\\}}}| |d ||  | ¡ q|S r4   )Úzipr6   )Zsummed_sizesrÊ   r7   ÚrÚar2   r   r   r   r8   L  s    r8   c	                 C   s˜   t |||| || d�}	t||	ƒ}
|
d |
d  | }|d \}}|	d | | | }tj | |||¡}tj | |||¡}| ||¡j\}}|||
|fS )N)rÅ   rÆ   r5   r   )rÌ   r8   rA   rB   r`   ra   rb   )rk   rl   rm   rI   rÃ   rÄ   ri   rj   r   rÊ   rn   rp   Zh0_rZh0_arq   rr   rs   rt   ru   r   r   r   Ú_locateT  s      þ
rÐ   c                   @   s$   e Zd ZdZddd„Zddd„Zd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
    Nc                 C   s    t | |d|dk	r|n|d dƒS )a‹  
        Create a new `AxesLocator` 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   Nr   r{   )r   rd   rf   r   r   r   r}   n  s    zHBoxDivider.new_locatorc                 C   sÂ   | j jj| j j \}}|  ||¡\}	}
}}|  |¡}|  |¡}t|	|
|||||||  ¡ ƒ	\}}}}|d kr€t	j
ddd� |d }||| |  || ||  |  }}|| }}tj ||||¡S )Nr*   rX   rY   r   )r	   r\   r]   r^   rW   r'   r)   rÐ   rG   r   rc   rA   rB   r`   )r   rd   re   rf   rg   rh   r#   ri   rj   rk   rl   rm   rI   Z	summed_wsZequal_hsrt   ru   rn   rq   rv   rw   rx   ry   r   r   r   rz   |  s0    

        ÿ ÿ&
zHBoxDivider.locate)N)NNNN©rŒ   r�   rŽ   r�   r}   rz   r   r   r   r   rÑ   d  s   	
rÑ   c                   @   s$   e Zd ZdZddd„Zddd„ZdS )	ÚVBoxDividerzl
    A `SubplotDivider` for laying out axes vertically, while ensuring that they
    have equal widths.
    Nc                 C   s    t | d|d|dk	r|n|d ƒS )a  
        Create a new `AxesLocator` 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   Nr{   )r   re   rg   r   r   r   r}   •  s    zVBoxDivider.new_locatorc                 C   sÂ   | j jj| j j \}}|  ||¡\}	}
}}|  |¡}|  |¡}t|
|	|||||||  ¡ ƒ	\}}}}|d kr€t	j
ddd� |d }|| }}||| |  || ||  |  }}tj ||||¡S )Nr*   r[   rY   r   )r	   r\   r]   r^   rW   r)   r'   rÐ   rG   r   rc   rA   rB   r`   )r   rd   re   rf   rg   rh   r#   ri   rj   rk   rl   rm   rI   Z	summed_hsZequal_wsru   rt   ro   rp   rv   rw   rx   ry   r   r   r   rz   £  s0    

        ÿ ÿ
&zVBoxDivider.locate)N)NNNNrÒ   r   r   r   r   rÓ   �  s   
rÓ   c                 C   s$   t | ƒ}|jddd�}|  |¡ |S )Nr   r±   )r¥   r}   r¶   )rh   Údividerr¹   r   r   r   Úmake_axes_locatable¶  s    
rÕ   r†   c                 C   s<   |dkrddddg}t | ƒ}|dkr(| }|j|||d� dS )aF  
    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‹   )rV   r‡   rˆ   r‰   rÔ   r   r   r   Úmake_axes_area_auto_adjustable¾  s    
ÿrÖ   )Nr†   N)r�   ÚnumpyrÀ   Z
matplotlibr²   r   Zmatplotlib.axesr   Zmatplotlib.gridspecr   Zmatplotlib.transformsZ
transformsrA   Ú r   r,   r   r|   r›   r¥   rÌ   r8   rÐ   rÑ   rÓ   rÕ   rÖ   r   r   r   r   Ú<module>   s0     =* ++'	     ÿ