
    G8cb                         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	      Z G d
 d      Z G d de      Z G d de      Zd Zd 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)SubplotBase)SubplotSpec   )	axes_sizec                       e Zd ZdZ	 ddZd Zd Z ej                  d      d        Z	e
d        Ze
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ddZd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
            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anchors          F/usr/lib/python3/dist-packages/mpl_toolkits/axes_grid1/axes_divider.py__init__zDivider.__init__   sP    ( 		%!    c                 f    | j                         D cg c]  }|j                  |       c}S c c}w N)get_horizontalget_sizer   rendererss      r   get_horizontal_sizeszDivider.get_horizontal_sizes:   s(    .2.A.A.CD

8$DDD   .c                 f    | j                         D cg c]  }|j                  |       c}S c c}w r    )get_verticalr"   r#   s      r   get_vertical_sizeszDivider.get_vertical_sizes=   s(    .2.?.?.AB

8$BBBr'   3.5c                     t        j                  | j                               }t        j                  | j                               }||fS r    )SizeAddListr)   r!   )r   vsizehsizes      r   get_vsize_hsizezDivider.get_vsize_hsize@   s:    T..01T0023e|r   c                 T    d\  }}| D ]  \  }}||z  }||z  } |dk7  r
||z
  |z  }|S y)N)        r3   r3    )l
total_sizers_sumas_sum_rs_asks          r   _calc_kzDivider._calc_kF   sR       	HCcMFcMF	 R<f$.AHr   c                 Z    dg}| D ]"  \  }}|j                  |d   ||z  z   |z          $ |S Nr3   )append)r5   r;   offsetsr9   r:   s        r   _calc_offsetszDivider._calc_offsetsU   s?    $ 	6HCNN72;Q.45	6r   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_position\   s     	r   c                     | j                   S )z%Return the position of the rectangle.rD   r   s    r   get_positionzDivider.get_positiong   s    yy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_anchork   sa     fc"{//55fE  FUDM2c&kQ6F;<<r   c                     | j                   S )zReturn the anchor.)r   rG   s    r   
get_anchorzDivider.get_anchor       ||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_horizontal   s     r   c                     | j                   S )zReturn horizontal sizes.rY   rG   s    r   r!   zDivider.get_horizontal   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_vertical   s     r   c                     | j                   S )zReturn vertical sizes.r^   rG   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.rc   rG   s    r   
get_aspectzDivider.get_aspect   rW   r   c                     || _         y r    r   )r   r   s     r   set_locatorzDivider.set_locator   s	     r   c                     | j                   S r    ri   rG   s    r   get_locatorzDivider.get_locator   s    }}r   c                 r    | j                   | j                         S | j                  ||      j                  S r    )r   rH   bounds)r   axr$   s      r   get_position_runtimezDivider.get_position_runtime   s2    == $$&&==X.555r   c                 H   | j                   j                  j                  | j                   j                  z  \  }}| j	                  ||      \  }	}
}}| j                  |      }| j                  |      }| j                  |||z        }| j                  |||z        }| j                         rt        ||      }| j                  ||      }| j                  ||      }|d   |d   z
  |z  }|d   |d   z
  |z  }t        j                  j                  |	|
||      }t        j                  j                  |	|
||      }|j                  | j                         |      j                   \  }}n(| j                  ||      }| j                  ||      }|	|
}}|t#        j$                  dd       |dz   }|t#        j$                  dd       |dz   }|||   |z  z   ||   ||   z
  |z  }}|||   |z  z   ||   ||   z
  |z  }}t        j                  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, the
            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
        r?   r   r+   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dpirp   r&   r*   r<   rg   minrB   rN   rO   from_boundsanchoredrV   p0r   warn_deprecated)r   nxnynx1ny1axesr$   fig_wfig_hxywrZ   hsizesvsizesk_hk_vr;   oxoywwhhpbpb1x0y0x1w1y1h1s                                 r   locatezDivider.locate   s0    yy~~**TYY]]:u..tX>
1a**84((2ll6519-ll6519-??CA##FA.B##FA.BR&2a5.E)BR&2a5.E)B!!--aAq9B""..q!R<C\\$//"3R8;;FB ##FC0B##FC0BB;    34 q&C;    34 q&Cbfun$r#wB'75&@Bbfun$r#wB'75&@B++BB;;r   c                 D    t        | ||||n|dz   ||      S |dz         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.
        r   AxesLocator)r   r~   r   r   r   s        r   new_locatorzDivider.new_locator   s?     "b?CQ?C0 	0 )+Q0 	0r   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   rM   r   insertr   r@   r   r   )r   r   rw   s      r   append_sizezDivider.append_size  s    =$,	.v##At,OOq O ##D)!NN!!!T*OOq ONN!!$'r   c                 p    |g d}|D ]+  }| j                  |t        j                  ||      |z          - y)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-   _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NNNNNN)皙?N)__name__
__module____qualname____doc__r   r&   r*   r   
deprecatedr1   staticmethodr<   rB   rE   rH   r   rV   r[   r!   r`   r)   re   rg   rj   rl   rp   r   r   r   r   r4   r   r   r	   r	      s    	 &)>EC T__U 
    	( !67<r0&(Nr   r	   c                   $    e Zd ZdZddZd Zd Zy)r   z`
    A callable object which returns the position and size of a given
    AxesDivider cell.
    Nc                    || _         |j                  }|j                  }||z
  ||z
  c| _        | _        |t        j                  dd       |dz   }|t        j                  dd       |dz   }||z
  | _        ||z
  | _        y)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+   rr   rs   r   ru   )	_axes_dividerr   r   _nx_nyr   r}   _nx1_ny1)r   axes_dividerr~   r   r   r   r   r   s           r   r   zAxesLocator.__init__)  s     *!,,
!,,
*_b:o$(;    34 q&C;    34 q&C*$	*$	r   c                    | j                   j                  }| j                   j                  }| j                   j                  | j                  |z   | j
                  |z   | j                  |z   | j                  |z   ||      S r    )r   r   r   r   r   r   r   r   )r   r   r$   r   r   s        r   __call__zAxesLocator.__call__M  sr    ''22
''22
!!((J)>)-J)>)-Z)?)-Z)?)-)13 	3r   c                 d    t        | j                  d      r| j                  j                         S y Nget_subplotspec)hasattrr   r   rG   s    r   r   zAxesLocator.get_subplotspecY  s+    4%%'89%%5577r   r   )r   r   r   r   r   r   r   r4   r   r   r   r   #  s    
"%H
3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)).
        )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__e  sR    " l$.$4"x~2 &v 	 	7 	[;;CFGr   c                 h    | j                         j                  | j                        j                  S )z%Return the bounds of the subplot box.)r   rH   r   rn   rG   s    r   rH   zSubplotDivider.get_position|  s&    ##%224;;?FFFr   c                     | j                   S )zGet the SubplotSpec instance.)_subplotspecrG   s    r   r   zSubplotDivider.get_subplotspec  s       r   c                 f    || _         | j                  |j                  | j                               y)zSet the SubplotSpec instance.N)r   rE   rH   r   )r   subplotspecs     r   r   zSubplotDivider.set_subplotspec  s'    '+224;;?@r   )	r   r   r   r   r   rH   r   r   __classcell__r   s   @r   r   r   `  s+     /3TSH.G!Ar   r   c                        e Zd ZdZd fd	ZdddZddZddZ ej                  dd	d
      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   xrefyrefr   s       r   r   zAxesDivider.__init__  sw     
<D)DJDJ<D)DJDJT__.D%)ZZLDJJ< $S 	 	2r   )
axes_classc                    | j                   }|(t        |t              r|j                  }nt	        |      } ||j                         |j                  d      fi |S NT)original)r   rK   r   _axes_classtyper   rH   )r   r   kwargsr   s       r   _get_new_axeszAxesDivider._get_new_axes  s]    zz$,!--
!$Z
$//+T->->->-M $"$ 	$r   c                 \   | t         j                  d   | j                  z  }|rt        |t        j
                        s!t	        j                  || j                        }|r2| j                  j                  d|       | xj                  dz  c_	        n| j                  j                  |       t        |t        j
                        s!t	        j                  || j                        }|rO| j                  j                  d|       | xj                  dz  c_	        | j                  d| j                        }nN| j                  j                  |       | j                  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.wspacefraction_refr   r   r~   r   r4   )mplrcParamsr   rK   r-   _Basefrom_anyr   r   r   r@   r   r   rS   r   set_axes_locatorr   rw   r   
pack_startr   locatorro   s          r   new_horizontalzAxesDivider.new_horizontal  sN    ;,,67$**DCc4::.mmCdjjA  ''3/1$  '',$

+==DJJ?D##At,OOq O&&!&@G##D)&&t''(1, ' BGT)&)
G$	r   c                 \   | t         j                  d   | j                  z  }|rt        |t        j
                        s!t	        j                  || j                        }|r2| j                  j                  d|       | xj                  dz  c_	        n| j                  j                  |       t        |t        j
                        s!t	        j                  || j                        }|rO| j                  j                  d|       | xj                  dz  c_	        | j                  | j                  d      }nN| j                  j                  |       | j                  | j                  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   r4   )r   r   r   rK   r-   r   r   r   r   r   r@   r   r   rS   r   r   r   s          r   new_verticalzAxesDivider.new_vertical  sD    ;,,67$**DCc4::.mmCdjjA%%a-1$%%c*$

+==DJJ?DNN!!!T*OOq O&&$//a&@GNN!!$'&&??s4>>':Q'> ' @GT)&)
G$	r   r+   add_to_figurezax.remove())alternativec                    t        j                  | j                  df| j                  df| j                  df| j                  dfd|      \  }} |||f||d|}	|r| 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   r   create_axesr   ro   s
             r   append_axeszAxesDivider.append_axes  s    0 #'"4"4(($/))51(($/%%u-	6

 #Z #O",OGMOIIr"	r   c                 t    | j                   !| j                  j                         }|dk(  ryy| j                   S )NautoFT)r   r   rg   rd   s     r   rg   zAxesDivider.get_aspect  s6    <<ZZ**,F<<r   c                     | j                   (| j                  j                  d      }|j                  S | j                   S r   )r   r   rH   rn   )r   rv   s     r   rH   zAxesDivider.get_position  s7    99::**D*9D;;99r   c                 f    | j                   | j                  j                         S | j                   S r    )r   r   rV   rG   s    r   rV   zAxesDivider.get_anchor$  s)    <<::((**<<r   c                 d    t        | j                  d      r| j                  j                         S y r   )r   r   r   rG   s    r   r   zAxesDivider.get_subplotspec*  s'    4::01::--//r   r   )NF)NT)r   r   r   r   r   r   r   r   r   delete_parameterr   rg   rH   rV   r   r   r   s   @r   r   r     sf    2, +/ $@@ T5/}M!#! N!F  r   r   c                    t        |      }t        j                  |      j                  \  }}t        j                  |       j                  \  }}t        j                  |dz   |dz   f      }	t        j                  |dz         }
t        j
                  |	d |d |f   |       d|	d |df<   ||	dd df<   | |
d | |t        |      z
  |
d<   t        j                  j                  |	|
      }|d d }|d   }||kD  r||z
  |z  }|S )Nr   r?   )	rS   npasarrayTzerosfill_diagonalsumlinalgsolve)summed_widthsequal_heightstotal_width
max_heightneq_rseq_assm_rssm_asABkarray_and_heightkarrayheights                 r   _determine_karrayr  4  s   MA::m,..LE5::m,..LE5
!a%Q A
QAQrr2A2vY&Abqb"fIAb#2#gJFAbqE#e*$AbE
 		1-s#Fr"F
u$-Mr   c                 t    dg}t        | |      D ]%  \  \  }}}|j                  |d   ||z  z   |z          ' |S r>   )zipr@   )summed_sizesr  rA   rar;   s         r   rB   rB   L  sJ    dGv. .	Awr{QqS(1,-.Nr   c	                 ^   t        ||||z  ||z        }	t        ||	      }
|
d   |
d   z
  |z  }|d   \  }}|	d   |z  |z   |z  }t        j                  j	                  | |||      }t        j                  j	                  | |||      }|j                  ||      j                  \  }}|||
|fS )N)r  r  r?   r   )r  rB   rN   rO   rz   r{   r|   )r   r   r   rZ   r  r  r   r   r   r  r   r   h0_rh0_ar   r   r   r   r   s                      r   _locater&  T  s    }AI%!)5F 
}f	-B
R&2a5.E	!Bq!JD$
)D.4
5	(B				%	%aAq	1B



&
&q!R
4C\\&"%((FBr2r>r   c                        e Zd ZdZddZddZy)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                 8    t        | |d||d      S |dz   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   r   r   )r   r~   r   s      r   r   zHBoxDivider.new_locatorn  s)     4QsANNBFANNr   c                    | j                   j                  j                  | j                   j                  z  \  }}| j	                  ||      \  }	}
}}| j                  |      }| j                  |      }t        |	|
||||||| j                         	      \  }}}}|t        j                  dd       |dz   }|||   |z  z   ||   ||   z
  |z  }}||}}t        j                  j                  ||||      S )Nr+   rr   rs   r   )r   rv   rw   rx   rp   r&   r*   r&  rV   r   r}   rN   rO   rz   )r   r~   r   r   r   r   r$   r   r   r   r   r   rZ   	summed_wsequal_hsr   r   r   r   r   r   r   r   s                          r   r   zHBoxDivider.locate|  s   yy~~**TYY]]:u..tX>
1a--h7	**84 q!Q	8UE4??;LNBB;    34 q&Cbfun$r#wB'75&@BRB++BB;;r   r    r   r   r   r   r   r   r   r4   r   r   r(  r(  d  s    O<r   r(  c                        e Zd ZdZddZddZy)VBoxDividerzl
    A `SubplotDivider` for laying out axes vertically, while ensuring that they
    have equal widths.
    Nc                 6    t        | d|d||      S |dz         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   r   )r   r   r   s      r   r   zVBoxDivider.new_locator  s'     4B#/3NNrAvNNr   c                    | j                   j                  j                  | j                   j                  z  \  }}| j	                  ||      \  }	}
}}| j                  |      }| j                  |      }t        |
|	||||||| j                         	      \  }}}}|t        j                  dd       |dz   }||}}|||   |z  z   ||   ||   z
  |z  }}t        j                  j                  ||||      S )Nr+   ru   rs   r   )r   rv   rw   rx   rp   r*   r&   r&  rV   r   r}   rN   rO   rz   )r   r~   r   r   r   r   r$   r   r   r   r   r   rZ   	summed_hsequal_wsr   r   r   r   r   r   r   r   s                          r   r   zVBoxDivider.locate  s   yy~~**TYY]]:u..tX>
1a++H5	,,X6 q!Q	8UE4??;LNBB;    34 q&CRBbfun$r#wB'75&@B++BB;;r   r    r   r-  r4   r   r   r/  r/    s    
O<r   r/  c                 d    t        |       }|j                  dd      }| j                  |       |S )Nr   r   )r   r   r   )r   dividerr   s      r   make_axes_locatabler6    s4    $G!!Q1!-G'"Nr   c                 V    |g d}t        |       }|| }|j                  |||       y)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   )r6  r   )ro   r   r   r   r5  s        r   make_axes_area_auto_adjustabler8    s>     8!"%G$$hC1< % >r   )Nr   N)r   numpyr  
matplotlibr   r   matplotlib.axesr   matplotlib.gridspecr   matplotlib.transforms
transformsrN    r   r-   r	   r   r   r   r  rB   r&  r(  r/  r6  r8  r4   r   r   <module>r@     s       ' + + QN QNh: :z'AW 'ATd' dT0 (<. (<V$<. $<N 15>r   