
    h|                    "   S SK JrJr  S SKJr  S SKrS SKrS SKrS SKJ	r	  S SK
Jr  S SKrS SKrS SKrS SKrS SKJrJrJrJr  S SKJr  S SKJr  S SKJrJrJr  S SK J!r"  S SK#J$r%  S SK&J'r'  S SK(J)r)  S SK*J+r,  S SK-J.r/  S SK0J1r2  S S	K3J4r4J5r5  S SK6J7r8  S SK9J:r;  S SK<J=r>  S SK?J@rA  S SKBJCrD  \R                  " \F5      rG " S
 S5      rH " S S5      rISS.S jrJ " S S5      rK\R                  " SS/05       " S S\R                  5      5       rNS rOg)    )IterableSequence)	ExitStackN)Real)
attrgetter)_apicbook
_docstring	offsetbox)_OrderedSet	_check_1dindex_of)SubplotSpec)cyclervalidate_axisbelowc                   ,    \ rS rSrSrSS.S jrS rSrg)_axis_method_wrapper#   a  
Helper to generate Axes methods wrapping Axis methods.

After ::

    get_foo = _axis_method_wrapper("xaxis", "get_bar")

(in the body of a class) ``get_foo`` is a method that forwards it arguments
to the ``get_bar`` method of the ``xaxis`` attribute, and gets its
signature and docstring from ``Axis.get_bar``.

The docstring of ``get_foo`` is built by replacing "this Axis" by "the
{attr_name}" (i.e., "the xaxis", "the yaxis") in the wrapped method's
dedented docstring; additional replacements can be given in *doc_sub*.
Ndoc_subc                l   Xl         X l        [        R                  " [	        [
        R                  U5      5      n/ U l        U(       af  SSU R                    30U=(       d    0 EnUR                  5        H6  u  pVXT;  a  U R                  R                  U5        UR                  XV5      nM8     X@l        g )Nz	this Axiszthe )	attr_namemethod_nameinspectgetdocgetattrmaxisAxis_missing_subsitemsappendreplace__doc__)selfr   r   r   dockvs          G/var/www/html/env/lib/python3.13/site-packages/matplotlib/axes/_base.py__init___axis_method_wrapper.__init__4   s    "& nnWUZZ=>"d4>>*:$;O2OG<&&--a0kk!' (     c                 8  ^ [        U R                   SU R                   35      mU4S jnUR                  Ul        X#l        UR
                   SU 3Ul        U R                  Ul        [        R                  " [        [        R                  U R                  5      5      Ul        U R                  (       aW  [        SR                  UR
                  U R                  SR!                  [#        [$        U R                  5      5      5      5      e['        XU5        g )N.c                     > T" U 5      " U0 UD6$ N )r$   argskwargs
get_methods      r(   wrapper2_axis_method_wrapper.__set_name__.<locals>.wrapperI   s    d#T4V44r+   zWThe definition of {} expected that the docstring of Axis.{} contains {!r} as substrings, )r   r   r   
__module____name____qualname__r#   r   	signaturer   r   r   __signature__r   
ValueErrorformatjoinmapreprsetattr)r$   ownernamer4   r3   s       @r(   __set_name__!_axis_method_wrapper.__set_name__C   s      4>>"2!D4D4D3E FG
	5 #--"'"4"4!5Qtf=,, !( 1 1EJJ 0 01!3 ..4f(($*:*:IIc$(:(:;</>? ? 	W%r+   )r#   r   r   r   )r8   r7   r9   __firstlineno__r#   r)   rD   __static_attributes__r0   r+   r(   r   r   #   s      ;? &r+   r   c                   $    \ rS rSrSrS rS rSrg)_TransformedBoundsLocator`   z
Axes locator for `.Axes.inset_axes` and similarly positioned Axes.

The locator is a callable object used in `.Axes.set_aspect` to compute the
Axes location depending on the renderer.
c                     Xl         X l        g)zj
*bounds* (a ``[l, b, w, h]`` rectangle) and *transform* together
specify the position of the inset Axes.
N_bounds
_transform)r$   bounds	transforms      r(   r)   "_TransformedBoundsLocator.__init__h   s    
 #r+   c                     [         R                  " [         R                  R                  " U R                  6 U R
                  UR                  SS9R                  -
  5      $ )NFroot)mtransformsTransformedBboxBboxfrom_boundsrM   rN   
get_figuretransSubfigure)r$   axrenderers      r(   __call__"_TransformedBoundsLocator.__call__p   sN     **(($,,7OObmmm7FFFH 	Hr+   rL   N)r8   r7   r9   rF   r#   r)   r]   rG   r0   r+   r(   rI   rI   `   s    $Hr+   rI   Fambiguous_fmt_datakeyc                .   SnSnSnU S;  a   [         R                  " U 5      nX#U4$ U(       a  SOSnSnU[        U 5      :  Ga  X   nXUS-    [        R
                  ;   a,  Ub  [        UR                  U S5      5      eXUS-    nUS-  nGO?U[        R
                  ;   a'  Ub  [        UR                  U S5      5      eUnUS-  nGOU[        R                  ;   a&  Ub  [        UR                  U S	5      5      eUnUS-  nOU[         R                  " 5       ;   a&  Ub  [        UR                  U S
5      5      eUnUS-  nOUS:X  af  [        R                  " SXS 5      nU(       d  [        UR                  U S5      5      e[         R                  " US   5      nU[        US   5      -  nO[        UR                  U SU< 35      5      eU[        U 5      :  a  GM  Uc  Uc  [        R                  S   nUc  SnUc  SnX#U4$ ! [         a     GNf = f)a:  
Convert a MATLAB style color/line style format string to a (*linestyle*,
*marker*, *color*) tuple.

Example format strings include:

* 'ko': black circles
* '.b': blue dots
* 'r--': red dashed lines
* 'C2--': the third color in the color cycle, dashed lines

The format is absolute in the sense that if a linestyle or marker is not
defined in *fmt*, there is no line or marker. This is expressed by
returning 'None' for the respective quantity.

See Also
--------
matplotlib.Line2D.lineStyles, matplotlib.colors.cnames
    All possible styles and color format strings.
N)01z9{!r} is neither a data key nor a valid format string ({})z&{!r} is not a valid format string ({})r      ztwo linestyle symbols   ztwo marker symbolsztwo color symbolsCzC\d+z 'C' must be followed by a numberzunrecognized character zlines.linestyleNone)mcolorsto_rgbar<   lenmlines
lineStylesr=   lineMarkersget_named_colors_mappingrematchmplrcParams)	fmtr`   	linestylemarkercolorerrfmticcn_colors	            r(   _process_plot_formatr{   y   s3   , IFE *	OOC(Ee++
 ' J6  	
A
c#h,F1:***$ s4K!LMMac
IFA&###$ s4K!LMMIFA&$$$! s4H!IJJFFA'2244  s4G!HIIEFA#XxxR1H s4V!WXXOOHQK0EXa[!!AV]]32I!0OPQQ; c#h,> V^LL!23		~e##]  		s   H 
HHc                   |    \ rS rSrSrSS jrS rSSS.S jrS	 r\	" 5       4S
 jr
S rS rS rS rSSS.S jrSrg)_process_plot_var_args   z
Process variable length arguments to `~.Axes.plot`, to support ::

  plot(t, s)
  plot(t1, s1, t2, s2)
  plot(t1, s1, 'ko', t2, s2)
  plot(t1, s1, 'ko', t2, s2, 'r--', t3, e3)

an arbitrary number of *x*, *y*, *fmt* are allowed
c                 `    [         R                  " / SQUS9  Xl        U R                  S 5        g )NLine2DPolygoncoordinatesoutput)r   check_in_listr   set_prop_cycle)r$   r   s     r(   r)   _process_plot_var_args.__init__   s&    ?OD!r+   c                 P    Uc  [         R                  S   nSU l        / UQU l        g )Nzaxes.prop_cycler   )rq   rr   _idx_cycler_items)r$   r   s     r(   r   %_process_plot_var_args.set_prop_cycle   s)    >\\"34F	&vYr+   NF)datareturn_kwargsc             /     #    UR                  US9  S H?  nXe;   d  M
  [        R                  " [        R                  " 5       S   R
                  U5      e   U(       d  g Uc'  U Vs/ s H  n[        R                  " U5      PM     nnOU Vs/ s H  n[        R                  " X(5      PM     n	n[        U5      S:X  a  Sn
Oo[        U5      S:X  aC   [        US   5        U	S   US   La&  [        R                  " SUS   < S3[        5        Sn
O Sn
O[        U5      S:X  a  Sn
O[        S	5      eUR                  S
5      c  [        R                   " X   XJ   5      US
'   U	nUS L=(       a    [        U5      S:H  n[        U5      S:  a5  [        R"                  " UR                  S
5      5      (       d  [        S5      eU(       aX  US S USS  pLU(       a%  [%        US   [&        5      (       a  XS   4-  nUSS  nU R)                  XX[US9 S h  vN   U(       a  MW  g g s  snf s  snf ! [         a    Sn
 GNf = f N,7f)N)r2   xyre   r   rd   zSecond argument a"   is ambiguous: could be a format string but is in 'data'; using as data.  If it was intended as data, set the format string to an empty string to suppress this warning.  If it was intended as a format string, explicitly pass the x-values as well.  Alternatively, rename the entry in 'data'.   zwUsing arbitrary long args with data is not supported due to ambiguity of arguments; use multiple plotting calls insteadlabel   z]plot() with multiple groups of data (i.e., pairs of x and y) does not support multiple labels)r`   r   )_process_unit_infor   kwarg_errorr   stackfunctionr	   sanitize_sequencerq   	_replacerrj   r{   warn_externalRuntimeWarningr<   get_label_from_argis_scalar_or_string
isinstancestr
_plot_args)r$   axesr   r   r1   r2   pos_onlyaargreplacedlabel_namer_idxr`   thiss                r(   r]   _process_plot_var_args.__call__   sG    v.H!&&w}}q'9'B'BHMM  <8<=1E++A.D=D<@ADSd0DHA4yA~"#Ta,(a1  {$q'1**.tAwk :I J +, +,*+Ta"#   zz'"*"%"5"5-t/D#FwD $D 0 CSY!^t9>%";";

7##% #% & ' ' bq48$
47C00Q ABxF+ '    dm >A " (&'O(VsZ   H>AH>& HH> H$-#H>H) D0H>H<H>H>)H95H>8H99H>c                     U R                   U R                     nSU;   a/  U R                  S-   [        U R                   5      -  U l        US   $ g)z#Return the next color in the cycle.rv   re   r&   )r   r   rj   )r$   entrys     r(   get_next_color%_process_plot_var_args.get_next_color.  sJ    ""499-eQ#d.@.@*AADI>!r+   c                 0  ^ U R                   U R                     n[        U4S j1 UkU-
   5       5      (       aV  U R                  S-   [        U R                   5      -  U l        UR	                  5        VVs0 s H  u  pEXB;  d  M  XE_M     snn$ 0 $ s  snnf )a  
If some keys in the property cycle (excluding those in the set
*ignore*) are absent or set to None in the dict *kw*, return a copy
of the next entry in the property cycle, excluding keys in *ignore*.
Otherwise, don't advance the property cycle, and return an empty dict.
c              3   L   >#    U  H  nTR                  US 5      S L v   M     g 7fr/   r   ).0r&   kws     r(   	<genexpr>6_process_plot_var_args._getdefaults.<locals>.<genexpr>?  s"     E0D1rvva$&0Ds   !$re   )r   r   anyrj   r    )r$   r   ignoredefaultsr&   r'   s    `    r(   _getdefaults#_process_plot_var_args._getdefaults7  s     %%dii0E(f0DEEEQ#d.@.@*AADI%-^^%5I%5TQDAD%5III Js   7BBc                 L    U H  nUR                  US5      b  M  X   X#'   M      g)z`
Add to the dict *kw* the entries in the dict *default* that are absent
or set to None in *kw*.
Nr   )r$   r   r   r&   s       r(   _setdefaults#_process_plot_var_args._setdefaultsF  s'    
 Avva&  r+   c                     0 UEUEnU R                  U R                  U5      U5        [        R                  " X#40 UD6nXd4$ r/   )r   r   rk   r   )r$   r   xyr   r2   segs          r(   
_make_line!_process_plot_var_args._make_lineO  sF    f$++B/4mmA'B'wr+   c                 Z    0 UEUEnU R                  U R                  U5      U5        X#4U4$ r/   )r   r   )r$   r   r   r   r   r2   s         r(   _make_coordinates(_process_plot_var_args._make_coordinatesU  s8    f$++B/4vrzr+   c                 F   UR                  U5      nUR                  U5      nUR                  5       nUR                  5       n1 SkUR                  5        VVs1 s H  u  pgUc  M
  UiM     snn-  nU R	                  XH5      n	U R                  X5        UR                  SS 5      n
U	R                  SS 5        U R                  X5        [        R                  " [        R                  " X#45      U
UR                  SS5      US   S9nUR                  " S0 UD6  X4$ s  snnf )N>   ru   
markersizemarkeredgecolormarkeredgewidthmarkerfacecolorrv   fillTclosed)	facecolorr   r   r0   )convert_xunitsconvert_yunitscopyr    r   r   r   popmpatchesr   npcolumn_stackset)r$   r   r   r   r   r2   r&   r'   ignoresdefault_dictr   r   s               r(   _make_polygon$_process_plot_var_args._make_polygonZ  s   ""WWY: %+LLNDNDAaaNDE ((5,+ FF7D)	 	$' 	,/rv6)2$*JJvt$<&(l4 	&{; Es   	D&D)r   r`   c                &  ^^^^^^^^ [        U5      S:  a)  [        US   [        5      (       a  UGt pg[        XuS9u  pn
O![        U5      S:X  a  [	        S5      eUnSu  pn
[        S U 5       5      (       a  [	        S5      e0 m[        S	XU
45       HU  u  pUc  M
  WR                  5       S:w  a2  UT;   a,  US:w  a&  [        R                  " U SU SU SU SU< S3
5        UTU'   MW     [        U5      S:X  a  [        US   5      m[        US   5      mO[        US   5      u  mmTR                  b  TR                  R                  T5        TR                  b  TR                  R                  T5        TR                  S   TR                  S   :w  a%  [	        STR                   STR                   35      eTR                   S:  d  TR                   S:  a%  [	        STR                   STR                   35      eTR                   S:X  a  TS
S
2["        R$                  4   mTR                   S:X  a  TS
S
2["        R$                  4   mU R&                  S:X  a  U R(                  mOpU R&                  S:X  a"  TR+                  SS5      TS'   U R,                  mO>U R&                  S:X  a  U R.                  mO![        R0                  " / SQU R&                  S9  TR                  S   TR                  S   smmTS:  a  TS:  a  TT:w  a  [	        ST ST S 35      eTS:X  d  TS:X  a  / $ TR+                  S!5      n[3        TT5      n[4        R6                  " U5      (       a  U/U-  nO[[        U5      U:X  a  UnOIUS:X  a(  S"[        U5       S#3n[        R8                  " S$US%9  U/nO[	        S&[        U5       S'U S(35      eUUUUUUUU4S) j[;        U5       5       nU(       a  [=        U5      $ U Vs/ s H  nUS   PM
     sn$ s  snf )*a  
Process the arguments of ``plot([x], y, [fmt], **kwargs)`` calls.

This processes a single set of ([x], y, [fmt]) parameters; i.e. for
``plot(x, y, x2, y2)`` it will be called twice. Once for (x, y) and
once for (x2, y2).

x and y may be 2D and thus can still represent multiple datasets.

For multiple datasets, if the keyword argument *label* is a list, this
will unpack the list and assign the individual labels to the datasets.

Parameters
----------
tup : tuple
    A tuple of the positional parameters. This can be one of

    - (y,)
    - (x, y)
    - (y, fmt)
    - (x, y, fmt)

kwargs : dict
    The keyword arguments passed to ``plot()``.

return_kwargs : bool
    Whether to also return the effective keyword arguments after label
    unpacking as well.

ambiguous_fmt_datakey : bool
    Whether the format string in *tup* could also have been a
    misspelled data key.

Returns
-------
result
    If *return_kwargs* is false, a list of Artists representing the
    dataset(s).
    If *return_kwargs* is true, a list of (Artist, effective_kwargs)
    representing the dataset(s). See *return_kwargs*.
    The Artist is either `.Line2D` (if called from ``plot()``) or
    `.Polygon` otherwise.
re   r_   r   z!third arg must be a format string)NNNc              3   (   #    U  H  oS L v   M
     g 7fr/   r0   )r   r'   s     r(   r   4_process_plot_var_args._plot_args.<locals>.<genexpr>  s     &#QDy#s   z(x, y, and format string must not be None)rt   ru   rv   Nnonerg   z  is redundantly defined by the 'z'' keyword argument and the fmt string "z" (-> =z-). The keyword argument will take precedence.rd   r   z8x and y must have same first dimension, but have shapes z and z3x and y can be no greater than 2D, but have shapes r   r   r   Tr   r   r   zx has z columns but y has z columnsr   zPassing label as a length z sequence when plotting a single dataset is deprecated in Matplotlib 3.9 and will error in 3.11.  To keep the current behavior, cast the sequence to string before passing.z3.9)messagezJlabel must be scalar or have the same length as the input data, but found z for z
 datasets.c           
   3   t   >#    U  H-  u  pT" TT	S S 2UT-  4   T
S S 2UT-  4   T0 TESU0E5      v   M/     g 7f)Nr   r0   )r   jr   r   r   r2   make_artistncxncyr   r   s      r(   r   r     sS      5"3ha dAaSjM1QCZ="88%8: :"3s   58)rj   r   r   r{   r<   r   ziplowerr   r   r   r   xaxisupdate_unitsyaxisshapendimr   newaxisr   r   r   r   r   r   maxr	   r   warn_deprecated	enumeratelist)r$   r   tupr2   r   r`   r   rs   rt   ru   rv   	prop_namevalr   
n_datasetslabelsmsgresultlr   r   r   r   r   r   s    ` `               @@@@@@r(   r   !_process_plot_var_args._plot_args  s   Z s8a<Js2w44HR';(B$IuX]@AAB'7$Iu &#&&&GHH!"B#,e"<>NIIIK6)%/6M &&$+ &%; '5yk3' :9:;
 !$9->0 r7a<"Q% A"Q% ABrF#DAq::!JJ##A&::!JJ##A&771:#  ,,-GG9E!''D E E66A:!  ''(wwiuQWWI? @ @66Q;!RZZ- A66Q;!RZZ- A;;("//K[[I%!::h5BxL,,K[[M)00KCDKKX771:qwwqzS7sQw3#:vcU*=cU(KLL!8saxI

7#c]
$$U++Wz)FZ:%F1_/E
| <B BC   4WF##&u:,eJ<zKL L5 5"+F"35 <"()&QAaD&)))s   <P)r   r   r   )r   )r8   r7   r9   rF   r#   r)   r   r]   r   	frozensetr   r   r   r   r   r   rG   r0   r+   r(   r}   r}      sX    	"
' *.U IV '0k $
0f "'eV* V*r+   r}   r   fcc            
         ^ \ rS rSr% SrSr\ V VVs0 s H  o[        R                  " 5       _M     snnn r\R                  " 5       r	Sr
\R                  \S'    \R                  \S'    \R                   \S'    \S 5       rS	 rS
SS
S
SS
S
S
SS.	U4S jjrU4S jrU4S jrS rS rS rS rS rSS jrS rU4S jrS r\S 5       r SS jr!S r"SS jr#S r$S  r%SS! jr&S" r'S# r(S$ r)SS% jr*SS' jr+SS( jr,S) r-S* r.S+ r/S, r0S- r1SS. jr2S/ r3S0 r4S1 r5S2 r6S3 r7 " S4 S5\85      r9\S6 5       r:\S7 5       r;\S8 5       r<\S9 5       r=\S: 5       r>\S; 5       r?\S< 5       r@S= rAS> rBS? rCS@ rDSA rESSB jrFSC rGSSD jrHSE rISSF jrJSG rKSSH jrLSI rMSSJ jrNSSSK.SL jjrOSM rPSN rQSO rRSP rSSQ rT\U" SSR5      rV\U" SSS5      rW\U" SSR5      rX\U" SSS5      rYST rZSU r[SV r\SW r]SX r^SSY jr_SZ r`S[ raS\ rbS] rcS^ rdS_ reS` rfSa rgSb rhSSc jriSSd jrjSSe jrkSSSf.Sg jjrlSh rm\U" SSi5      rn\U" SSi5      ro\U" SSj5      rp\U" SSj5      rqSk rrSl rs\Sm 5       rt\tR                  Sn 5       rtSo rvSp rwSq rxSr ryS
S
SSs.St jrzSu r{Sv r|SSw jr}SSx jr~Sy r\GR                  Sz 5       rS{ rS| rS} rS~ rS rS r\GR                  SS j5       rS&S
S
S
S
S
S.S jrSS jrSS jrS rS rS rSS
S.S jjrS r\U" SS5      rS rSS jrS rS rSSSS
S
S.S jjr\U" SS5      r\U" SS5      r\U" SS5      r\U" SSSS0S9r\U" SS5      r\U" SS5      r\U" SS5      r\U" SSSS0S9rS rSS
S.S jjrS r\U" SS5      rS rSS jrS rSSSS
S
S.S jjr\U" SS5      r\U" SS5      r\U" SS5      r\U" SSSS0S9r\U" SS5      r\U" SS5      r\U" SS5      r\U" SSSS0S9r\U" SS5      r\U" SS5      rS rS rS rS rS rS rS rS rS rS rS rS rS r  SS jr  SS jrS rS rS rS rS rS rS rS rSSS
SS.S jjrS rS rS rS rS rSS jrSS.S jrSS.S jrS rS rSrU=r$ s  snnn f )	_AxesBasei%  rectilinearr   r   FdataLimr   r   c           	      `    U R                    Vs0 s H  nU[        X S35      _M     sn$ s  snf )z7A mapping of axis names, e.g. 'x', to `Axis` instances.axis)_axis_namesr   )r$   rC   s     r(   	_axis_map_AxesBase._axis_mapW  s?     !,,.,D gdfDM22,. 	. .s   +c                 t    SR                  [        U 5      R                  U R                  R                  5      $ )Nz({0}({1[0]:g},{1[1]:g};{1[2]:g}x{1[3]:g}))r=   typer8   	_positionrO   r$   s    r(   __str___AxesBase.__str__]  s.    9@@J!6!68 	8r+   NT auto)	r   frameonsharexshareyr   xscaleyscale
box_aspectforward_navigation_eventsc       	         	  > [         TU ]  5         SU;   aO  U(       a  [        S5      eUR                  S5      n[        R
                  " [        R                  [        4US9  U4nSn[        U5      S:X  a;  [        US   [        R                  5      (       a  US   R                  5       U l        O[        U5      S:X  aD  [        R                  " US   5      (       a&  [        R                  R                  " US   6 U l        O@[        R                  R!                  5       =U l        U l        [$        R&                  " X5      nU R                  R(                  S:  d  U R                  R*                  S:  a  [-        S5      eU R                  R                  5       U l        X l        SU l        S	U l        S
U l        [6        R9                  U R:                  S5      U l        Xl        X@l         XPl!        U RE                  U5        U RG                  U5        U(       a  U RI                  U5        OSU l%        U RM                  U	5        SU l'        / U l(        / U l)        [T        RV                  RY                  U R[                  5       5      U l.        U R_                  5         Uc  [`        Rb                  S   nX l2        X0l3        U Ri                  [`        Rb                  S   5        SU l5        U Rm                  5         SU l7        SU l8        U Rs                  S5        U Ru                  S5        U(       a  U Rw                  U5        U(       a  U Ry                  U5        U R{                  U5        U R|                  R                  5        H1  u  nnUR                  R                  SU R                  U5      5        M3     [`        Rb                  nU R                  US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US   SS9	  U R                  US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US   US   =(       a    US    US   =(       a    US!   US   =(       a    US    US   =(       a    US!   S"S9	  g)#a  
Build an Axes in a figure.

Parameters
----------
fig : `~matplotlib.figure.Figure`
    The Axes is built in the `.Figure` *fig*.

*args
    ``*args`` can be a single ``(left, bottom, width, height)``
    rectangle or a single `.Bbox`.  This specifies the rectangle (in
    figure coordinates) where the Axes is positioned.

    ``*args`` can also consist of three numbers or a single three-digit
    number; in the latter case, the digits are considered as
    independent numbers.  The numbers are interpreted as ``(nrows,
    ncols, index)``: ``(nrows, ncols)`` specifies the size of an array
    of subplots, and ``index`` is the 1-based index of the subplot
    being created.  Finally, ``*args`` can also directly be a
    `.SubplotSpec` instance.

sharex, sharey : `~matplotlib.axes.Axes`, optional
    The x- or y-`~.matplotlib.axis` is shared with the x- or y-axis in
    the input `~.axes.Axes`.  Note that it is not possible to unshare
    axes.

frameon : bool, default: True
    Whether the Axes frame is visible.

box_aspect : float, optional
    Set a fixed aspect for the Axes box, i.e. the ratio of height to
    width. See `~.axes.Axes.set_box_aspect` for details.

forward_navigation_events : bool or "auto", default: "auto"
    Control whether pan/zoom events are passed through to Axes below
    this one. "auto" is *True* for axes with an invisible patch and
    *False* otherwise.

**kwargs
    Other optional keyword arguments:

    %(Axes:kwdoc)s

Returns
-------
`~.axes.Axes`
    The new `~.axes.Axes` object.
rectz8'rect' cannot be used together with positional arguments)r  Nre   r   z/Width and height specified must be non-negativer  boxrf   Fzaxes.facecolorzaxes.axisbelowTunitsz	xtick.topzxtick.minor.topzxtick.bottomzxtick.minor.bottomzxtick.labeltopzxtick.labelbottomz
ytick.leftzytick.minor.leftzytick.rightzytick.minor.rightzytick.labelleftzytick.labelrightminor)	topbottomlabeltoplabelbottomleftright	labelleft
labelrightwhichzxtick.major.topzxtick.major.bottomzytick.major.leftzytick.major.rightmajor)Dsuperr)   	TypeErrorr   r   check_isinstancerU   rW   r   rj   r   frozenr	  r   iterablerX   unit_originalPositionr   _from_subplot_argswidthheightr<   r   _aspect_adjustable_anchordictfromkeysr  _stale_viewlims_forward_navigation_events_sharex_sharey	set_label
set_figureset_subplotspec_subplotspecset_box_aspect_axes_locator	_children
_colorbarsmspinesSpines	from_dict_gen_axes_spinesspines
_init_axisrq   rr   
_facecolor_frameonset_axisbelow_rasterization_zorderclear	fmt_xdata	fmt_ydataset_navigateset_navigate_mode
set_xscale
set_yscale_internal_updater  r    	callbacks_connect_picklable_unit_change_handlertick_params)r$   figr   r  r  r  r   r  r  r  r  r1   r2   r  subplotspecrC   r  rr   	__class__s                     r(   r)   _AxesBase.__init__a  so   | 	VNP P::f%D!!;#3#3X">TJ7Dt9>ja+2B2BCC!!W^^-DNY!^DG 4 4(--9947CDN6A6F6F6K6K6MMDNT3%88CK>>!#t~~'<'<q'@NOO!%!6!6!8	 #}}T-=-=uE*C'u   - $DJ'! nn..t/D/D/FG 	%56I#3<<(89:%)"

 $t$OOF#OOF#f%....0JD$NN--2248: 1 <<%E(3D*EN+N9M0N/0 201!"56 8!"67,'HH5G,H=)Kh7J.K 12 4 23 !34 6 !45 	 	 	%E(3D*EN+N9M0N/0 201!"56 8!"67,'HH5G,H=)Kh7J.K 12 4 23 !34 6 !45 	 	r+   c           	         > [         X ]  nSU R                  ;   a2  [        R                  " SSSU R
                   SU R                  < S3S9  SU R                  ;   =(       d    UU l        [         TU ]  " S0 UD6  g )	Nclaz3.6TzOverriding `Axes.cla` in z is pending deprecation in %(since)s and will be fully deprecated in favor of `Axes.clear` in the future. Please report this to the z author.)pendingr   r0   )r%  _subclass_uses_cla__dict__r   r   r9   r7   __init_subclass__)clsr2   parent_uses_clarX  s      r(   r_  _AxesBase.__init_subclass__	  s|    <CLL   3C4D4D3E F  #~~0	:; "'#,,!6!I/!+F+r+   c                 ,  > [         TU ]  5       nU R                   Vs0 s H5  o U R                  U   ;   d  M  X R                  U   R	                  U 5      _M7     snUS'   X R
                  ;   a  U R
                  R	                  U 5      OS US'   U$ s  snf )N_shared_axes_twinned_axes)r%  __getstate__r  rd  get_siblingsre  )r$   staterC   rX  s      r(   rf  _AxesBase.__getstate__  s    $& ((!M(D4E4Ed4K,K =D##D)66t<<(!Mn &*-?-?%? #'"4"4"A"A$"GEI 	o!Ms
   B"Bc                    UR                  S5      nUR                  5        H!  u  p4U R                  U   R                  " U6   M#     UR                  S5      nU(       a  U R                  R                  " U6   Xl        SU l        g )Nrd  re  T)r   r    rd  r>   re  r^  _stale)r$   rh  shared_axesrC   shared_siblingstwinned_siblingss         r(   __setstate___AxesBase.__setstate__!  sr    ii/%0%6%6%8!Dd#((/: &9 99_5##%56r+   c                 B   / nU R                  5       (       a  USU R                  5       < 3/-  n[        U S5      (       a7  0 nS H  nU R                  US9nU(       d  M  XBU'   M!     U(       a	  USU 3/-  nU R                  R	                  5        H\  u  pVUR
                  (       d  M  UR
                  R                  5       (       d  M9  X SUR
                  R                  5       < 3/-  nM^     SU R                  R                   S3SR                  U5      -   S	-   $ )
Nzlabel=	get_titler  centerr   locztitle=<z: r6   >)
	get_labelhasattrrr  r  r    r   get_textrX  r8   r>   )r$   fieldstitlesr&   titlerC   r  s          r(   __repr___AxesBase.__repr__,  s   >> 03455F4%%F01-5 %1I 1 VF8,--....0JDzzzdjj1133V6$***=*=*?)BCDD 1 4>>**+2.61BBSHHr+   c                     U R                   $ )z?Return the `.SubplotSpec` associated with the subplot, or None.)r;  r
  s    r(   get_subplotspec_AxesBase.get_subplotspec=  s       r+   c                 j    Xl         U R                  UR                  U R                  SS95      5        g)z4Set the `.SubplotSpec`. associated with the subplot.FrS   N)r;  _set_positionget_positionrY   )r$   rW  s     r(   r:  _AxesBase.set_subplotspecA  s,    ';33DOOO4OPQr+   c                 \    U R                   (       a  U R                   R                  5       $ S$ )z<Return the `.GridSpec` associated with the subplot, or None.N)r;  get_gridspecr
  s    r(   r  _AxesBase.get_gridspecF  s$    373D3Dt  --/N$Nr+   c                     U R                   $ )a_  
Return the Axes bounding box in display space.

This bounding box does not include the spines, ticks, ticklabels,
or other labels.  For a bounding box including these elements use
`~matplotlib.axes.Axes.get_tightbbox`.

See Also
--------
matplotlib.axes.Axes.get_tightbbox
matplotlib.axis.Axis.get_tightbbox
matplotlib.spines.Spine.get_window_extent
)bbox)r$   r\   s     r(   get_window_extent_AxesBase.get_window_extentJ  s     yyr+   c                    [         R                  " U SS9U l        U R                  R                  R                  U R                  5        U R                  R                  R                  U R                  5        [         R                  " U SS9U l        U R                  R                  R                  U R                  5        U R                  R                  R                  U R                  5        g )NF)rJ  )r   XAxisr   rD  r  register_axisr  YAxisr   r  r   r
  s    r(   rE  _AxesBase._init_axisZ  s    [[U3
((4%%djj1[[U3
&&tzz2''

3r+   c                   > [         TU ]  U5        [        R                  " U R                  UR
                  5      U l        [        R                  R                  5       U l	        [        R                  R                  5       U l        [        R                  " [        R                  " 5       5      U l        U R                  5         g r/   )r%  r9  rU   rV   r	  rZ   r  rW   nullr  r*  _viewLimTransformWrapperIdentityTransform
transScale_set_lim_and_transforms)r$   rV  rX  s     r(   r9  _AxesBase.set_figurec  s    3//030B0BD	 #'',,.#((--/%66))+- 	$$&r+   c           
        ^ U R                    V^s0 s H5  mT[        U4S jU R                  T   R                  U 5       5       5      _M7     nn[        UR	                  5       5      (       aw  U H7  mU R                  T   R                  U 5       H  nSUR
                  T'   M     M9     U R                  " S0 UR                  5        VVs0 s H  u  pSU 3U_M     snnD6  g g s  snf s  snnf )Nc              3   B   >#    U  H  nUR                   T   v   M     g 7fr/   )r4  r   r[   rC   s     r(   r   -_AxesBase._unstale_viewLim.<locals>.<genexpr>u  s$      L J" ((. Js   Fscaler0   )r  r   rd  rg  valuesr4  autoscale_viewr    )r$   rC   
need_scaler[   r  s    `   r(   _unstale_viewLim_AxesBase._unstale_viewLimq  s    ((* ) # L $ 1 1$ 7 D DT JL L L( 	 * z  "##"++D1>>tDB/4B&&t, E #  K6@6F6F6H#J6H{t &+4&>5#86H#J K	 $	*#Js   <C%C*c                 :    U R                  5         U R                  $ )z/The view limits as `.Bbox` in data coordinates.)r  r  r
  s    r(   viewLim_AxesBase.viewLim  s     	}}r+   c                     [         R                  " 0 U R                   Vs0 s H  o3U/_M     snESU R                  0EUS9nU H  nSU R                  U'   M     Ub  X l        ggs  snf )a]  
Mark a single axis, or all of them, as stale wrt. autoscaling.

No computation is performed until the next autoscaling; thus, separate
calls to control individual axises incur negligible performance cost.

Parameters
----------
axis : str, default: "all"
    Either an element of ``self._axis_names``, or "all".
tight : bool or None, default: None
allr  TN)r   check_getitemr  r4  _tight)r$   r  tightr&   
axis_namesrC   s         r(   _request_autoscale_view!_AxesBase._request_autoscale_view  sx     ''K 0 01 01A3 01K5$:J:JK
 D)-D  & K 	 2s   A%
c                 H   [         R                  " U R                  5      U l        [         R                  " [         R
                  " 5       5      U l        [         R                  " [         R                  " U R                  U R                  5      5      U l
        U R                  U R                  U R                  -   -   U l        [         R                  " U R                  U R                  5      U l        [         R                  " U R                  U R                  5      U l        g)a  
Set the *_xaxis_transform*, *_yaxis_transform*, *transScale*,
*transData*, *transLimits* and *transAxes* transformations.

.. note::

    This method is primarily used by rectilinear projections of the
    `~matplotlib.axes.Axes` class, and is meant to be overridden by
    new kinds of projection Axes that need different transformations
    and limits. (See `~matplotlib.projections.polar.PolarAxes` for an
    example.)
N)rU   BboxTransformTor  	transAxesr  r  r  BboxTransformFromrV   r  transLimits	transDatablended_transform_factory_xaxis_transform_yaxis_transformr
  s    r(   r  !_AxesBase._set_lim_and_transforms  s     %44TYY?
 &66))+-
 '88''tGI D,<,<t~~,MN + E ENNDNN!, + E ENNDNN!,r+   c                     US:X  a  U R                   $ US:X  a$  U R                  R                  R                  5       $ US:X  a$  U R                  R                  R                  5       $ [        SU< 35      e)a  
Get the transformation used for drawing x-axis labels, ticks
and gridlines.  The x-direction is in data coordinates and the
y-direction is in axis coordinates.

.. note::

    This transformation is primarily used by the
    `~matplotlib.axis.Axis` class, and is meant to be
    overridden by new kinds of projections that may need to
    place axis elements in different locations.

Parameters
----------
which : {'grid', 'tick1', 'tick2'}
gridtick1tick2unknown value for which: )r  rD  r  get_spine_transformr  r<   r$   r#  s     r(   get_xaxis_transform_AxesBase.get_xaxis_transform  sj    " F?(((g;;%%99;;g;;??66888	BCCr+   c           	          [         R                  S   nU R                  SS9[        R                  " SSU-  S-  U R                  SS9R                  5      -   S	U4$ )
a  
Returns
-------
transform : Transform
    The transform used for drawing x-axis labels, which will add
    *pad_points* of padding (in points) between the axis and the label.
    The x-direction is in data coordinates and the y-direction is in
    axis coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.
xtick.alignmentr  r#  r   r   H   FrS   r  rq   rr   r  rU   ScaledTranslationrY   dpi_scale_transr$   
pad_pointslabels_aligns      r(   get_xaxis_text1_transform#_AxesBase.get_xaxis_text1_transform  sl    ( ||$56((w(7--rJ+OOO/??AA |	% 	%r+   c           	          [         R                  S   nU R                  SS9[        R                  " SUS-  U R                  SS9R                  5      -   SU4$ )	a  
Returns
-------
transform : Transform
    The transform used for drawing secondary x-axis labels, which will
    add *pad_points* of padding (in points) between the axis and the
    label.  The x-direction is in data coordinates and the y-direction
    is in axis coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.
r  r  r  r   r  FrS   r  r  r  s      r(   get_xaxis_text2_transform#_AxesBase.get_xaxis_text2_transform  sg    ( ||$56((w(7--zBOOO/??AA ,	( 	(r+   c                     US:X  a  U R                   $ US:X  a$  U R                  R                  R                  5       $ US:X  a$  U R                  R                  R                  5       $ [        SU< 35      e)a  
Get the transformation used for drawing y-axis labels, ticks
and gridlines.  The x-direction is in axis coordinates and the
y-direction is in data coordinates.

.. note::

    This transformation is primarily used by the
    `~matplotlib.axis.Axis` class, and is meant to be
    overridden by new kinds of projections that may need to
    place axis elements in different locations.

Parameters
----------
which : {'grid', 'tick1', 'tick2'}
r  r  r  r  )r  rD  r  r  r   r<   r  s     r(   get_yaxis_transform_AxesBase.get_yaxis_transform  sl    " F?(((g;;##7799g;;$$88::8	BCCr+   c           	          [         R                  S   nU R                  SS9[        R                  " SU-  S-  SU R                  SS9R                  5      -   US	4$ )
a  
Returns
-------
transform : Transform
    The transform used for drawing y-axis labels, which will add
    *pad_points* of padding (in points) between the axis and the label.
    The x-direction is in axis coordinates and the y-direction is in
    data coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.
ytick.alignmentr  r  r   r  r   FrS   r   rq   rr   r  rU   r  rY   r  r  s      r(   get_yaxis_text1_transform#_AxesBase.get_yaxis_text1_transform,  sl    ( ||$56((w(7--Ob(!OOO/??AA g	' 	'r+   c           	          [         R                  S   nU R                  SS9[        R                  " US-  SU R                  SS9R                  5      -   US4$ )	a  
Returns
-------
transform : Transform
    The transform used for drawing secondart y-axis labels, which will
    add *pad_points* of padding (in points) between the axis and the
    label.  The x-direction is in axis coordinates and the y-direction
    is in data coordinates
valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
    The text vertical alignment.
halign : {'center', 'left', 'right'}
    The text horizontal alignment.

Notes
-----
This transformation is primarily used by the `~matplotlib.axis.Axis`
class, and is meant to be overridden by new kinds of projections that
may need to place axis elements in different locations.
r  r  r  r  r   FrS   r  r  r  s      r(   get_yaxis_text2_transform#_AxesBase.get_yaxis_text2_transformG  sg    ( ||$56((w(7--OQOOO/??AA f	& 	&r+   c                     U R                   R                  [        R                  " U R                  R                  5       U R                  R                  5       5      5        g r/   )r  r   rU   r  r   get_transformr   r
  s    r(   _update_transScale_AxesBase._update_transScaleb  sC    11

((*DJJ,D,D,FH	Ir+   c                     U(       a  U R                   R                  5       $ U R                  5       nU(       d  U R                  5         U R                  R                  5       $ )a  
Return the position of the Axes within the figure as a `.Bbox`.

Parameters
----------
original : bool
    If ``True``, return the original position. Otherwise, return the
    active position. For an explanation of the positions see
    `.set_position`.

Returns
-------
`.Bbox`

)r+  r(  get_axes_locatorapply_aspectr	  )r$   originallocators      r(   r  _AxesBase.get_positiong  sL      ))0022++-G!!#>>((**r+   bothc                 D    U R                  XS9  U R                  S5        g)a  
Set the Axes position.

Axes have two position attributes. The 'original' position is the
position allocated for the Axes. The 'active' position is the
position the Axes is actually drawn at. These positions are usually
the same unless a fixed aspect is set to the Axes. See
`.Axes.set_aspect` for details.

Parameters
----------
pos : [left, bottom, width, height] or `~matplotlib.transforms.Bbox`
    The new position of the Axes in `.Figure` coordinates.

which : {'both', 'active', 'original'}, default: 'both'
    Determines which position variables to change.

See Also
--------
matplotlib.transforms.Bbox.from_bounds
matplotlib.transforms.Bbox.from_extents
r  FN)r  set_in_layout)r$   posr#  s      r(   set_position_AxesBase.set_position  s%    . 	3, 	5!r+   c                 V   [        U[        R                  5      (       d  [        R                  R                  " U6 nU R
                  R                  U 5       HG  nUS;   a  UR                  R                  U5        US;   d  M,  UR                  R                  U5        MI     SU l
        g)z
Private version of set_position.

Call this internally to get the same functionality of `set_position`,
but not to take the axis out of the constrained_layout hierarchy.
)r  active)r  r  TN)r   rU   BboxBaserW   rX   re  rg  r	  r   r+  stale)r$   r  r#  r[   s       r(   r  _AxesBase._set_position  s     #{3344""..4C$$11$7B**  %,,$$((-	 8
 
r+   c                     U R                   R                  U 5       H"  nUR                  SS9nUR                  USS9  M$     g)z
Reset the active position to the original position.

This undoes changes to the active position (as defined in
`.set_position`) which may have been performed to satisfy fixed-aspect
constraints.
Tr  r  r  N)re  rg  r  r  )r$   r[   r  s      r(   reset_position_AxesBase.reset_position  s?     $$11$7B//4/0COOCxO0 8r+   c                     Xl         SU l        g)zY
Set the Axes locator.

Parameters
----------
locator : Callable[[Axes, Renderer], Bbox]
TN)r=  r  )r$   r  s     r(   set_axes_locator_AxesBase.set_axes_locator  s     %
r+   c                     U R                   $ )z
Return the axes_locator.
)r=  r
  s    r(   r  _AxesBase.get_axes_locator  s     !!!r+   c                    UR                  U R                  SS95        UR                  5       (       d  UR                  U R                  5        Xl        UR                  5       (       a  U R                  R                  U5        gg)z4Set the boilerplate props for artists added to Axes.FrS   N)	r9  rY   is_transform_setset_transformr  r   get_mouseover_mouseover_setaddr$   r   s     r(   _set_artist_props_AxesBase._set_artist_props  sc    	T__%_01!!##OODNN+??##A& r+   c                 2    [         R                  " SSS5      $ )a7  
Returns
-------
Patch
    The patch used to draw the background of the Axes.  It is also used
    as the clipping path for any data elements on the Axes.

    In the standard Axes, this is a rectangle, but in other projections
    it may not be.

Notes
-----
Intended to be overridden by new projection types.
)        r        ?)r   	Rectangler
  s    r(   _gen_axes_patch_AxesBase._gen_axes_patch  s     !!*c377r+   c                 n    S Vs0 s H#  nU[         R                  R                  X5      _M%     sn$ s  snf )a%  
Returns
-------
dict
    Mapping of spine names to `.Line2D` or `.Patch` instances that are
    used to draw Axes spines.

    In the standard Axes, spines are single line segments, but in other
    projections they may not be.

Notes
-----
Intended to be overridden by new projection types.
)r  r   r  r  )r@  Spinelinear_spine)r$   	locationsoffsetr  sides        r(   rC  _AxesBase._gen_axes_spines  sA      ?@>D gmm00<<>@ 	@ @s   *2c                 
   [         R                  " [        US9  U R                  b  XR                  La  [	        S5      eU R
                  S   R                  X5        Xl        UR                  R                  U R                  l        UR                  R                  U R                  l	        UR                  5       u  p#U R                  X#SUR                  5       S9  UR                  R                  U R                  l        g)z
Share the x-axis with *other*.

This is equivalent to passing ``sharex=other`` when constructing the
Axes, and cannot be used if the x-axis is already being shared with
another Axes.  Note that it is not possible to unshare axes.
otherNzx-axis is already sharedr   Femitr  )r   r'  r   r6  r<   rd  r>   r   r$  r  get_xlimset_xlimget_autoscalex_on_scale)r$   r  x0x1s       r(   r  _AxesBase.sharex       	iu5<<#\\(A788###D0 ;;,,

 ;;,,

!b5u/F/F/HI!KK..

r+   c                 
   [         R                  " [        US9  U R                  b  XR                  La  [	        S5      eU R
                  S   R                  X5        Xl        UR                  R                  U R                  l        UR                  R                  U R                  l	        UR                  5       u  p#U R                  X#SUR                  5       S9  UR                  R                  U R                  l        g)z
Share the y-axis with *other*.

This is equivalent to passing ``sharey=other`` when constructing the
Axes, and cannot be used if the y-axis is already being shared with
another Axes.  Note that it is not possible to unshare axes.
r  Nzy-axis is already sharedr   Fr  )r   r'  r   r7  r<   rd  r>   r   r$  r  get_ylimset_ylimget_autoscaley_onr  )r$   r  y0y1s       r(   r  _AxesBase.sharey  r  r+   c           	         [        U S5      (       a  U R                  R                  5       nOSnU R                  R                  5       nU R                  R                  5       nU R
                  R                  5        H  nUR                  5         M     U R                  R                  5        H  nUR                  5         M     SU l
        [        R                  " / SQS9U l        [        R                  S   (       a.  U R                  R!                  ["        R$                  " 5       5        [        R                  S   (       a.  U R                  R!                  ["        R$                  " 5       5        [        R                  S   U l        [        R                  S   U l        S	U l        SU l        [/        5       U l        [/        S
5      U l        [        R                  S   U l        U R6                  / so`l        U H  nS	Ul        S	Ul        S	Ul        M     UR                  5         [?        5       U l         / U l!        S	U l"        S	U l#        S	U l$        / U l%        U RM                  S5        U RM                  U R4                  [        R                  S   [        R                  S   S9  [N        RP                  " [        R                  S   [        R                  S   S9n[        R                  S   n	U	c
  Sn	SU l)        OSU l)        [T        RV                  " SU	SUSSS9U l,        [T        RV                  " SU	SUR[                  5       SSS9U l.        [T        RV                  " SU	SUR[                  5       SSS9U l/        [        R                  S   n
U Ra                  U
5        U RX                  U R\                  U R^                  4 H  nU Rc                  U5        M     U Re                  5       U l        U R                  Rg                  U Ri                  SS95        U R                  Rk                  U Rl                  5        U R                  Ro                  S5        U R                  Rq                  S 5        U R                  Rs                  U Rt                  5        U Rw                  5         U R                  Ry                  U R                  5        U R                  Ry                  U R                  5        U Rz                  b6  U R                  R}                  U5        U R                  R}                  U5        U R~                  b6  U R                  R}                  U5        U R                  R}                  U5        U R
                  R                  5        H`  u  p[        U S!U 35      nUb  [        U S"U 35      " U5        M.  U R                  S#:X  a  UR                  S$5        UR                  S S%SS&9  Mb     U R                  5         SU lF        g	)'Clear the Axes.patchT)xlim_changedylim_changedzlim_changed)signalszxtick.minor.visiblezytick.minor.visiblezaxes.xmarginzaxes.ymarginNr   z	axes.gridFzaxes.grid.whichzaxes.grid.axis)r#  r  zaxes.titlesizezaxes.titleweight)sizeweightzaxes.titleyr        ?r  baselinert  )r   r   textfontpropertiesverticalalignmenthorizontalalignmentr  r  r   zaxes.titlepadrS   r   r   _sharesharepolarlinearre   r  )Grz  r)  get_visibler   r   r  r  rJ  rD  _clearignore_existing_data_limitsr	   CallbackRegistryrR  rq   rr   set_minor_locatormtickerAutoMinorLocator_xmargin_ymarginr  _use_sticky_edgesr}   
_get_lines_get_patches_for_fill_gridOnr>  _remove_method_parent_figurer   r   r  
child_axes_current_image_projection_initlegend_
containersr  font_managerFontProperties_autotitleposmtextTextr~  r   _left_title_right_title_set_title_offset_transr  r
  r9  rY   set_facecolorrF  set_edgecolorset_linewidthr  r  set_axis_onset_clip_pathr6  set_visibler7  r    r   rC   
_set_scale_set_limr  r  )r$   patch_visiblexaxis_visibleyaxis_visibler  spineold_childrenchldpropsr   title_offset_points_titlerC   r7  s                 r(   __clear_AxesBase.__clear  s    4!! JJ224M M

..0

..0NN))+DJJL ,[['')ELLN * ,0(//DF <<-.JJ(()A)A)CD<<-.JJ(()A)A)CD^4^4!%02%;I%F"||K0'+~~r$n D"&D"&DDI !
 	)m" $		%		$,,cll3D&E||$45 	 	7++./<< 235 LL'9A!%D!&DZZQR ( (	
 !::QR ::<( &	*
 "JJQR ::<( '	 "ll?; 	$$%89zz4#3#3T5F5FGF""6* H ))+


doo5o9:

  1

  (

  #

  0

  ,

  ,<<#JJ""=1JJ""=1<<#JJ""=1JJ""=1 ....0JDDF4&/2E dVn-e4 99'OOH-a. 1 	!
r+   c                 h    U R                   (       a  U R                  5         gU R                  5         gr(  N)r]  r[  _AxesBase__clearr
  s    r(   rJ  _AxesBase.clear  s     ""HHJLLNr+   c                 h    U R                   (       a  U R                  5         gU R                  5         grk  )r]  rl  rJ  r
  s    r(   r[  _AxesBase.cla  s     ""LLNJJLr+   c                   H    \ rS rSrSr SS jrS rS rS rS r	S	 r
S
 rSrg)_AxesBase.ArtistListi  z
A sublist of Axes children based on their type.

The type-specific children sublists were made immutable in Matplotlib
3.7.  In the future these artist lists may be replaced by tuples. Use
as if this is a tuple already.
Nc                 8   ^^ Xl         X l        UU4S jU l        g)a1  
Parameters
----------
axes : `~matplotlib.axes.Axes`
    The Axes from which this sublist will pull the children
    Artists.
prop_name : str
    The property name used to access this sublist from the Axes;
    used to generate deprecation warnings.
valid_types : list of type, optional
    A list of types that determine which children will be returned
    by this sublist. If specified, then the Artists in the sublist
    must be instances of any of these types. If unspecified, then
    any type of Artist is valid (unless limited by
    *invalid_types*.)
invalid_types : tuple, optional
    A list of types that determine which children will *not* be
    returned by this sublist. If specified, then Artists in the
    sublist will never be an instance of these types. Otherwise, no
    types will be excluded.
c                    > T(       + =(       d    [        U T5      =(       a    T(       + =(       d    [        U T5      (       + $ r/   )r   )artistinvalid_typesvalid_typess    r(   <lambda>/_AxesBase.ArtistList.__init__.<locals>.<lambda>  s5     CJv{$C M""K*V]*K&KMr+   N_axes
_prop_name_type_check)r$   r   r   rv  ru  s      ``r(   r)   _AxesBase.ArtistList.__init__  s    . J'O Dr+   c                 :    S[        U 5       SU R                   S3$ )Nz<Axes.ArtistList of  rx  )rj   r{  r
  s    r(   r  _AxesBase.ArtistList.__repr__  s     )#d)Adoo5FaHHr+   c                 V   ^  [        U 4S jT R                  R                   5       5      $ )Nc              3   F   >#    U  H  nTR                  U5      v   M     g 7fr/   )r|  )r   rt  r$   s     r(   r   /_AxesBase.ArtistList.__len__.<locals>.<genexpr>  s&      ;%96 ''//%9s   !)sumrz  r>  r
  s   `r(   __len___AxesBase.ArtistList.__len__  s'     ;%)ZZ%9%9; ; ;r+   c              #      #    [        U R                  R                  5       H  nU R                  U5      (       d  M  Uv   M!     g 7fr/   )r   rz  r>  r|  )r$   rt  s     r(   __iter___AxesBase.ArtistList.__iter__  s4     tzz334##F++ L 5s
   7A	Ac                     U R                   R                   Vs/ s H  nU R                  U5      (       d  M  UPM     snU   $ s  snf r/   )rz  r>  r|  )r$   keyrt  s      r(   __getitem__ _AxesBase.ArtistList.__getitem__  sG    "&**"6"61"6''/ "61146 6 1s
   AAc                     [        U[        [        R                  45      (       a  / U QUQ$ [        U[        [        R                  45      (       a  / U QUQ7$ [
        $ r/   )r   r   r   
ArtistListtupleNotImplementedr$   r  s     r(   __add___AxesBase.ArtistList.__add__  sT    %$	(<(<!=>>&&%%)=)=!>??&&!!r+   c                     [        U[        5      (       a  U[        U 5      -   $ [        U[        5      (       a  U[        U 5      -   $ [        $ r/   )r   r   r  r  r  s     r(   __radd___AxesBase.ArtistList.__radd__  s@    %&&tDz))%''uT{**!!r+   ry  NN)r8   r7   r9   rF   r#   r)   r  r  r  r  r  r  rG   r0   r+   r(   r  rq    s0    	 6:	<	I	;	!
	6
	"	"r+   r  c           
          U R                  U S[        R                  [        R                  [
        R                  [        R                  [        R                  [        R                  4S9$ )Nartists)ru  )r  mcoll
Collectionmimage	AxesImagerk   r   r   PatchmtableTablerR  rS  r
  s    r(   r  _AxesBase.artists  sH    tYf..x~~LL%**?& ' 	'r+   c                 @    U R                  U S[        R                  S9$ )Ncollectionsrv  )r  r  r  r
  s    r(   r  _AxesBase.collections  s%    t]+0+;+;  = 	=r+   c                 @    U R                  U S[        R                  S9$ )Nimagesr  )r  r  r  r
  s    r(   r  _AxesBase.images  s    tX6;K;KLLr+   c                 @    U R                  U S[        R                  S9$ )Nlinesr  )r  rk   r   r
  s    r(   r  _AxesBase.lines  s    tW&--HHr+   c                 @    U R                  U S[        R                  S9$ )Npatchesr  )r  r   r  r
  s    r(   r  _AxesBase.patches	  s    tYHNNKKr+   c                 @    U R                  U S[        R                  S9$ )Ntablesr  )r  r  r  r
  s    r(   r  _AxesBase.tables  s    tX6<<HHr+   c                 @    U R                  U S[        R                  S9$ )Ntextsr  )r  rR  rS  r
  s    r(   r  _AxesBase.texts  s    tW%**EEr+   c                 6    U R                   R                  5       $ )zGet the facecolor of the Axes.)r)  get_facecolorr
  s    r(   r  _AxesBase.get_facecolor  s    zz''))r+   c                 R    Xl         SU l        U R                  R                  U5      $ )zP
Set the facecolor of the Axes.

Parameters
----------
color : :mpltype:`color`
T)rF  r  r)  rW  )r$   rv   s     r(   rW  _AxesBase.set_facecolor  s%      
zz''..r+   c                 8   [         R                  " SUS-  U R                  SS9R                  5      U l        U R
                  U R                  U R                  4 H<  nUR                  U R                  U R                  -   5        UR                  S5        M>     g)z_
Set the offset for the title either from :rc:`axes.titlepad`
or from set_title kwarg ``pad``.
r  r  FrS   N)rU   r  rY   r  titleOffsetTransr~  rT  rU  r  r  set_clip_box)r$   rf  rg  s      r(   rV  !_AxesBase._set_title_offset_trans%  s    
 !, = =(2-U+;;!= zz4#3#3T5F5FGF  $2G2G!GH% Hr+   c                     U(       a  U(       a  [        S5      e[        U5      S:X  a	  US   c  SnO[        U0 UD6nU R                  R	                  U5        U R
                  R	                  U5        g)a-  
Set the property cycle of the Axes.

The property cycle controls the style properties such as color,
marker and linestyle of future plot commands. The style properties
of data already added to the Axes are not modified.

Call signatures::

  set_prop_cycle(cycler)
  set_prop_cycle(label=values, label2=values2, ...)
  set_prop_cycle(label, values)

Form 1 sets given `~cycler.Cycler` object.

Form 2 creates a `~cycler.Cycler` which cycles over one or more
properties simultaneously and set it as the property cycle of the
Axes. If multiple properties are given, their value lists must have
the same length. This is just a shortcut for explicitly creating a
cycler and passing it to the function, i.e. it's short for
``set_prop_cycle(cycler(label=values, label2=values2, ...))``.

Form 3 creates a `~cycler.Cycler` for a single property and set it
as the property cycle of the Axes. This form exists for compatibility
with the original `cycler.cycler` interface. Its use is discouraged
in favor of the kwarg form, i.e. ``set_prop_cycle(label=values)``.

Parameters
----------
cycler : `~cycler.Cycler`
    Set the given Cycler. *None* resets to the cycle defined by the
    current style.

    .. ACCEPTS: `~cycler.Cycler`

label : str
    The property key. Must be a valid `.Artist` property.
    For example, 'color' or 'linestyle'. Aliases are allowed,
    such as 'c' for 'color' and 'lw' for 'linewidth'.

values : iterable
    Finite-length iterable of the property values. These values
    are validated and will raise a ValueError if invalid.

See Also
--------
matplotlib.rcsetup.cycler
    Convenience function for creating validated cyclers for properties.
cycler.cycler
    The original function for creating unvalidated cyclers.

Examples
--------
Setting the property cycle for a single property:

>>> ax.set_prop_cycle(color=['red', 'green', 'blue'])

Setting the property cycle for simultaneously cycling over multiple
properties (e.g. red circle, green plus, blue cross):

>>> ax.set_prop_cycle(color=['red', 'green', 'blue'],
...                   marker=['o', '+', 'x'])

zCCannot supply both positional and keyword arguments to this method.re   r   N)r&  rj   r   rE  r   rF  )r$   r1   r2   
prop_cycles       r(   r   _AxesBase.set_prop_cycle1  sk    B F 8 9 9 t9>d1goJ00J&&z2""11*=r+   c                     U R                   $ )zo
Return the aspect ratio of the Axes scaling.

This is either "auto" or a float giving the ratio of y/x-scale.
)r/  r
  s    r(   
get_aspect_AxesBase.get_aspect}  s     ||r+   c                    [         R                  " US5      (       a  Sn[         R                  " US5      (       d7  [        U5      nUS::  d  [        R                  " U5      (       d  [        S5      eU(       aE  U R                   VVs1 s H+  nU R                  U   R                  U 5        H  nUiM     M-     nnnOU /nU H	  nXl	        M     Uc  U R                  nU R                  X$S9  Ub  U R                  X4S9  SU l        gs  snnf )	a  
Set the aspect ratio of the Axes scaling, i.e. y/x-scale.

Parameters
----------
aspect : {'auto', 'equal'} or float
    Possible values:

    - 'auto': fill the position rectangle with data.
    - 'equal': same as ``aspect=1``, i.e. same scaling for x and y.
    - *float*: The displayed size of 1 unit in y-data coordinates will
      be *aspect* times the displayed size of 1 unit in x-data
      coordinates; e.g. for ``aspect=2`` a square in data coordinates
      will be rendered with a height of twice its width.

adjustable : None or {'box', 'datalim'}, optional
    If not ``None``, this defines which parameter will be adjusted to
    meet the required aspect. See `.set_adjustable` for further
    details.

anchor : None or str or (float, float), optional
    If not ``None``, this defines where the Axes will be drawn if there
    is extra space due to aspect constraints. The most common way
    to specify the anchor are abbreviations of cardinal directions:

    =====   =====================
    value   description
    =====   =====================
    'C'     centered
    'SW'    lower left corner
    'S'     middle of bottom edge
    'SE'    lower right corner
    etc.
    =====   =====================

    See `~.Axes.set_anchor` for further details.

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
matplotlib.axes.Axes.set_adjustable
    Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchor
    Set the position in case of extra space.
equalre   r  r   z#aspect must be finite and positive N)r7  T)r	   
_str_equalfloatr   isfiniter<   r  rd  rg  r/  r0  set_adjustable
set_anchorr  )	r$   aspect
adjustableanchorr7  rC   siblingr   r[   s	            r(   
set_aspect_AxesBase.set_aspect  s   ` FG,,F//6]F{"++f"5"5 !FGG(,(8(8 O(8#'#4#4T#:#G#G#M #M (8D OD 6DBJ  ))JJ4OOFO0
Os   2Dc                     U R                   $ )aL  
Return whether the Axes will adjust its physical dimension ('box') or
its data limits ('datalim') to achieve the desired aspect ratio.

See Also
--------
matplotlib.axes.Axes.set_adjustable
    Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_aspect
    For a description of aspect handling.
)r0  r
  s    r(   get_adjustable_AxesBase.get_adjustable  s     r+   c                 X   [         R                  " SS/US9  U(       aE  U R                   VVs1 s H+  nU R                  U   R	                  U 5        H  nUiM     M-     nnnOU /nUS:X  a"  [        S U 5       5      (       a  [        S5      eU H	  nXl        M     SU l        gs  snnf )a  
Set how the Axes adjusts to achieve the required aspect ratio.

Parameters
----------
adjustable : {'box', 'datalim'}
    If 'box', change the physical dimensions of the Axes.
    If 'datalim', change the ``x`` or ``y`` data limits. This
    may ignore explicitly defined axis limits.

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
matplotlib.axes.Axes.set_aspect
    For a description of aspect handling.

Notes
-----
Shared Axes (of which twinned Axes are a special case)
impose restrictions on how aspect ratios can be imposed.
For twinned Axes, use 'datalim'.  For Axes that share both
x and y, use 'box'.  Otherwise, either 'datalim' or 'box'
may be used.  These limitations are partly a requirement
to avoid over-specification, and partly a result of the
particular implementation we are currently using, in
which the adjustments for aspect ratios are done sequentially
and independently on each Axes as it is drawn.
r  datalimr  c              3   r   #    U  H-  n[        UR                  S S5      [        R                  :g  v   M/     g7f)__func__N)r   get_data_ratior   )r   r[   s     r(   r   +_AxesBase.set_adjustable.<locals>.<genexpr>  s4      '"%B   1 1:tD$334"%s   57zPCannot set Axes adjustable to 'datalim' for Axes which override 'get_data_ratio'TN)	r   r   r  rd  rg  r   r<   r0  r  )r$   r  r7  rC   r  axsr[   s          r(   r  _AxesBase.set_adjustable  s    > 	E9-*E'+'7'7 N'7t"&"3"3D"9"F"Ft"Lw "L '7C NC &C)# '"%' ' '
  D E EB'N 
Ns   2B&c                     U R                   $ )aU  
Return the Axes box aspect, i.e. the ratio of height to width.

The box aspect is ``None`` (i.e. chosen depending on the available
figure space) unless explicitly specified.

See Also
--------
matplotlib.axes.Axes.set_box_aspect
    for a description of box aspect.
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.
)_box_aspectr
  s    r(   get_box_aspect_AxesBase.get_box_aspect  s     r+   c                     1 U R                   R                  U 5      kU R                   R                  U 5      knUb%  [        U5      nU H  nUR                  S5        M     U H  nXl        SUl        M     g)a  
Set the Axes box aspect, i.e. the ratio of height to width.

This defines the aspect of the Axes in figure space and is not to be
confused with the data aspect (see `~.Axes.set_aspect`).

Parameters
----------
aspect : float or None
    Changes the physical dimensions of the Axes, such that the ratio
    of the Axes height to the Axes width in physical units is equal to
    *aspect*. Defining a box aspect will change the *adjustable*
    property to 'datalim' (see `~.Axes.set_adjustable`).

    *None* will disable a fixed box aspect so that height and width
    of the Axes are chosen independently.

See Also
--------
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.
Nr  T)re  rg  r  r  r  r  )r$   r  r  r[   s       r(   r<  _AxesBase.set_box_aspect  s}    .7""//5 7""//57 6]F !!),  B#NBH r+   c                     U R                   $ )z
Get the anchor location.

See Also
--------
matplotlib.axes.Axes.set_anchor
    for a description of the anchor.
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.
)r1  r
  s    r(   
get_anchor_AxesBase.get_anchorA  s     ||r+   c                    U[         R                  R                  ;   dD  [        U5      S:X  d5  [	        SSR                  [         R                  R                  5      -  5      eU(       aE  U R                   VVs1 s H+  nU R                  U   R                  U 5        H  nUiM     M-     nnnOU /nU H	  nXl	        M     SU l
        gs  snnf )u  
Define the anchor location.

The actual drawing area (active position) of the Axes may be smaller
than the Bbox (original position) when a fixed aspect is required. The
anchor defines where the drawing area will be located within the
available space.

Parameters
----------
anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
    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.).  str inputs are shorthands
    for (*x*, *y*) coordinates, as shown in the following diagram::

       ┌─────────────────┬─────────────────┬─────────────────┐
       │ 'NW' (0.0, 1.0) │ 'N' (0.5, 1.0)  │ 'NE' (1.0, 1.0) │
       ├─────────────────┼─────────────────┼─────────────────┤
       │ 'W'  (0.0, 0.5) │ 'C' (0.5, 0.5)  │ 'E'  (1.0, 0.5) │
       ├─────────────────┼─────────────────┼─────────────────┤
       │ 'SW' (0.0, 0.0) │ 'S' (0.5, 0.0)  │ 'SE' (1.0, 0.0) │
       └─────────────────┴─────────────────┴─────────────────┘

share : bool, default: False
    If ``True``, apply the settings to all shared Axes.

See Also
--------
matplotlib.axes.Axes.set_aspect
    for a description of aspect handling.
rd   zargument must be among %sr6   TN)rU   rW   coefsrj   r<   r>   r  rd  rg  r1  r  )r$   r  r7  rC   r  r   r[   s          r(   r  _AxesBase.set_anchorN  s    B +**000CK14D8!YY{'7'7'='=>? @ @(,(8(8 O(8#'#4#4T#:#G#G#M #M (8D OD 6DBJ  
Os   92C	c                 J   U R                   R                  5       R                  U R                  5       5      u  pU R                  R                  5       R                  U R                  5       5      u  p4[        [        X!-
  5      S5      n[        [        XC-
  5      S5      nXe-  $ )z|
Return the aspect ratio of the scaled data.

Notes
-----
This method is intended to be overridden by new projection types.
KH9)r   r  rP   
get_xboundr   
get_yboundr   abs)r$   txmintxmaxtymintymaxxsizeysizes          r(   r  _AxesBase.get_data_ratio|  s~     zz//1;;DOO<MNzz//1;;DOO<MNC&.C&.}r+   c                 b	   Uc  U R                  SS9nU R                  5       nUS:X  a  U R                  c  U R                  USS9  gU R	                  SS9R
                  n[        R                  R                  5       R                  U5      nUR                  UR                  -  nU R                  S	:X  a  X R                  ;   a  [        S
5      eX R                  5       -  nUR!                  5       nUR#                  XgU5      nU R                  UR%                  U R'                  5       U5      S5        gU R                  bc  UR!                  5       nUR#                  U R                  Xu5      nU R                  UR%                  U R'                  5       U5      S5        US:X  a  gU R                  c  U R                  USS9  O WR%                  U R'                  5       W5      nU R(                  R+                  5       n	U R,                  R+                  5       n
U	R/                  U R1                  5       5      u  pU
R/                  U R3                  5       5      u  p[5        [7        X-
  5      S5      n[5        [7        X-
  5      S5      nXQR                  UR                  -  -  nXb-  nUU-  U-  S-
  n[7        U5      S:  a  gU R8                  nU	R/                  UR:                  5      u  nnU
R/                  UR<                  5      u  nnSUU-
  -  nSUU-
  -  nUU-
  nUU-
  nUU-  nUU-  nUU-
  nUU-
  nSn Sn!X R>                  S   ;   n"X R>                  S   ;   n#U"(       a  U#(       a  [        S5      eU#(       a  Sn$OFUU :  a0  UU!:  a*  US:  =(       a    US:  =(       d    US:  =(       a    US:  n%OUS:  n%U"=(       d    U%n$U$(       ar  SX-   -  n&U&US-  -
  nU&US-  -   nU RA                  5       (       d  [B        RE                  S5        U RG                  U
RI                  5       R/                  UU/5      5        gSX-   -  n'U'US-  -
  nU'US-  -   nU RK                  5       (       d  [B        RE                  S5        U RM                  U	RI                  5       R/                  UU/5      5        g)a*  
Adjust the Axes for a specified data aspect ratio.

Depending on `.get_adjustable` this will modify either the
Axes box (position) or the view limits. In the former case,
`~matplotlib.axes.Axes.get_anchor` will affect the position.

Parameters
----------
position : None or .Bbox

    .. note::
        This parameter exists for historic reasons and is considered
        internal. End users should not use it.

    If not ``None``, this defines the position of the
    Axes within the figure as a Bbox. See `~.Axes.get_position`
    for further details.

Notes
-----
This is called automatically when each Axes is drawn.  You may need
to call it yourself if you need to update the Axes position and/or
view limits before the Figure is drawn.

An alternative with a broader scope is `.Figure.draw_without_rendering`,
which updates all stale components of a figure, not only the positioning /
view limits of a single Axes.

See Also
--------
matplotlib.axes.Axes.set_aspect
    For a description of aspect ratio handling.
matplotlib.axes.Axes.set_adjustable
    Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchor
    Set the position in case of extra space.
matplotlib.figure.Figure.draw_without_rendering
    Update all stale components of a figure.

Examples
--------
A typical usage example would be the following. `~.Axes.imshow` sets the
aspect to 1, but adapting the Axes position and extent to reflect this is
deferred until rendering for performance reasons. If you want to know the
Axes size before, you need to call `.apply_aspect` to get the correct
values.

>>> fig, ax = plt.subplots()
>>> ax.imshow(np.zeros((3, 3)))
>>> ax.bbox.width, ax.bbox.height
(496.0, 369.59999999999997)
>>> ax.apply_aspect()
>>> ax.bbox.width, ax.bbox.height
(369.59999999999997, 369.59999999999997)
NTr  r  r  r  FrS   r  zHAdjustable 'box' is not allowed in a twinned Axes; use 'datalim' insteadr  re   g{Gzt?g?r   r   r   zset_aspect(..., adjustable='datalim') or axis('equal') are not allowed when both axes are shared.  Try set_aspect(..., adjustable='box').r0         @zQIgnoring fixed y limits to fulfill fixed data aspect with adjustable data limits.zQIgnoring fixed x limits to fulfill fixed data aspect with adjustable data limits.)'r  r  r  r  rY   rZ   rU   rW   r*  transformedr.  r-  r0  re  RuntimeErrorr  r(  shrunk_to_aspectanchoredr  r   r  r   rP   r  r  r   r  r  	intervalx	intervalyrd  r#  _logwarning
set_yboundinvertedr  
set_xbound)(r$   positionr  transbb
fig_aspectr  pbpb1x_trfy_trfxminxmaxyminymaxr  r  
data_ratio
y_expanderdLr  r  r$  r%  xryrxmargymargYsizeXsizeXmargYmargxmymshared_xshared_yadjust_yadjyycxcs(                                           r(   r  _AxesBase.apply_aspect  si   r (($(7H"V 0 0 8xx8U+::""$007YY)
u$)))" $I J J"5"5"77J"B%%jjACs||DOO,=rBHM '"B%%d&6&6GCs||DOO,=rBHM #xx8||DOO$5r:H

((*

((*__T__%67
__T__%67
C$e,C$e,??X^^#CD
(
%'%/!3
z?U"\\.B.BR"WR"W

U"
"

,,S11,,S11  4 5 5 Hrzebj5zA~ 75zA~  "A~'4H$Beck!Beck!B))++ < =OOENN,66Bx@A$Beck!Beck!B))++ < =OOENN,66Bx@Ar+   )r  c         
         [        U[        [        45      (       Ga  USL a  SnUSL a  SnUR                  5       nUS:X  a  U R	                  5         GOUS:X  a  U R                  5         GOUS;   Ga  U R                  S5        U R                  S5        U R                  SS9  US:X  a  U R                  SS	S
9  GOmUS:X  a$  U R                  SSSS9  U R                  S5        GOCUS:X  a"  U R                  SS9  U R                  S5        GOUS:X  a3  U R                  SS9  U R                  S5        U R                  SSSS9  GOUS:X  a  U R                  SSSS9  U R                  S5        U R                  5       nU R                  5       n[        [        R                  " U5      [        R                  " U5      5      S   nU R                  US   US   U-   /USS9  U R                  US   US   U-   /USS9  GO)[!        SU< S35      eUb  [#        U5      S[#        U R$                  5      -  :w  a:  ['        SR)                  SR+                  S U R$                   5       5      5      5      e[-        U R$                  5       VVs0 s H  u  pxXSU-  SUS-   -   _M     n	nnOD0 n	U R$                   H2  nUR/                  U S3S5      n
UR/                  U S3S5      nX4X'   M4     U	R1                  5        H)  u  nu  pU
c  Uc  SOSn[3        U SU S35      nU" XX,S9  M+     U(       a  [4        R6                  " S U5      eS!nU R$                   H  n[3        U S"U S35      nX" 5       -  nM     U$ s  snnf )#aL
  
Convenience method to get or set some axis properties.

Call signatures::

  xmin, xmax, ymin, ymax = axis()
  xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax])
  xmin, xmax, ymin, ymax = axis(option)
  xmin, xmax, ymin, ymax = axis(**kwargs)

Parameters
----------
xmin, xmax, ymin, ymax : float, optional
    The axis limits to be set.  This can also be achieved using ::

        ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))

option : bool or str
    If a bool, turns axis lines and labels on or off. If a string,
    possible values are:

    ================ ===========================================================
    Value            Description
    ================ ===========================================================
    'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
                     tick marks, tick labels, and grid lines.
                     This is the same as `~.Axes.set_axis_off()`.
    'on' or `True`   Do not hide all axis decorations, i.e. axis labels, spines,
                     tick marks, tick labels, and grid lines.
                     This is the same as `~.Axes.set_axis_on()`.
    'equal'          Set equal scaling (i.e., make circles circular) by
                     changing the axis limits. This is the same as
                     ``ax.set_aspect('equal', adjustable='datalim')``.
                     Explicit data limits may not be respected in this case.
    'scaled'         Set equal scaling (i.e., make circles circular) by
                     changing dimensions of the plot box. This is the same as
                     ``ax.set_aspect('equal', adjustable='box', anchor='C')``.
                     Additionally, further autoscaling will be disabled.
    'tight'          Set limits just large enough to show all data, then
                     disable further autoscaling.
    'auto'           Automatic scaling (fill plot box with data).
    'image'          'scaled' with axis limits equal to data limits.
    'square'         Square plot; similar to 'scaled', but initially forcing
                     ``xmax-xmin == ymax-ymin``.
    ================ ===========================================================

emit : bool, default: True
    Whether observers are notified of the axis limit change.
    This option is passed on to `~.Axes.set_xlim` and
    `~.Axes.set_ylim`.

Returns
-------
xmin, xmax, ymin, ymax : float
    The axis limits.

See Also
--------
matplotlib.axes.Axes.set_xlim
matplotlib.axes.Axes.set_ylim

Notes
-----
For 3D Axes, this method additionally takes *zmin*, *zmax* as
parameters and likewise returns them.
TonFoff)r  r  scaledr  imagesquarer  r  r  r  r  r&  r  rf   )r  r  r  r'  r(  r   r  zUnrecognized string z to axis; try 'on' or 'off'Nrd   zAThe first argument to axis() must be an iterable of the form [{}]r6   c              3   0   #    U  H  o S U S3v   M     g7f)zmin, r   Nr0   )r   rC   s     r(   r   !_AxesBase.axis.<locals>.<genexpr>  s       0R@PfE$s3@Ps   re   minr   set_limr  r0   get_)r   r   boolr   rZ  set_axis_offset_autoscale_onr  r  r  r!  r   r   diffr  r"  r<   rj   r  r&  r=   r>   r   r   r    r   r   r   )r$   r   r  r2   xlimylim	edge_sizerx   rC   limitsax_minax_maxax_auto
set_ax_limlims
get_ax_lims                   r(   r  _AxesBase.axis.  s   F cC;''d{e|))+Cd{  "!!# K K%%d+'##%#0'>OOG	OBH_OOGcOJ))%0G^''d'3))%0G^''d'3))%0OOGcOJH_OOGcOJ))%0==?D==?D #BGGDM2774= A! DIMM47DGi,?"@'+% " 9MM47DGi,?"@'+% " 9 !#7w ?5 "5 6 6 s8qT%5%5!666#%vdii 0R@D@P@P0R 'R  ST T $-T-=-=#>#> ac!QqS'**#>  
  ,,D#ZZ4&d;F#ZZ4&d;F$*#3FL - +1,,.&&v$n   %  %TT$s+;<
6C +9 ""6622$$D dV3'78JJL D % -s   	M6c                     U R                   $ )z?Return the `.Legend` instance, or None if no legend is defined.)rM  r
  s    r(   
get_legend_AxesBase.get_legend  s    ||r+   c                 D    [         R                  " SU R                  5      $ )z6Return a list of `.AxesImage`\s contained by the Axes.r  )r	   silent_listr  r
  s    r(   
get_images_AxesBase.get_images  s      dkk::r+   c                 D    [         R                  " SU R                  5      $ )z-Return a list of lines contained by the Axes.r   )r	   rC  r  r
  s    r(   	get_lines_AxesBase.get_lines  s      4::66r+   c                     U R                   $ )z
[*Discouraged*] Return the XAxis instance.

.. admonition:: Discouraged

    The use of this function is discouraged. You should instead
    directly access the attribute `~.Axes.xaxis`.
)r   r
  s    r(   	get_xaxis_AxesBase.get_xaxis       zzr+   c                     U R                   $ )z
[*Discouraged*] Return the YAxis instance.

.. admonition:: Discouraged

    The use of this function is discouraged. You should instead
    directly access the attribute `~.Axes.yaxis`.
)r   r
  s    r(   	get_yaxis_AxesBase.get_yaxis  rL  r+   get_gridlinesget_ticklinesc                     [         R                  " [        R                  [        R
                  4US9  XR                  ;  a  [        S5      eXl        g)z
Set the current image.

This image will be the target of colormap functions like
``pyplot.viridis``, and other functions such as `~.pyplot.clim`.  The
current image is an attribute of the current Axes.
)imz4Argument must be an image or collection in this AxesN)	r   r'  r  r  r  r  r>  r<   rK  )r$   rS  s     r(   _sci_AxesBase._sci  sA     	u//1A1ABrJ^^#STT r+   c                     U R                   $ )z:Helper for `~matplotlib.pyplot.gci`; do not use elsewhere.)rK  r
  s    r(   _gci_AxesBase._gci  s    """r+   c                 :    [        S U R                   5       5      $ )z
Return whether any artists have been added to the Axes.

This should not be used to determine whether the *dataLim*
need to be updated, and may not actually be useful for
anything.
c              3      #    U  HM  n[        U[        R                  [        R                  [
        R                  [        R                  45      v   MO     g 7fr/   )	r   r  r  r  r  rk   r   r   r  )r   r   s     r(   r   %_AxesBase.has_data.<locals>.<genexpr>  sH      ,*q a%"2"2F4D4D"(--"A B B*s   AA)r   r>  r
  s    r(   has_data_AxesBase.has_data  s"      , NN, , 	,r+   c                    Xl         U R                  R                  U5        U R                  R                  Ul        U R                  U5        UR                  5       c  UR                  U R                  5        SU l	        U$ )a  
Add an `.Artist` to the Axes; return the artist.

Use `add_artist` only for artists for which there is no dedicated
"add" method; and if necessary, use a method such as `update_datalim`
to manually update the `~.Axes.dataLim` if the artist is to be included
in autoscaling.

If no ``transform`` has been specified when creating the artist (e.g.
``artist.get_transform() == None``) then the transform is set to
``ax.transData``.
T)
r   r>  r!   removerH  r  get_clip_pathr[  r)  r  r  s     r(   
add_artist_AxesBase.add_artist  sd     a >>00q!??$OODJJ'
r+   c                     Xl         [        R                  Ul        U R                  R                  U5        [        R                  " U R                  SS9R                  U R                  /S9Ul
        SU l        U$ )z{
Add an `.Axes` to the Axes' children; return the child Axes.

This is the lowlevel version.  See `.axes.Axes.inset_axes`.
FrS   )ownersT)rz  martist_stale_axes_callbackstale_callbackrJ  r!   	functoolspartialrY   _remove_axesrH  r  )r$   r[   s     r(   add_child_axes_AxesBase.add_child_axes	  sf     #88r"%--OOO'44doo=NP
	r+   c                    [         R                  " [        R                  US9  UR	                  5       (       d'  UR                  S[        U R                  5       35        U R                  R                  U5        U R                  R                  Ul
        U R                  U5        UR                  5       c  UR                  U R                  5        U(       a  U R                  5         UR!                  U R"                  5      nUR%                  5       n[&        R(                  " UR*                  5      R-                  5       (       d"  [&        R.                  " XCR*                  //5      nU R1                  U5        SU l        U$ )z9
Add a `.Collection` to the Axes; return the collection.
)
collection_childT)r   r'  r  r  ry  r8  rj   r>  r!   r_  rH  r  r`  r[  r)  r  get_datalimr  
get_pointsr   isinfminposr  concatenateupdate_datalimr  )r$   rn  autolimr  pointss        r(   add_collection_AxesBase.add_collection'	  s    	e..:F##%%  6#dnn*=)>!?@j)$(NN$9$9
!z*##%-$$TZZ0 !!# ,,T^^<G'')F88GNN+//11 ..1A(BC'
r+   c                 `   [         R                  " [        R                  US9  U R	                  U5        UR                  5       (       d'  UR                  S[        U R                  5       35        U R                  R                  U5        U R                  R                  Ul        SU l        U$ )z4
Add an `.AxesImage` to the Axes; return the image.
)r'  ro  T)r   r'  r  r  r  ry  r8  rj   r>  r!   r_  rH  r  )r$   r'  s     r(   	add_image_AxesBase.add_imageG	  s     	f..e<u%  OOfS%8$9:;e$#~~44
r+   c                 h    UR                  5       u  p#pEU R                  R                  X$4X5445        g r/   )
get_extentr   ru  )r$   r'  r  r  r  r  s         r(   _update_image_limits_AxesBase._update_image_limitsT	  s0    !&!1!1!3D		  4,!=>r+   c                    [         R                  " [        R                  US9  U R	                  U5        UR                  5       c  UR                  U R                  5        U R                  U5        UR                  5       (       d'  UR                  S[        U R                  5       35        U R                  R                  U5        U R                  R                  Ul        SU l        U$ )z/
Add a `.Line2D` to the Axes; return the line.
)linero  T)r   r'  rk   r   r  r`  r[  r)  _update_line_limitsry  r8  rj   r>  r!   r_  rH  r  )r$   r  s     r(   add_line_AxesBase.add_lineX	  s     	fmm$7t$'tzz*  &~~NNVC$7#89:d#"nn33
r+   c                     [         R                  " [        R                  US9  U R	                  U5        U R
                  R                  U5        U R
                  R                  Ul        SU l	        U$ )z-
Add a `.Text` to the Axes; return the text.
)txtT)
r   r'  rR  rS  r  r>  r!   r_  rH  r  )r$   r  s     r(   	_add_text_AxesBase._add_texti	  sV     	ejjc2s#c"!^^22

r+   c                 ,   UR                  5       nUR                  R                  S:X  a  gUR                  5       nX0R                  :X  a  UnO[        UR                  U R                  5      5      (       ao  X0R                  -
  nU R                  R                  (       a4  UR                  5       nUR                  5       u  pxUR                  U5      nOUR                  U5      nOUnUR                  R                  (       d  gUR                  U R                  5      u  pU R                  S:w  a8  U	(       a  X0R                  5       :X  a  Sn	U
(       a  X0R                  5       :X  a  Sn
U R                  R!                  UU R"                  XS9  SU l        g)zI
Figures out the data limit of the given line, updating `.Axes.dataLim`.
r   Nr   Fupdatexupdatey)get_pathverticesr.  r  r  r   contains_branch_seperately	is_affine_get_transformed_pathget_transformed_path_and_affinetransform_path_affinetransform_pathrC   r  r  r  update_from_pathr=  )r$   r  pathline_trf	data_pathtrf_to_dataline_trans_pathna_path_r  r  s              r(   r  _AxesBase._update_line_limitst	  sN    }}=="%%'~~%I44T^^DEE"^^3K ~~''"&"<"<">,LLN
'==gF	'66t<	 I!!&&#>>t~~N99% 8'?'?'AA8'?'?'AA%%i&*&F&F.5 	& 	H ,1(r+   c                 T   [         R                  " [        R                  US9  U R	                  U5        UR                  5       c  UR                  U R                  5        U R                  U5        U R                  R                  U5        U R                  R                  Ul        U$ )z/
Add a `.Patch` to the Axes; return the patch.
)p)r   r'  r   r  r  r`  r[  r)  _update_patch_limitsr>  r!   r_  rH  )r$   r  s     r(   	add_patch_AxesBase.add_patch	  sz     	hnn2q!??$OODJJ'!!!$a >>00r+   c                    [        U[        R                  5      (       a+  UR                  5       (       d  UR	                  5       (       d  gUR                  5       n/ nUR                  SS9 H3  u  pEUR                  5       u  pgUR                  U" S/UQSP5      5        M5     [        U5      (       a  [        R                  " U5      nUR                  5       nUR                  U R                  5      u  pU	(       d  U
(       d  gU R                  S:w  a8  U	(       a  XR!                  5       :X  a  Sn	U
(       a  XR#                  5       :X  a  Sn
XR                  -
  nUR%                  U5      nU R'                  XU
S9  g)z+Update the data limits for the given patch.NF)simplifyr   re   r   r  )r   r   r	  	get_width
get_heightr  iter_bezieraxis_aligned_extremar!   rj   r   vstackr  r  r  rC   r  r  rP   ru  )r$   r)  r  r  curvecoder  dzeros	patch_trfr  r  r  xyss                r(   r  _AxesBase._update_patch_limits	  s7    uh0011oo''%2B2B2D2DNN ==%=8KE224IAOOE1/v/q/23	 9 x==yy*H'')	$??O799%9(@(@(BB9(@(@(BB..0##H-C'Br+   c                 2   [         R                  " [        R                  US9  U R	                  U5        U R
                  R                  U5        UR                  5       c  UR                  U R                  5        U R
                  R                  Ul        U$ )z/
Add a `.Table` to the Axes; return the table.
)tab)r   r'  r  r  r  r>  r!   r`  r[  r)  r_  rH  )r$   r  s     r(   	add_table_AxesBase.add_table	  sp     	fll4s#c"&djj)!^^22
r+   c                     UR                  5       nU(       d'  UR                  S[        U R                  5      -  5        U R                  R	                  U5        U R                  R
                  Ul        U$ )zC
Add a `.Container` to the Axes' containers; return the container.
z_container%d)ry  r8  rj   rN  r!   r_  rH  )r$   	containerr   s      r(   add_container_AxesBase.add_container	  s[     ##%T__1E EFy)#'??#9#9	 r+   c                     Uc(  [         R                  " U R                  U[        5       S9$ [        R
                  " U R                  US9  U R                   H  nUR                  5         M     U R                  5         U R                  U5        g)zG
Process axis units changes: requests updates to data and view limits.
N)event)	axis_name)rh  ri  rT  objectr   r   r  r  recache_alwaysrelimr  )r$   r  r  r  s       r(   rT  _AxesBase._unit_change_handler	  sr     =$$))9FHF F4>>Y?JJD! 

$$Y/r+   c                 `   U R                   R                  S5        U R                   R                  [        R                  R                  5       R                  5       5        SU l        U R                   H  nU(       a  UR                  5       (       d  M!  [        U[        R                  5      (       a  U R                  U5        MS  [        U[        R                  5      (       a  U R!                  U5        M  [        U["        R$                  5      (       d  M  U R'                  U5        M     g)z
Recompute the data limits based on current artists.

At present, `.Collection` instances are not supported.

Parameters
----------
visible_only : bool, default: False
    Whether to exclude invisible artists.
TN)r  r   
set_pointsrU   rW   r  rq  r=  r>  r;  r   rk   r   r  r   r  r  r  r  r  )r$   visible_onlyrt  s      r(   r  _AxesBase.relim	  s     	D! 0 0 5 5 7 B B DE+/(nnF6#5#5#7#7ffmm44,,V477--f5(8(899--f5 %r+   c                     [         R                  " U5      n[         R                  " [         R                  " U5      5      (       d  gU R                  R                  XR                  X#S9  SU l        g)a  
Extend the `~.Axes.dataLim` Bbox to include the given points.

If no data is set currently, the Bbox will ignore its limits and set
the bound to be the bounds of the xydata (*xys*). Otherwise, it will
compute the bounds of the union of its current data and the data in
*xys*.

Parameters
----------
xys : 2D array-like
    The points to include in the data limits Bbox. This can be either
    a list of (x, y) tuples or a (N, 2) array.

updatex, updatey : bool, default: True
    Whether to update the x/y limits.
Nr  F)r   asarrayr   r  r  update_from_data_xyr=  )r$   r  r  r  s       r(   ru  _AxesBase.update_datalim
  sW    $ jjovvbkk#&''((.N.N18 	) 	K+0(r+   )convertc                   U=(       d    / nU=(       d    0 nU R                   nU H<  u  pV XE   nUc  M  Uc  M  UR                  5       (       a  M+  UR	                  U5        M>     UR                  5        H  u  pWUc  M
  UR                  U S3UR                  5      nU R                  S:X  a  SSS.n	UR                  X   U5      nXR                  :w  d  Mc  Uc  Mh  UR                  U5        U H"  u  pX:X  d  M  Uc  M  UR	                  U5        M$     M     U VVs/ s H$  u  pVU(       a  Ub  XE   R                  U5      OUPM&     snn$ ! [         a    [        SU< 35      Sef = fs  snnf )a  
Set axis units based on *datasets* and *kwargs*, and optionally apply
unit conversions to *datasets*.

Parameters
----------
datasets : list
    List of (axis_name, dataset) pairs (where the axis name is defined
    as in `._axis_map`).  Individual datasets can also be None
    (which gets passed through).
kwargs : dict
    Other parameters from which unit info (i.e., the *xunits*,
    *yunits*, *zunits* (for 3D Axes), *runits* and *thetaunits* (for
    polar) entries) is popped, if present.  Note that this dict is
    mutated in-place!
convert : bool, default: True
    Whether to return the original datasets or the converted ones.

Returns
-------
list
    Either the original datasets if *convert* is False, or the
    converted ones if *convert* is True (the default).
zInvalid axis name: Nr  r8  
thetaunitsrunitsr   )r  KeyErrorr<   
have_unitsr   r    r   r  rC   	set_unitsconvert_units)r$   datasetsr2   r  axis_mapr  r   r  r  polar_unitsdataset_axis_names              r(   r   _AxesBase._process_unit_info0
  su   : >r2>>'OIP* D$4T__=N=N!!$'  (  (~~/OI|JJ)E2DJJ?EyyG#$0x@

;#95A

"u'8u% 08+%(5$:J))$/ 08  0& (01'/OI t/ #11$759:'/1 	1-  P #6ym!DE4OP,1s   E+E,E)c                 >    U R                   R                  U5      S   $ )zD
Return whether the given event (in display coords) is in the Axes.
r   r)  containsr$   
mouseevents     r(   in_axes_AxesBase.in_axesm
  s     zz"":.q11r+   _get_autoscale_on_set_autoscale_onc                 V    [        S U R                  R                  5        5       5      $ )z8Return True if each axis is autoscaled, False otherwise.c              3   B   #    U  H  nUR                  5       v   M     g 7fr/   )r  )r   r  s     r(   r   -_AxesBase.get_autoscale_on.<locals>.<genexpr>z
  s#      86t ))++6s   )r  r  r  r
  s    r(   get_autoscale_on_AxesBase.get_autoscale_onx
  s)     8#~~4468 8 	8r+   c                 h    U R                   R                  5        H  nUR                  U5        M     g)z
Set whether autoscaling is applied to each axis on the next draw or
call to `.Axes.autoscale_view`.

Parameters
----------
b : bool
N)r  r  r  )r$   br  s      r(   r2  _AxesBase.set_autoscale_on}
  s)     NN))+D""1% ,r+   c                     U R                   $ )a  
When autoscaling, whether to obey all `.Artist.sticky_edges`.

Default is ``True``.

Setting this to ``False`` ensures that the specified margins
will be applied, even if the plot includes an image, for
example, which would otherwise force a view limit to coincide
with its data limit.

The changing this property does not change the plot until
`autoscale` or `autoscale_view` is called.
)rD  r
  s    r(   use_sticky_edges_AxesBase.use_sticky_edges
  s     %%%r+   c                 $    [        U5      U l        g r/   )r0  rD  r$   r  s     r(   r  r  
  s    !%ar+   c                     U R                   $ )z
Retrieve autoscaling margin of the x-axis.

.. versionadded:: 3.9

Returns
-------
xmargin : float

See Also
--------
matplotlib.axes.Axes.set_xmargin
)rB  r
  s    r(   get_xmargin_AxesBase.get_xmargin
       }}r+   c                     U R                   $ )z
Retrieve autoscaling margin of the y-axis.

.. versionadded:: 3.9

Returns
-------
ymargin : float

See Also
--------
matplotlib.axes.Axes.set_ymargin
)rC  r
  s    r(   get_ymargin_AxesBase.get_ymargin
  r  r+   c                 b    US::  a  [        S5      eXl        U R                  S5        SU l        g)a  
Set padding of X data limits prior to autoscaling.

*m* times the data interval will be added to each end of that interval
before it is used in autoscaling.  If *m* is negative, this will clip
the data range instead of expanding it.

For example, if your data is in the range [0, 2], a margin of 0.1 will
result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
of [0.2, 1.8].

Parameters
----------
m : float greater than -0.5
       margin must be greater than -0.5r   TN)r<   rB  r  r  r$   ms     r(   set_xmargin_AxesBase.set_xmargin
  1      9?@@$$S)
r+   c                 b    US::  a  [        S5      eXl        U R                  S5        SU l        g)a  
Set padding of Y data limits prior to autoscaling.

*m* times the data interval will be added to each end of that interval
before it is used in autoscaling.  If *m* is negative, this will clip
the data range instead of expanding it.

For example, if your data is in the range [0, 2], a margin of 0.1 will
result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
of [0.2, 1.8].

Parameters
----------
m : float greater than -0.5
r  r  r   TN)r<   rC  r  r  r  s     r(   set_ymargin_AxesBase.set_ymargin
  r  r+   )r   r   r  c                   U(       a  Uc  Ub  [        S5      e[        U5      S:X  a  US   =pO&[        U5      S:X  a  Uu  pOU(       a  [        S5      eUc;  Uc8  USLa  [        R                  " SU< S	35        U R                  U R
                  4$ Ub  X0l        Ub  U R                  U5        Ub  U R                  U5        gg)
a  
Set or retrieve margins around the data for autoscaling axis limits.

This allows to configure the padding around the data without having to
set explicit limits using `~.Axes.set_xlim` / `~.Axes.set_ylim`.

Autoscaling determines the axis limits by adding *margin* times the
data interval as padding around the data. See the following illustration:

.. plot:: _embedded_plots/axes_margins.py

All input parameters must be floats greater than -0.5. Passing both
positional and keyword arguments is invalid and will raise a TypeError.
If no arguments (positional or otherwise) are provided, the current
margins will remain unchanged and simply be returned.

The default margins are :rc:`axes.xmargin` and :rc:`axes.ymargin`.

Parameters
----------
*margins : float, optional
    If a single positional argument is provided, it specifies
    both margins of the x-axis and y-axis limits. If two
    positional arguments are provided, they will be interpreted
    as *xmargin*, *ymargin*. If setting the margin on a single
    axis is desired, use the keyword arguments described below.

x, y : float, optional
    Specific margin values for the x-axis and y-axis,
    respectively. These cannot be used with positional
    arguments, but can be used individually to alter on e.g.,
    only the y-axis.

tight : bool or None, default: True
    The *tight* parameter is passed to `~.axes.Axes.autoscale_view`,
    which is executed after a margin is changed; the default
    here is *True*, on the assumption that when margins are
    specified, no additional padding to match tick marks is
    usually desired.  Setting *tight* to *None* preserves
    the previous setting.

Returns
-------
xmargin, ymargin : float

Notes
-----
If a previously used Axes method such as :meth:`pcolor` has set
`~.Axes.use_sticky_edges` to `True`, only the limits not set by
the "sticky artists" will be modified. To force all
margins to be set, set `~.Axes.use_sticky_edges` to `False`
before calling :meth:`margins`.

See Also
--------
.Axes.set_xmargin, .Axes.set_ymargin
NzACannot pass both positional and keyword arguments for x and/or y.re   r   rd   zVMust pass a single positional argument for all margins, or one for each margin (x, y).Tzignoring tight=z in get mode)	r&  rj   r   r   rB  rC  r  r  r  )r$   r   r   r  marginss        r(   r  _AxesBase.margins
  s    v  8 9 9\QAJA\QDAq F G G 9D ""_UI\#JK==$--//K=Q=Q r+   c                     Xl         SU l        g)a  
Set the zorder threshold for rasterization for vector graphics output.

All artists with a zorder below the given value will be rasterized if
they support rasterization.

This setting is ignored for pixel-based output.

See also :doc:`/gallery/misc/rasterization_demo`.

Parameters
----------
z : float or None
    The zorder below which artists are rasterized.
    If ``None`` rasterization based on zorder is deactivated.
TN)rI  r  )r$   zs     r(   set_rasterization_zorder"_AxesBase.set_rasterization_zorder=  s    " &'"
r+   c                     U R                   $ )z?Return the zorder value below which artists will be rasterized.)rI  r
  s    r(   get_rasterization_zorder"_AxesBase.get_rasterization_zorderQ  s    )))r+   c                    Uc  SnSnOfUS;   a+  U R                  [        U5      5        U R                  5       nOSnUS;   a+  U R                  [        U5      5        U R	                  5       nOSnU(       a  U(       a  SU l        U(       a  U(       a  SU l        U(       a  U R                  SUS9  U(       a  U R                  S	US9  gg)
a  
Autoscale the axis view to the data (toggle).

Convenience method for simple axis view autoscaling.
It turns autoscaling on or off, and then,
if autoscaling for either axis is on, it performs
the autoscaling on the specified axis or Axes.

Parameters
----------
enable : bool or None, default: True
    True turns autoscaling on, False turns it off.
    None leaves the autoscaling state unchanged.
axis : {'both', 'x', 'y'}, default: 'both'
    The axis on which to operate.  (For 3D Axes, *axis* can also be set
    to 'z', and 'both' refers to all three Axes.)
tight : bool or None, default: None
    If True, first set the margins to zero.  Then, this argument is
    forwarded to `~.axes.Axes.autoscale_view` (regardless of
    its value); see the description of its behavior there.
NTr   r  Fr   r  r   r   r)  r   )set_autoscalex_onr0  r  set_autoscaley_onr#  rB  rC  r  )r$   enabler  r  scalexscaleys         r(   	autoscale_AxesBase.autoscaleU  s    , >FF}$&&tF|4//1}$&&tF|4//1VDMVDM((E(:((E(: r+   c           
        ^  Ub  [        U5      T l        [        R                  " / 5      =pET R                  (       Gad  T R
                  (       a  U(       a  T R                  5       (       a  [        R                  " [        R                  " T R                  S   R                  T 5       VVs/ s H1  nUR                  5         H  nUR                  R                  PM     M3     snn5      5      nT R                  (       a  U(       a  T R                  5       (       a  [        R                  " [        R                  " T R                  S   R                  T 5       VVs/ s H1  nUR                  5         H  nUR                  R                   PM     M3     snn5      5      nT R#                  5       S:X  a  XDS:     nT R%                  5       S:X  a  XUS:     nU 4S jnU" UT R                  S   ST R&                  T R
                  UT R(                  5        U" UT R                  S   ST R*                  T R                  UT R,                  5        gs  snnf s  snnf )a  
Autoscale the view limits using the data limits.

Parameters
----------
tight : bool or None
    If *True*, only expand the axis limits using the margins.  Note
    that unlike for `autoscale`, ``tight=True`` does *not* set the
    margins to zero.

    If *False* and :rc:`axes.autolimit_mode` is 'round_numbers', then
    after expansion by the margins, further expand the axis limits
    using the axis major locator.

    If None (the default), reuse the value set in the previous call to
    `autoscale_view` (the initial value is False, but the default style
    sets :rc:`axes.autolimit_mode` to 'data', in which case this
    behaves like True).

scalex : bool, default: True
    Whether to autoscale the x-axis.

scaley : bool, default: True
    Whether to autoscale the y-axis.

Notes
-----
The autoscaling preserves any preexisting axis direction reversal.

The data limits are not updated automatically when artist data are
changed after the artist has been added to an Axes instance.  In that
case, use :meth:`matplotlib.axes.Axes.relim` prior to calling
autoscale_view.

If the views of the Axes are fixed, e.g. via `set_xlim`, they will
not be changed by autoscale_view().
See :meth:`matplotlib.axes.Axes.autoscale` for an alternative.
Nr   r   logr   c           	        >^ U (       a  UR                  5       (       d  g UR                  T5      nU VV	s/ s HC  n[        UR                  ST 35        H"  n	[        R
                  " U	5      (       d  M   U	PM$     ME     n
nn	U
(       a  [        U
5      [        U
5      pOD[        TR                  ST 35      " 5       (       a  g [        R                  * [        R                  pUR                  5       nUR                  X5      u  p[        U4S jU 5       5      nS[        X-
  5      -  nUR                  X-   5      S-
  nUS:w  a  UU   OS nUR                  X-
  5      nU[        U5      :w  a  UU   OS nUR                  5       nUR!                  5       nUR"                  R%                  XU5      u  pUR'                  X/5      u  nnUU-
  U-  n[        R
                  " U5      (       d  SnUR'                  UU-
  UU-   /5      u  pUb  [        UU5      nUb  [        UU5      nTR(                  (       d  UR+                  X5      u  pU" X5        g s  sn	nf )Nintervalmutatedc              3   V   >#    U  H  n[        UR                  S T 35      v   M      g7f)rs  N)r   r  r  s     r(   r   G_AxesBase.autoscale_view.<locals>.handle_single_axis.<locals>.<genexpr>  s)      !G?E

fTFO44vs   &)gh㈵>re   r   r   )r  rg  r   r  r   r  r,  r   r  infget_major_locatornonsingularr  searchsortedrj   r  r  r  limit_range_for_scalerP   r  view_limits)r  rl  rC   r  marginstickies	set_boundsharedr[   r   r  r  r  r  minimum_minpostoli0x0boundi1x1boundrP   inverse_transx0tx1tdeltar$   s     `                      r(   handle_single_axis4_AxesBase.autoscale_view.<locals>.handle_single_axis  s,    d4466 --d3F %+ +Fb!(xv5F!G#S) !G FF + f+s6{B'$(89;; 66'266B,,.G((0FB  !G?E!G GN RW%C&&rx014B&(BhhrlDG&&rx0B&(CM&9hrltG **,I%..0M[[66r~NFB **B84HC3Y&(E;;u%%",,cEk3;-GHFB "W%"W%;; ,,R4be+s   <I6
I)r0  r  r   arrayr  rB  r  sortrt  rd  rg  get_childrensticky_edgesr   rC  r#  r   
get_xscale
get_yscaler   r  r   r   )	r$   r  r  r  
x_stickies
y_stickiesr[   rt  r,  s	   `        r(   r  _AxesBase.autoscale_view  s   N u+DK"$((2,.
   }}D,B,B,D,DWWR^^"//4AA$G55G"$//"3 ''))"3 *G55 &6 7
 }}D,B,B,D,DWWR^^"//4AA$G55G"$//"3 ''))"3 *G55 &6 7
 ??%#N3J??%#N3J;	| 	D%%c*CT]]	) 	D%%c*CT]]	)_55
55s   ,8I8Ic                 8   U R                   b'  U R                   (       d  [        R                  S5        gU R                  U R                  U R
                  4n[        S U 5       5      (       d  g[        5       nUR                  U R                  5        UR                  U R                  R                  U 5      5        UR                  U R                  SS9R                  S   R                  U 5      5        U R                   H3  nUR                  5       nUR                  U(       a  U" X5      OS5        M5     [         R"                  * nU H  nSnUR$                  R'                  5       S;   d  UR$                  R)                  5       S:X  a  UR$                  R+                  U5      nUc*  UR,                  R/                  S	U5      R1                  5       n[3        XgR4                  5      nM     U GH  nUR7                  5       u  pUR9                  U	S
45        UR;                  5       (       a  U H  nUR<                  R+                  U5        UR<                  R>                  R;                  5       (       d  MI  UR<                  R>                  R+                  U5      nURA                  UR+                  U5      U5      (       d  M  UR4                  nM     US:  a  [        R                  S5          gUR1                  U5      RB                  U:  d  GM%  U RD                  RG                  5       RI                  SU45      u  pUR9                  X45        UR1                  U5      RB                  U:  d  GM  U RD                  RG                  5       RI                  SSU-  UR1                  U5      RB                  -
  45      u  pUR9                  X45        GM     [3        S U 5       5      nU H'  nUR7                  5       u  pUR9                  X45        M)     g)zq
Update the title position based on the bounding box enclosing
all the ticklabels and x-axis spine and xlabel...
Nz2title position was updated manually, not adjustingc              3   @   #    U  H  oR                  5       v   M     g 7fr/   )r{  r   r~  s     r(   r   3_AxesBase._update_title_position.<locals>.<genexpr>  s     8>>##s   FrS   r~  )r  unknownr  outliner  r   z1top of Axes not in the figure, so title not movedr  rd   c              3   F   #    U  H  oR                  5       S    v   M     g7f)re   N)r  r9  s     r(   r   r:  B  s     ?u%%'*s   !)%rQ  r  debugr~  rT  rU  r   r   updaterJ  re  rg  rY   _align_label_groupsr  r  r   r  r   get_ticks_positionget_label_positionget_tightbboxrD  r   r  r   r  r  r  r{  r   
offsetTextintersectionr  r  r  rP   )r$   r\   r}  r  r[   r  r  r  r~  r   r  r   r  s                r(   _update_title_position _AxesBase._update_title_position  s=   
 )$2D2DJJKL**d..0A0AB8888 e

4??#

4%%22489

OOO';;GDQQRVW	Y //B))+GOOwGD3DI " vvgBB++-1CCHH//1U:XX++H5zYY]]9b1CCEc77#C  E%%'DA3x(~~BHH**84xx**3355XX00>>xH??5+>+>x+H"MM"$''C  Qw 

NO&&x055;~~..0::As8D""A6* **8499C?>>224>>QWu'>'>x'H'M'MMNPDA&&v.1 4 ???E%%'DAy) r+   c           	         Uc  [        S5      eU R                  5       (       d  g U R                  5         UR                  SU R	                  5       S9  SU l        U R                  5       nU R                  U(       a  U" X5      OS 5        U R                  5       nUR                  U R                  5        U R                  (       a  U R                  (       d2  U R                  R                  5        H  nUR                  U5        M     U R                  U5        U R                  (       d2  U R                   R                  5        H  nUR                  U5        M     U R#                  SS9R$                  R'                  5       (       dH  U Vs/ s H;  nUR)                  5       (       a!  [+        U[,        R.                  5      (       d  M9  UPM=     nn[1        U[3        S5      S9nU R4                  nUbT  U(       aM  US   R6                  U:  a:  [8        R:                  " U Vs/ s H  oR6                  PM     snUS	S
9n	US U	 n
X9S  nO/ n
U R                  (       a9  U R                  (       a(  U
(       a  U R                  /U
-   n
OU R                  /U-   nU
(       a  [=        U R#                  SS9X5        [,        R>                  " XX0R#                  SS9R@                  5        URC                  S5        SU l"        g s  snf s  snf )NzNo renderer definedr   )gidTrS   zorderr  r   r   )r  F)#r  r;  r  
open_groupget_gidrk  r  r  r0  r_  r)  axisonrG  rD  r  rF  r  rY   canvas	is_savingget_animatedr   r  r  sortedr   rI  rJ  r   r  _draw_rasterized_draw_list_compositing_imagessuppressCompositeclose_groupr  )r$   r\   r  r  rb  _axisr   rasterization_zorderartsplit_indexartists_rasterizeds              r(   draw_AxesBase.drawI  s{    455!!F7  '')W'$1$G##%tzz" ++-u% . 	##H-{{..0u% 1 D)00::<<"L"a~~'':a9I9I+J 7  L j&:;  $99 ,GAJ--0DD//'./ww/$7K ")+!6l+G!#;;4==!&*jj\4F%F"::,0T__$_79KV,,G__$_%?%Q%Q	S 	V$
CL 0s   8K:	K:!K?c                 p    UR                  U R                  SS9R                  R                  5       5        g)z%
Efficiently redraw a single artist.
TrS   N)r\  rY   rO  get_rendererr  s     r(   draw_artist_AxesBase.draw_artist  s*     	
tD)00==?@r+   c                    [        5        n/ U R                  R                  5       QU R                  PU R                  PU R
                  P H!  nUR                  UR                  SS95        M#     U R                  U R                  SS9R                  R                  5       5        SSS5        g! , (       d  f       g= f)z@
Efficiently redraw Axes data, but not axis ticks, labels, etc.
F)visibleTrS   N)r   r  r  r~  rT  rU  enter_context_cm_setr\  rY   rO  r_  )r$   r   rt  s      r(   redraw_in_frame_AxesBase.redraw_in_frame  s     [ELDNN113 L::L'+'7'7L9=9J9JL##FNN5N$ABL IIdoo4o077DDFG	 [[s   BB00
B>c                     U R                   $ )z.Get whether the Axes rectangle patch is drawn.)rG  r
  s    r(   get_frame_on_AxesBase.get_frame_on  s    }}r+   c                     Xl         SU l        g)zP
Set whether the Axes rectangle patch is drawn.

Parameters
----------
b : bool
TN)rG  r  r  s     r(   set_frame_on_AxesBase.set_frame_on  s     
r+   c                     U R                   $ )z
Get whether axis ticks and gridlines are above or below most artists.

Returns
-------
bool or 'line'

See Also
--------
set_axisbelow
)
_axisbelowr
  s    r(   get_axisbelow_AxesBase.get_axisbelow  s     r+   c                     [        U5      =U l        nSSSS.U   nU R                  R                  5        H  nUR	                  U5        M     SU l        g)a  
Set whether axis ticks and gridlines are above or below most artists.

This controls the zorder of the ticks and gridlines. For more
information on the zorder see :doc:`/gallery/misc/zorder_demo`.

Parameters
----------
b : bool or 'line'
    Possible values:

    - *True* (zorder = 0.5): Ticks and gridlines are below patches and
      lines, though still above images.
    - 'line' (zorder = 1.5): Ticks and gridlines are above patches
      (e.g. rectangles, with default zorder = 1) but still below lines
      and markers (with their default zorder = 2).
    - *False* (zorder = 2.5): Ticks and gridlines are above patches
      and lines / markers.

Notes
-----
For more control, call the `~.Artist.set_zorder` method of each axis.

See Also
--------
get_axisbelow
r0  g      ?g      @)Tr  FTN)r   ro  r  r  
set_zorderr  )r$   r  	axisbelowrJ  r  s        r(   rH  _AxesBase.set_axisbelow  s[    : '9&;;)
 	
 NN))+DOOF# ,
r+   c                     [         R                  " / SQUS9  US;   a  U R                  R                  " U4SU0UD6  US;   a   U R                  R                  " U4SU0UD6  gg)a  
Configure the grid lines.

Parameters
----------
visible : bool or None, optional
    Whether to show the grid lines.  If any *kwargs* are supplied, it
    is assumed you want the grid on and *visible* will be set to True.

    If *visible* is *None* and there are no *kwargs*, this toggles the
    visibility of the lines.

which : {'major', 'minor', 'both'}, optional
    The grid lines to apply the changes on.

axis : {'both', 'x', 'y'}, optional
    The axis to apply the changes on.

**kwargs : `~matplotlib.lines.Line2D` properties
    Define the line properties of the grid, e.g.::

        grid(color='r', linestyle='-', linewidth=2)

    Valid keyword arguments are:

    %(Line2D:kwdoc)s

Notes
-----
The axis is drawn as a unit, so the effective zorder for drawing the
grid is determined by the zorder of each axis, not by the zorder of the
`.Line2D` objects comprising the grid.  Therefore, to set grid zorder,
use `.set_axisbelow` or, for more control, call the
`~.Artist.set_zorder` method of each axis.
r   r   r  r  r  r#  r	  N)r   r   r   r  r   )r$   rc  r#  r  r2   s        r(   r  _AxesBase.grid  s_    J 	-D9= JJOOG;5;F;= JJOOG;5;F; !r+   )r  style	scilimits	useOffset	useLocaleuseMathTextc                   [        U[        5      (       a  UR                  5       nUR                  5       nUb   Uu  pxXx-   S-     SSSSSS.n
[
        R                  " XS9n0 U R                  R                  5        VVs0 s H  u  pX/_M
     snnES[        U R                  R                  5       5      0En[
        R                  " XS	9n U H  nUb%  UR                  R                  R                  U5        Ub%  UR                  R                  R                  U5        Ub%  UR                  R                  R                  U5        Ub%  UR                  R                  R!                  U5        Uc  M  UR                  R                  R#                  U5        M     g! [        [        4 a  n	[        S5      U	eSn	A	ff = fs  snnf ! [$         a  n	[%        S
5      U	eSn	A	ff = f)a  
Configure the `.ScalarFormatter` used by default for linear Axes.

If a parameter is not set, the corresponding property of the formatter
is left unchanged.

Parameters
----------
axis : {'x', 'y', 'both'}, default: 'both'
    The axis to configure.  Only major ticks are affected.

style : {'sci', 'scientific', 'plain'}
    Whether to use scientific notation.
    The formatter default is to use scientific notation.
    'sci' is equivalent to 'scientific'.

scilimits : pair of ints (m, n)
    Scientific notation is used only for numbers outside the range
    10\ :sup:`m` to 10\ :sup:`n` (and only if the formatter is
    configured to use scientific notation at all).  Use (0, 0) to
    include all numbers.  Use (m, m) where m != 0 to fix the order of
    magnitude to 10\ :sup:`m`.
    The formatter default is :rc:`axes.formatter.limits`.

useOffset : bool or float
    If True, the offset is calculated as needed.
    If False, no offset is used.
    If a numeric value, it sets the offset.
    The formatter default is :rc:`axes.formatter.useoffset`.

useLocale : bool
    Whether to format the number using the current locale or using the
    C (English) locale.  This affects e.g. the decimal separator.  The
    formatter default is :rc:`axes.formatter.use_locale`.

useMathText : bool
    Render the offset and scientific notation in mathtext.
    The formatter default is :rc:`axes.formatter.use_mathtext`.

Raises
------
AttributeError
    If the current formatter is not a `.ScalarFormatter`.
Nre   z*scilimits must be a sequence of 2 integersTF)sci
scientificplainr  N)ry  r  r  z/This method only works with the ScalarFormatter)r   r   r   r<   r&  r   r  r  r    r   r  r$  	formatterset_scientificset_powerlimitsset_useOffsetset_useLocaleset_useMathTextAttributeError)r$   r  ry  rz  r{  r|  r}  r  nerrSTYLESis_sci_styler&   r'   r  axisess                   r(   ticklabel_format_AxesBase.ticklabel_format  s   \ eS!!KKMEzz| , 	 TEtSWX))&>;$..*>*>*@A*@$!q#v*@A ;D!6!6!89;##H8	L+JJ((77E(JJ((88C(JJ((66yA(JJ((66yA*JJ((88E  	* , !M #(+,, B  	L ACHKL	Ls<   F! ?GB&G 7)G !G1F==G
G&G!!G&c                    [         R                  " / U R                  QSPUS9  U R                   HJ  nXS4;   d  M  U R                  U   R	                  5       nUR
                  " S0 UD6  U R                  XBS9  ML     SU l        g)a  
Control behavior of major tick locators.

Because the locator is involved in autoscaling, `~.Axes.autoscale_view`
is called automatically after the parameters are changed.

Parameters
----------
axis : {'both', 'x', 'y'}, default: 'both'
    The axis on which to operate.  (For 3D Axes, *axis* can also be
    set to 'z', and 'both' refers to all three axes.)
tight : bool or None, optional
    Parameter passed to `~.Axes.autoscale_view`.
    Default is None, for no change.

Other Parameters
----------------
**kwargs
    Remaining keyword arguments are passed to directly to the
    ``set_params()`` method of the locator. Supported keywords depend
    on the type of the locator. See for example
    `~.ticker.MaxNLocator.set_params` for the `.ticker.MaxNLocator`
    used by default for linear.

Examples
--------
When plotting small subplots, one might want to reduce the maximum
number of ticks and use tight bounds, for example::

    ax.locator_params(tight=True, nbins=4)

r  r  r)  TNr0   )r   r   r  r  r  
set_paramsr  r  )r$   r  r  r2   rC   rv  s         r(   locator_params_AxesBase.locator_params_  s    B 	6T--6v6TB$$Df~%nnT*<<>((,,T,?	 %
 
r+   c                    [         R                  " / SQUS9  US;   ao  [        U5      nUR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        U R                  R
                  " S0 UD6  US	;   ap  [        U5      nUR                  S
S5        UR                  SS5        UR                  SS5        UR                  SS5        U R                  R
                  " S0 UD6  gg)a  
Change the appearance of ticks, tick labels, and gridlines.

Tick properties that are not explicitly set using the keyword
arguments remain unchanged unless *reset* is True. For the current
style settings, see `.Axis.get_tick_params`.

Parameters
----------
axis : {'x', 'y', 'both'}, default: 'both'
    The axis to which the parameters are applied.
which : {'major', 'minor', 'both'}, default: 'major'
    The group of ticks to which the parameters are applied.
reset : bool, default: False
    Whether to reset the ticks to defaults before updating them.

Other Parameters
----------------
direction : {'in', 'out', 'inout'}
    Puts ticks inside the Axes, outside the Axes, or both.
length : float
    Tick length in points.
width : float
    Tick width in points.
color : :mpltype:`color`
    Tick color.
pad : float
    Distance in points between tick and label.
labelsize : float or str
    Tick label font size in points or as a string (e.g., 'large').
labelcolor : :mpltype:`color`
    Tick label color.
labelfontfamily : str
    Tick label font.
colors : :mpltype:`color`
    Tick color and label color.
zorder : float
    Tick and label zorder.
bottom, top, left, right : bool
    Whether to draw the respective ticks.
labelbottom, labeltop, labelleft, labelright : bool
    Whether to draw the respective tick labels.
labelrotation : float
    Tick label rotation
grid_color : :mpltype:`color`
    Gridline color.
grid_alpha : float
    Transparency of gridlines: 0 (transparent) to 1 (opaque).
grid_linewidth : float
    Width of gridlines in points.
grid_linestyle : str
    Any valid `.Line2D` line style spec.

Examples
--------
::

    ax.tick_params(direction='out', length=6, width=2, colors='r',
                   grid_color='r', grid_alpha=0.5)

This will make all major ticks be red, pointing out of the box,
and with dimensions 6 points by 2 points.  Tick labels will
also be red.  Gridlines will be red and translucent.

rw  r  r  r  Nr   r!  r"  r	  r  r  r  r  r0   )r   r   r2  r   r   set_tick_paramsr   )r$   r  r2   xkwykws        r(   rU  _AxesBase.tick_params  s    D 	-D9= v,CGGFD!GGGT"GGK&GGL$'JJ&&--= v,CGGE4 GGHd#GGJ%GGM4(JJ&&-- !r+   c                      SU l         SU l        g)aB  
Hide all visual components of the x- and y-axis.

This sets a flag to suppress drawing of all axis decorations, i.e.
axis labels, axis spines, and the axis tick component (tick markers,
tick labels, and grid lines). Individual visibility settings of these
components are ignored as long as `set_axis_off()` is in effect.
FTNrN  r  r
  s    r(   r1  _AxesBase.set_axis_off  s     
r+   c                      SU l         SU l        g)z
Do not hide all visual components of the x- and y-axis.

This reverts the effect of a prior `.set_axis_off()` call. Whether the
individual axis decorations are drawn is controlled by their respective
visibility settings.

This is on by default.
TNr  r
  s    r(   rZ  _AxesBase.set_axis_on  s     
r+   c                 N    U R                   R                  nUR                  5       $ )z
Get the xlabel text string.
)r   r   r{  r$   r   s     r(   
get_xlabel_AxesBase.get_xlabel        

  ~~r+   ru  c                6   Ub  X0R                   l        / SQn1 Uk1 Uk-  (       a  Ub  [        SU S35      eOEUb  UO[        R                  S   n[
        R                  " SUS9  SSS	S.U   nUR                  XtS
9  U R                   R                  " X40 UD6$ )a  
Set the label for the x-axis.

Parameters
----------
xlabel : str
    The label text.

labelpad : float, default: :rc:`axes.labelpad`
    Spacing in points from the Axes bounding box including ticks
    and tick labels.  If None, the previous value is left as is.

loc : {'left', 'center', 'right'}, default: :rc:`xaxis.labellocation`
    The label position. This is a high-level alternative for passing
    parameters *x* and *horizontalalignment*.

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
    `.Text` properties control the appearance of the label.

See Also
--------
text : Documents the properties supported by `.Text`.
)r   r5  haZSpecifying 'loc' is disallowed when any of its corresponding low level keyword arguments () are also suppliedzxaxis.labellocationrs  ru  r   r0  re   )r   r5  )	r   labelpadr&  rq   rr   r   r   r?  set_label_text)r$   xlabelfontdictr  rv  r2   protected_kwr   s           r(   
set_xlabel_AxesBase.set_xlabel  s    6 "*JJ9V9& #..:^ <+!, - -  /3%:; :D  	A
 MMAM7zz((DVDDr+   c                 t    U R                   R                  U R                   R                  5       (       + 5        g)z`
Invert the x-axis.

See Also
--------
xaxis_inverted
get_xlim, set_xlim
get_xbound, set_xbound
N)r   set_invertedget_invertedr
  s    r(   invert_xaxis_AxesBase.invert_xaxis/  &     	

DJJ$;$;$= =>r+   r  c                 <    U R                  5       u  pX:  a  X4$ X!4$ )z
Return the lower and upper x-axis bounds, in increasing order.

See Also
--------
set_xbound
get_xlim, set_xlim
invert_xaxis, xaxis_inverted
)r  )r$   r  r   s      r(   r  _AxesBase.get_xbound=  s&     mmo<;;r+   c           	          Uc  [         R                  " U5      (       a  Uu  pU R                  5       u  p4Uc  UnUc  UnU R                  [	        X4[        U R                  5       5      S9SS9  g)a  
Set the lower and upper numerical bounds of the x-axis.

This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscalex_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.

    .. ACCEPTS: (lower: float, upper: float)

See Also
--------
get_xbound
get_xlim, set_xlim
invert_xaxis, xaxis_inverted
Nreverser:  )r   r)  r  r  rR  r0  xaxis_invertedr$   r   upper	old_lower	old_uppers        r(   r  _AxesBase.set_xboundM  r    * =R[[// LE#0	=E=Efe^%)$*=*=*?%@B 	 	!r+   c                 @    [        U R                  R                  5      $ )a_  
Return the x-axis view limits.

Returns
-------
left, right : (float, float)
    The current x-axis limits in data coordinates.

See Also
--------
.Axes.set_xlim
.Axes.set_xbound, .Axes.get_xbound
.Axes.invert_xaxis, .Axes.xaxis_inverted

Notes
-----
The x-axis may be inverted, in which case the *left* value will
be greater than the *right* value.
)r  r  r  r
  s    r(   r  _AxesBase.get_xlimo      ( T\\++,,r+   c                     Ubt  U" U5      n[        U[        R                  5      (       a  UR                  5       n[        U[        5      (       a&  [        R
                  " U5      (       d  [        S5      eU$ g)z
Raise ValueError if converted limits are non-finite.

Note that this function also accepts None as a limit argument.

Returns
-------
The limit value after call to convert(), or None if limit is None.
Nz Axis limits cannot be NaN or Inf)r   r   ndarraysqueezer   r  r<   )r$   limitr  converted_limits       r(   _validate_converted_limits$_AxesBase._validate_converted_limits  se     %enO/2::66"1"9"9";?D11KK88 !CDD"" r+   )r  r  r  r  c                    Uc  [         R                  " U5      (       a  Uu  pUb  Ub  [        S5      eUnUb  Ub  [        S5      eUnU R                  R	                  XX4S9$ )ao  
Set the x-axis view limits.

Parameters
----------
left : float, optional
    The left xlim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The left and right xlims may also be passed as the tuple
    (*left*, *right*) as the first positional argument (or as
    the *left* keyword argument).

    .. ACCEPTS: (left: float, right: float)

right : float, optional
    The right xlim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the x-axis. True turns on,
    False turns off, None leaves unchanged.

xmin, xmax : float, optional
    They are equivalent to left and right respectively, and it is an
    error to pass both *xmin* and *left* or *xmax* and *right*.

Returns
-------
left, right : (float, float)
    The new x-axis limits in data coordinates.

See Also
--------
get_xlim
set_xbound, get_xbound
invert_xaxis, xaxis_inverted

Notes
-----
The *left* value may be greater than the *right* value, in which
case the x-axis values will decrease from left to right.

Examples
--------
>>> set_xlim(left, right)
>>> set_xlim((left, right))
>>> left, right = set_xlim(left, right)

One limit may be left unchanged.

>>> set_xlim(right=right_lim)

Limits may be passed in reverse order to flip the direction of
the x-axis. For example, suppose *x* represents the number of
years before present. The x-axis limits might be set like the
following so 5000 years ago is on the left of the plot and the
present is on the right.

>>> set_xlim(5000, 0)
z"Cannot pass both 'left' and 'xmin'z#Cannot pass both 'right' and 'xmax'r  )r   r)  r&  r   r^  )r$   r  r   r  r  r  r  s          r(   r  _AxesBase.set_xlim  ss    D =R[[..KD DEED  EFFEzz""4T"EEr+   	get_scale_set_axes_scaleget_ticklocs	set_ticks
set_xticksr   get_majorticklabelsget_minorticklabelsget_ticklabelsset_ticklabelszAxis.set_tickszAxes.set_xticksc                 N    U R                   R                  nUR                  5       $ )z
Get the ylabel text string.
)r   r   r{  r  s     r(   
get_ylabel_AxesBase.get_ylabel  r  r+   c                :   Ub  X0R                   l        / SQn1 Uk1 Uk-  (       a  Ub  [        SU S35      eOGUb  UO[        R                  S   n[
        R                  " SUS9  SSS	S.U   u  pxUR                  XxS
9  U R                   R                  " X40 UD6$ )a  
Set the label for the y-axis.

Parameters
----------
ylabel : str
    The label text.

labelpad : float, default: :rc:`axes.labelpad`
    Spacing in points from the Axes bounding box including ticks
    and tick labels.  If None, the previous value is left as is.

loc : {'bottom', 'center', 'top'}, default: :rc:`yaxis.labellocation`
    The label position. This is a high-level alternative for passing
    parameters *y* and *horizontalalignment*.

Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
    `.Text` properties control the appearance of the label.

See Also
--------
text : Documents the properties supported by `.Text`.
)r   r5  r  r  r  zyaxis.labellocation)r  rt  r  ru  )r   r  )r0  rt  )re   r   )r   r5  )	r   r  r&  rq   rr   r   r   r?  r  )	r$   ylabelr  r  rv  r2   r  r   r  s	            r(   
set_ylabel_AxesBase.set_ylabel  s    6 "*JJ9V9& #..:^ <+!, - -  /3%:; :D &)# 	EA
 MMAM6zz((DVDDr+   c                 t    U R                   R                  U R                   R                  5       (       + 5        g)z`
Invert the y-axis.

See Also
--------
yaxis_inverted
get_ylim, set_ylim
get_ybound, set_ybound
N)r   r  r  r
  s    r(   invert_yaxis_AxesBase.invert_yaxis,  r  r+   c                 <    U R                  5       u  pX:  a  X4$ X!4$ )z
Return the lower and upper y-axis bounds, in increasing order.

See Also
--------
set_ybound
get_ylim, set_ylim
invert_yaxis, yaxis_inverted
)r!  )r$   r  r  s      r(   r  _AxesBase.get_ybound:  s&     mmo<;;r+   c           	          Uc  [         R                  " U5      (       a  Uu  pU R                  5       u  p4Uc  UnUc  UnU R                  [	        X4[        U R                  5       5      S9SS9  g)a  
Set the lower and upper numerical bounds of the y-axis.

This method will honor axis inversion regardless of parameter order.
It will not change the autoscaling setting (`.get_autoscaley_on()`).

Parameters
----------
lower, upper : float or None
    The lower and upper bounds. If *None*, the respective axis bound
    is not modified.

 .. ACCEPTS: (lower: float, upper: float)

See Also
--------
get_ybound
get_ylim, set_ylim
invert_yaxis, yaxis_inverted
Nr  r:  )r   r)  r  r"  rR  r0  yaxis_invertedr  s        r(   r   _AxesBase.set_yboundJ  r  r+   c                 @    [        U R                  R                  5      $ )a_  
Return the y-axis view limits.

Returns
-------
bottom, top : (float, float)
    The current y-axis limits in data coordinates.

See Also
--------
.Axes.set_ylim
.Axes.set_ybound, .Axes.get_ybound
.Axes.invert_yaxis, .Axes.yaxis_inverted

Notes
-----
The y-axis may be inverted, in which case the *bottom* value
will be greater than the *top* value.
)r  r  r  r
  s    r(   r!  _AxesBase.get_yliml  r  r+   )r  r  r  r  c                    Uc  [         R                  " U5      (       a  Uu  pUb  Ub  [        S5      eUnUb  Ub  [        S5      eUnU R                  R	                  XX4S9$ )ar  
Set the y-axis view limits.

Parameters
----------
bottom : float, optional
    The bottom ylim in data coordinates. Passing *None* leaves the
    limit unchanged.

    The bottom and top ylims may also be passed as the tuple
    (*bottom*, *top*) as the first positional argument (or as
    the *bottom* keyword argument).

    .. ACCEPTS: (bottom: float, top: float)

top : float, optional
    The top ylim in data coordinates. Passing *None* leaves the
    limit unchanged.

emit : bool, default: True
    Whether to notify observers of limit change.

auto : bool or None, default: False
    Whether to turn on autoscaling of the y-axis. *True* turns on,
    *False* turns off, *None* leaves unchanged.

ymin, ymax : float, optional
    They are equivalent to bottom and top respectively, and it is an
    error to pass both *ymin* and *bottom* or *ymax* and *top*.

Returns
-------
bottom, top : (float, float)
    The new y-axis limits in data coordinates.

See Also
--------
get_ylim
set_ybound, get_ybound
invert_yaxis, yaxis_inverted

Notes
-----
The *bottom* value may be greater than the *top* value, in which
case the y-axis values will decrease from *bottom* to *top*.

Examples
--------
>>> set_ylim(bottom, top)
>>> set_ylim((bottom, top))
>>> bottom, top = set_ylim(bottom, top)

One limit may be left unchanged.

>>> set_ylim(top=top_lim)

Limits may be passed in reverse order to flip the direction of
the y-axis. For example, suppose ``y`` represents depth of the
ocean in m. The y-axis limits might be set like the following
so 5000 m depth is at the bottom of the plot and the surface,
0 m, is at the top.

>>> set_ylim(5000, 0)
z$Cannot pass both 'bottom' and 'ymin'z!Cannot pass both 'top' and 'ymax'r  )r   r)  r&  r   r^  )r$   r  r  r  r  r  r  s          r(   r"  _AxesBase.set_ylim  sr    D ;2;;v.. KF! FGGF CDDCzz""6T"EEr+   
set_ytickszAxes.set_yticks	axis_datec                     U R                   b  U R                   " U5      $ U R                  R                  5       R                  " U5      $ )z
Return *x* formatted as an x-value.

This function will use the `.fmt_xdata` attribute if it is not None,
else will fall back on the xaxis major formatter.
)rK  r   get_major_formatterformat_data_short)r$   r   s     r(   format_xdata_AxesBase.format_xdata  T     #'.."< HIJL 	LZZ335GGHIJL 	Lr+   c                     U R                   b  U R                   " U5      $ U R                  R                  5       R                  " U5      $ )z
Return *y* formatted as a y-value.

This function will use the `.fmt_ydata` attribute if it is not None,
else will fall back on the yaxis major formatter.
)rL  r   r  r  )r$   r   s     r(   format_ydata_AxesBase.format_ydata  r  r+   c           	      V   U R                   R                  U 5      n[        U5      S:X  a>  SR                  Uc  SOU R	                  U5      Uc  S5      $ U R                  U5      5      $ U R                  R                  X45      n/ n[        U[        S5      S9 Hm  nUR                  R                  5       R                  U5      u  pxUR                  SR                  UR	                  U5      UR                  U5      5      5        Mo     SR                  SR                  U5      5      $ )	z;Return a format string formatting the *x*, *y* coordinates.re   z(x, y) = ({}, {})z???rJ  rK  z({}, {})z(x, y) = {}z | )re  rg  rj   r=   r  r  r  rP   rR  r   r  r!   r>   )	r$   r   r   twins	screen_xyxy_strsr[   data_xdata_ys	            r(   format_coord_AxesBase.format_coord  s   ""//5u:?&--(9(9!(<> >(,(9(9!(<> > NN,,aV4	 Jx$89B\\224>>yINFNN!!"//&"92??6;RSU : ##EJJw$788r+   c                 l    U R                   R                  5         U R                  R                  5         g)z
Display minor ticks on the Axes.

Displaying minor ticks may reduce performance; you may turn them off
using `minorticks_off()` if drawing speed is a problem.
N)r   minorticks_onr   r
  s    r(   r  _AxesBase.minorticks_on  s$     	

  "

  "r+   c                 l    U R                   R                  5         U R                  R                  5         g)z!Remove minor ticks from the Axes.N)r   minorticks_offr   r
  s    r(   r  _AxesBase.minorticks_off  s"    

!!#

!!#r+   c                     g)zF
Return whether this Axes supports the zoom box button functionality.
Tr0   r
  s    r(   can_zoom_AxesBase.can_zoom       r+   c                     g)zF
Return whether this Axes supports any pan/zoom button functionality.
Tr0   r
  s    r(   can_pan_AxesBase.can_pan  r  r+   c                     U R                   $ )z7
Get whether the Axes responds to navigation commands.
	_navigater
  s    r(   get_navigate_AxesBase.get_navigate!  s     ~~r+   c                     Xl         g)z
Set whether the Axes responds to navigation toolbar commands.

Parameters
----------
b : bool

See Also
--------
matplotlib.axes.Axes.set_forward_navigation_events

Nr	  r  s     r(   rM  _AxesBase.set_navigate'  s	     r+   c                     U R                   $ )zC
Get the navigation toolbar button status: 'PAN', 'ZOOM', or None.
_navigate_moder
  s    r(   get_navigate_mode_AxesBase.get_navigate_mode6  s     """r+   c                     Xl         g)z_
Set the navigation toolbar button status.

.. warning::
    This is not a user-API function.

Nr  r  s     r(   rN  _AxesBase.set_navigate_mode<  s
      r+   c                     U R                  5       U R                  5       U R                  5       U R                  5       S.$ )a  
Save information required to reproduce the current view.

This method is called before a view is changed, such as during a pan or zoom
initiated by the user.  It returns an opaque object that describes the current
view, in a format compatible with :meth:`_set_view`.

The default implementation saves the view limits and autoscaling state.
Subclasses may override this as needed, as long as :meth:`_set_view` is also
adjusted accordingly.
)r4  autoscalex_onr5  autoscaley_on)r  r  r!  r#  r
  s    r(   	_get_view_AxesBase._get_viewF  s6     MMOd6L6L6NMMOd6L6L6N
 	
r+   c                 (    U R                   " S0 UD6  g)a  
Apply a previously saved view.

This method is called when restoring a view (with the return value of
:meth:`_get_view` as argument), such as with the navigation buttons.

Subclasses that override :meth:`_get_view` also need to override this method
accordingly.
Nr0   )r   )r$   views     r(   	_set_view_AxesBase._set_viewW  s     	4r+   c                    [        U5      S:X  a  Uu  pgnUS:X  a  SnUS:  a  SnOSnSU-  nU R                  R                  [        R                  " U R                  5       U R                  5       /5      5      u  u  pu  pX-
  nX-
  nX-   S-  nX-   S-  nXhS-
  -  U-   U-  nXxS-
  -  U-   U-  nUUS-  U-  -
  UUS-  U-  -
  UUS-  U-  -   UUS-  U-  -   /nO&[        U5      S	:w  a  [        R                  " S
5        gU R                  5       u  nnU R                  5       u  nnUu  nnnnU R                  R                  5       R                  UU4UU4/5      u  u  nnu  nn[        R                  " [        UU/5      UU5      u  p[        R                  " [        UU/5      UU5      u  pU(       d  US:X  a  UUpU(       d  US:X  a  UUpUS:X  a
  X4nX4nUU4$ US:X  a  U R                  R                  5       nUR                  UUX/5      u  nnn n!UU-
  U!U -
  -  n"UU"U U-
  -  -
  n#UU"UU!-
  -  -   n$UR                  5       R                  U#U$/5      nU R                   R                  5       n%U%R                  UUX/5      u  n&n'n(n)U'U&-
  U)U(-
  -  n"U&U"U(U&-
  -  -
  n*U'U"U'U)-
  -  -   n+U%R                  5       R                  U*U+/5      nWW4$ )z
Helper function to prepare the new bounds from a bbox.

This helper function returns the new x and y bounds from the zoom
bbox. This a convenience method to abstract the bbox logic
out of the base setter.
r   r   r  re   inoutr0  r  r   zgWarning in _set_view_from_bbox: bounding box is not a tuple of length 3 or 4. Ignoring the view change.Nr   r   )rj   r  rP   r   	transposer  r!  r   r   r  r  r  cliprR  r   r  r   ),r$   r  	directionmodetwinxtwinyxpypsclr  r  r  r  xwidthywidthxcenycenxzcyzcxmin0xmax0ymin0ymax0startxstartystopxstopy
new_xbound
new_yboundr	  sxmin0sxmax0sxminsxmaxfactorsxmin1sxmax1r
  symin0symax0syminsymaxsymin1symax1s,                                               r(   _prepare_view_from_bbox!_AxesBase._prepare_view_from_bboxc  sC    t9>KBCaxQw 	!	e)-)A)Admmot}}?@*B&LT,4 [F[FK#DK#DQw<$&+CQw<$&+C&)C-'vby})<&)C-'vby})<>DY!^>?  (u(u'+$u+/>>+B+B+D+N+Nfu~.,0(.5% WWVVUO4eUC
WWVVUO4eUC
DCK$DCK$JJ, :%%) %JJ,,.E+0??t*,,(FFE5vo%%-8F f77Ff77F)33VV4DEJJJ,,.E+0??t*,,(FFE5vo%%-8Ff77Ff77F)33VV4DEJ:%%r+   c                     U R                  XX4US9u  pgU(       d(  US:w  a"  U R                  U5        U R                  S5        U(       d*  US:w  a#  U R                  U5        U R	                  S5        ggg)a!  
Update view from a selection bbox.

.. note::

    Intended to be overridden by new projection types, but if not, the
    default implementation sets the view limits to the bbox directly.

Parameters
----------
bbox : 4-tuple or 3 tuple
    * If bbox is a 4 tuple, it is the selected bounding box limits,
      in *display* coordinates.
    * If bbox is a 3 tuple, it is an (xp, yp, scl) triple, where
      (xp, yp) is the center of zooming and scl the scale factor to
      zoom by.

direction : str
    The direction to apply the bounding box.
        * `'in'` - The bounding box describes the view directly, i.e.,
                   it zooms in.
        * `'out'` - The bounding box describes the size to make the
                    existing view, i.e., it zooms out.

mode : str or None
    The selection mode, whether to apply the bounding box in only the
    `'x'` direction, `'y'` direction or both (`None`).

twinx : bool
    Whether this axis is twinned in the *x*-direction.

twiny : bool
    Whether this axis is twinned in the *y*-direction.
)r$  r%  r&  r'  r   Fr   N)rH  r  r
  r   r  )r$   r  r$  r%  r&  r'  r9  r:  s           r(   _set_view_from_bbox_AxesBase._set_view_from_bbox  sr    H "&!=!=DU "> "L
OOJ'""5)OOJ'""5) %ur+   c           	         [         R                  " U R                  R                  5       U R                  R                  5       U R                  R                  5       R                  5       U R                  R                  5       UUS9U l        g)z
Called when a pan operation has started.

Parameters
----------
x, y : float
    The mouse coordinates in display coords.
button : `.MouseButton`
    The pressed mouse button.

Notes
-----
This is intended to be overridden by new projection types.
)r.  r  trans_inverser  r   r   N)typesSimpleNamespacer  r(  r  r  r  
_pan_start)r$   r   r   buttons       r(   	start_pan_AxesBase.start_pan  se      //##%..'')..113::<!!#r+   c                     U ? g)z
Called when a pan operation completes (when the mouse button is up.)

Notes
-----
This is intended to be overridden by new projection types.
N)rQ  r
  s    r(   end_pan_AxesBase.end_pan  s	     Or+   c                    S nU R                   nX6R                  -
  nXFR                  -
  nXxs=:X  a  S:X  a   g  US:X  aD  U" X'U5      u  pxUR                  R	                  U* U* 5      R                  UR                  5      n	GOUS:X  a   U* U R                  R                  -  nU* U R                  R                  -  nU" X'U5      u  pxU R                  5       S:w  a  SXx-   -  =px[        R                  " SXx45      n
[        R                  " UR                  UR                  /5      nUR                  R                  UR                  5      nXX-
  -  -   n[        R                   " U5      R                  UR                  5      n	Og[        R(                  " U	R                  UR                  5      5      nU	R+                  5       R-                  [.        5      nSX) '   U$ ! ["         a    [$        R&                  " S	5         gf = f)
z
Helper function to return the new points after a pan.

This helper function returns the points on the axis after a pan has
occurred. This is a convenience method to abstract the pan logic
out of the base setter.
c                    U S:X  a#  [        U5      [        U5      :  a  UnX4$ Un X4$ U S:X  a  SnX4$ U S:X  a  SnX4$ U S:X  a  S[        U5      -  [        U5      :  a  SnX4$ S[        U5      -  [        U5      :  a  SnX4$ [        U5      [        U5      :  a  U[        U5      -  [        U5      -  nX4$ U[        U5      -  [        U5      -  nX4$ )Ncontrolr   r   r   shiftrd   )r  )r  dxdys      r(   format_deltas0_AxesBase._get_pan_points.<locals>.format_deltas	  s   ir7SW$B  6M B 6M  6M  6M s2w;R(B 6M R[3r7*B
 6M	 Ws2w&c"gB/B 6M c"gB/B6Mr+   r   Nre   r   r  r0  g      $@zOverflow while panning)rQ  r   r   r  
translatedr  rN  r-  r.  r  r   powerr.  r.  r  rU   rW   OverflowErrorr   r   r  rq  astyper  )r$   rR  r  r   r   r^  r  r\  r]  r   alphastart	oldpoints	newpointsvalidrw  s                   r(   _get_pan_points_AxesBase._get_pan_points  s   	* OOWW=q= Q;"3B/FBVV&&sRC0<<Q__MFq[S499??*S499+++&s3??$.!RWo-Bx0!##qss,EE--agg6	!Y->$??	%**95&;q7  F..qww78""$++F3v ! ""#;<s   C<G# # HHc                     U R                  XX45      nUb1  U R                  USS2S4   5        U R                  USS2S4   5        gg)a3  
Called when the mouse moves during a pan operation.

Parameters
----------
button : `.MouseButton`
    The pressed mouse button.
key : str or None
    The pressed key, if any.
x, y : float
    The mouse coordinates in display coords.

Notes
-----
This is intended to be overridden by new projection types.
Nr   re   )ri  r  r"  )r$   rR  r  r   r   rw  s         r(   drag_pan_AxesBase.drag_pan?  sI    " %%f18MM&A,'MM&A,' r+   c                 6   / U R                   QU R                  R                  5       QU R                  R                  5       QU R                  PU R
                  PU R                  PU R                  QU R                  b  U R                  /O/ QU R                  P$ r/   )
r>  rD  r  r  r~  rT  rU  rJ  rM  r)  r
  s    r(   r0  _AxesBase.get_childrenU  s    
^^
[[!
 ^^""$
 JJ	
 ((	
 +/*;*;	

 __
 !% 8t||nb
 JJ
 	
r+   c                 8    U R                   R                  U5      $ r/   r  r  s     r(   r  _AxesBase.containsa  s    zz"":..r+   c                 6    U R                   R                  USS9$ )zN
Return whether *point* (pair of pixel coordinates) is inside the Axes
patch.
r  )radius)r)  contains_point)r$   points     r(   rt  _AxesBase.contains_pointe  s    
 zz((s(;;r+   c                    U R                  5       nU R                  R                  5        H  nUR                  U5        M     U R                  (       a  U R
                  (       d2  U R                  R                  5        H  nUR                  U5        M     UR                  U R                  5        UR                  U R                  5        UR                  U R                  5        [        [        R                  [        R                  [        R                  4nU Vs/ s HY  oUR!                  5       (       d  M  UR#                  5       (       d  M0  [%        XT5      (       d  UR'                  5       (       a  MW  UPM[     sn$ s  snf )z
Return a default list of artists that are used for the bounding box
calculation.

Artists are excluded either by not being visible or
``artist.set_in_layout(False)``.
)r0  r  r  r_  rN  rG  rD  r~  rT  rU  r   r   r   r   AnnotationBbox	OffsetBoxr;  get_in_layoutr   _fully_clipped_to_axes)r$   r  r  rb  noclipr   s         r(   get_default_bbox_extra_artists(_AxesBase.get_default_bbox_extra_artistsl  s    ##%NN))+D NN4  , ++-u% . 	tzz"t''(t(()
 UZZ**I,?,?A" O7ammo!//:K**!2J2J2L 7 O 	O Os    F<F#F:F)call_axes_locatorbbox_extra_artistsfor_layout_onlyc                   / nUc  U R                  SS9R                  5       nU R                  5       (       d  gU R                  5       nU R	                  U(       a  U(       a  U" X5      OS5        U R
                  R                  5        H]  nU R                  (       d  M  UR                  5       (       d  M-  [        R                  " Xq5      nU(       d  ML  UR                  U5        M_     U R                  U5        U R                  U5      n	UR                  U	5        U R                  U R                  U R                  4 H  n
U
R                  5       (       d  M  U
R                  U5      nU(       aH  UR                   S:  a8  UR"                  UR$                  -   S-  S-
  Ul        UR"                  S-   Ul        UR                  U5        M     UnUc  U R'                  5       nU H  nUR)                  U5      nUc  M  SUR                   s=:  a  [*        R,                  :  d  M@  O  MD  SUR.                  s=:  a  [*        R,                  :  d  Mk  O  Mo  UR                  U5        M     [0        R2                  R5                  U Vs/ s H&  oR                   S:w  d  UR.                  S:w  d  M$  UPM(     sn5      $ s  snf )a  
Return the tight bounding box of the Axes, including axis and their
decorators (xlabel, title, etc).

Artists that have ``artist.set_in_layout(False)`` are not included
in the bbox.

Parameters
----------
renderer : `.RendererBase` subclass
    renderer that will be used to draw the figures (i.e.
    ``fig.canvas.get_renderer()``)

bbox_extra_artists : list of `.Artist` or ``None``
    List of artists to include in the tight bounding box.  If
    ``None`` (default), then all artist children of the Axes are
    included in the tight bounding box.

call_axes_locator : bool, default: True
    If *call_axes_locator* is ``False``, it does not call the
    ``_axes_locator`` attribute, which is necessary to get the correct
    bounding box. ``call_axes_locator=False`` can be used if the
    caller is only interested in the relative size of the tightbbox
    compared to the Axes bbox.

for_layout_only : default: False
    The bounding box will *not* include the x-extent of the title and
    the xlabel, or the y-extent of the ylabel.

Returns
-------
`.BboxBase`
    Bounding box in figure pixel coordinates.

See Also
--------
matplotlib.axes.Axes.get_window_extent
matplotlib.axis.Axis.get_tightbbox
matplotlib.spines.Spine.get_window_extent
NTrS   r   rd   r0  r  )rY   _get_rendererr;  r  r  r  r  rN  re  _get_tightbbox_for_layout_onlyr!   rF  r  r~  rT  rU  r-  r  r  r}  rC  r   r  r.  rU   rW   union)r$   r\   r  r  r  r  r  r  baaxbboxr~  btbbox_artistsr   r  r  s                   r(   rC  _AxesBase.get_tightbbox  s    V D1??AH!!'')'.3DGD#$	P NN))+D{{{t//11;;DK2IIbM	 ,
 	##H-''1
		&jj$"2"2D4E4EFE  "",,X6"rxx!|  UURUU]a/#5BEEECKBE		" G *>>@LA??8,D DJJ///DKK0"&&00		$  %%<1gglahh!mQ<> 	><s   #J</J<c           	         SU;   a!  SU;   a  US   U La  US   U La  [        S5      eU R                  5       nU(       a$  U R                  SS9R                  " U/UQ70 UD6nOLU R                  SS9R                  " U R                  S5      /UQ70 UDS[        / SQU R                  5      0D6nU R                  S	5        UR                  S	5        UR                  U R                  5        U R                  R                  X5        U$ )
z<Make a twinx Axes of self. This is used for twinx and twiny.r  r  z$Twinned Axes may share only one axisFrS   Taxes_locator)r   r   re   re   r  )r<   r  rY   add_subplotadd_axesr  rI   r  r  rs  rJ  re  r>   )r$   r1   r2   sstwins        r(   _make_twin_axes_AxesBase._make_twin_axes  s   v(f"4 ht+x0@0L !GHH!!#???.::2OOOD???.77!!$'3*.32836 $..23D 	I&I&$+r+   c                    U R                  U S9nUR                  R                  5         UR                  R                  S5        UR                  R	                  S5        UR                  U R                  5       5        U R                  R                  5         UR                  R                  S5        UR                  R                  S5        U R                  R                  UR                  l        U$ )a
  
Create a twin Axes sharing the xaxis.

Create a new Axes with an invisible x-axis and an independent
y-axis positioned opposite to the original one (i.e. at right). The
x-axis autoscale setting will be inherited from the original
Axes.  To ensure that the tick marks of both y-axes align, see
`~matplotlib.ticker.LinearLocator`.

Returns
-------
Axes
    The newly created Axes instance

Notes
-----
For those who are 'picking' artists while using twinx, pick
events are only called for the artists in the top-most Axes.
)r  r   F)r  r   
tick_rightset_label_positionset_offset_positionr
  r  	tick_leftr   r\  r)  r  r$   ax2s     r(   r&  _AxesBase.twinx  s    ( ""$"/				$$W-		%%g.d4467

		e$		e$****		
r+   c                    U R                  U S9nUR                  R                  5         UR                  R                  S5        UR	                  U R                  5       5        U R                  R                  5         UR                  R                  S5        UR                  R                  S5        U R                  R                  UR                  l
        U$ )a  
Create a twin Axes sharing the yaxis.

Create a new Axes with an invisible y-axis and an independent
x-axis positioned opposite to the original one (i.e. at top). The
y-axis autoscale setting will be inherited from the original Axes.
To ensure that the tick marks of both x-axes align, see
`~matplotlib.ticker.LinearLocator`.

Returns
-------
Axes
    The newly created Axes instance

Notes
-----
For those who are 'picking' artists while using twiny, pick
events are only called for the artists in the top-most Axes.
)r  r  F)r  r   tick_topr  r  r#  tick_bottomr   r\  r)  r  r  s     r(   r'  _AxesBase.twiny  s    ( ""$"/				$$U+d4467

 		e$		e$****		
r+   c                 H    [         R                  " U R                  S   5      $ )z6Return an immutable view on the shared x-axes Grouper.r   r	   GrouperViewrd  r
  s    r(   get_shared_x_axes_AxesBase.get_shared_x_axes6        !2!23!788r+   c                 H    [         R                  " U R                  S   5      $ )z6Return an immutable view on the shared y-axes Grouper.r   r  r
  s    r(   get_shared_y_axes_AxesBase.get_shared_y_axes:  r  r+   c                 D    U R                  SUS9  U R                  SUS9  g)a  
Only show "outer" labels and tick labels.

x-labels are only kept for subplots on the last row (or first row, if
labels are on the top side); y-labels only for subplots on the first
column (or last column, if labels are on the right side).

Parameters
----------
remove_inner_ticks : bool, default: False
    If True, remove the inner ticks as well (not only tick labels).

    .. versionadded:: 3.8
F)skip_non_rectangular_axesremove_inner_ticksN)_label_outer_xaxis_label_outer_yaxis)r$   r  s     r(   label_outer_AxesBase.label_outer>  s6     	%3E 	  	G%3E 	  	Gr+   )r  c                   U(       a4  [        U R                  [        R                  R                  5      (       d  g U R                  5       nU(       d  g U R                  R                  5       nUR                  5       (       d  US:X  a  U R                  S5        U(       a  SS0O0 nU R                  R                  " S
SSS.UD6  U R                  R                  R                  5       S   S:X  a%  U R                  R                  R                  S5        UR                  5       (       d  US:X  a  U R                  S5        U(       a  SS0O0 nU R                  R                  " S
SSS.UD6  U R                  R                  R                  5       S   S	:X  a&  U R                  R                  R                  S5        g g g )Nr  r  Fr  )r#  r  re   r  )r#  r  r   r0   )r   r)  rq   r  r	  r  r   rB  is_first_rowr  r  rD  r  r\  is_last_row)r$   r  r  r  label_positiontop_kw	bottom_kws          r(   r  _AxesBase._label_outer_xaxisR  sp    %Z

8;8M8M.O .O!!#668  &#'9eU^rFJJ&& 8u8068zz$$113A6!;

%%11%8~~)#-?5)RIJJ&& >%>3<>zz$$113A6!;

%%11%8 <  r+   c                   U(       a4  [        U R                  [        R                  R                  5      (       d  g U R                  5       nU(       d  g U R                  R                  5       nUR                  5       (       d  US:X  a  U R                  S5        U(       a  SS0O0 nU R                  R                  " S
SSS.UD6  U R                  R                  R                  5       S   S:X  a%  U R                  R                  R                  S5        UR                  5       (       d  US:X  a  U R                  S5        U(       a  SS0O0 nU R                  R                  " S
SSS.UD6  U R                  R                  R                  5       S   S	:X  a&  U R                  R                  R                  S5        g g g )Nr  r  Fr  )r#  r!  r   r   )r#  r"  re   r0   )r   r)  rq   r  r	  r  r   rB  is_first_colr  r  rD  r  r\  is_last_col)r$   r  r  r  r  left_kwright_kws          r(   r  _AxesBase._label_outer_yaxism  sp    %Z

8;8M8M.O .O!!#668  '#);vuoGJJ&& ::18:zz$$113A6!;

%%11%8~~(#+='2HJJ&& <<2:<zz$$113A6!;

%%11%8 <  r+   c                     Xl         g)a  
Set how pan/zoom events are forwarded to Axes below this one.

Parameters
----------
forward : bool or "auto"
    Possible values:

    - True: Forward events to other axes with lower or equal zorder.
    - False: Events are only executed on this axes.
    - "auto": Default behaviour (*True* for axes with an invisible
      patch and *False* otherwise)

See Also
--------
matplotlib.axes.Axes.set_navigate

Nr5  )r$   forwards     r(   set_forward_navigation_events'_AxesBase.set_forward_navigation_events  s
    & +2'r+   c                     U R                   $ )z=Get how pan/zoom events are forwarded to Axes below this one.r  r
  s    r(   get_forward_navigation_events'_AxesBase.get_forward_navigation_events  s    ...r+   )<r^  r0  r1  r/  rQ  r=  ro  r>  r?  rK  rF  r5  rG  rE  rF  rG  rT  r  r
  r  r+  rQ  r	  rL  rI  rU  r6  r7  rk  r4  r;  r  rD  r  r  rB  r  rC  r   rN  r  rR  rJ  rN  r  rK  rL  r=  rM  r)  rD  r  r~  r  r  r  r  r  r   r   r/   )r  N)r  F)r  )Nr  inches)NNF)T)TTr  )Tr  N)NTT)Nr$  r  )r  N)r   NFF)r8   r7   r9   rF   rC   r  r	   Grouperrd  re  r]  rU   rW   __annotations__r   r  r  propertyr  r  r)   r_  rf  ro  r  r  r:  r  r  rE  r9  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  rC  r  r  rl  rJ  r[  r   r  r  r  r  r  r  r  r  r  rW  rV  r   r  r  r  r  r  r<  r  r  r  r  r  r@  rD  rG  rJ  rN  r   get_xgridlinesget_xticklinesget_ygridlinesget_yticklinesrT  rW  r\  ra  rk  rx  r{  r  r  r  r  r  r  r  r  rT  r  ru  r   r  r  r#  r
  r  r  r2  r  setterr  r  r  r  r  r  r  r  r  rF  re  allow_rasterizationr\  r`  rf  ri  rl  rp  rH  r
   interpdr  r  r  rU  r1  rZ  r  r  r  r  r  r  r  r  r  r2  rO  
get_xticksr  get_xmajorticklabelsget_xminorticklabelsget_xticklabelsset_xticklabelsr  r  r  r  r  r   r!  r"  r3  rP  
get_yticksr  get_ymajorticklabelsget_yminorticklabelsget_yticklabelsset_yticklabels
xaxis_date
yaxis_dater  r  r  r  r  r  r  r  rM  r  rN  r  r  rH  rK  rS  rV  ri  rl  r0  r  rt  r}  rC  r  r&  r'  r  r  r  r  r  r  r  rG   __classcell__)r   rC   r	   rX  s   000@r(   r   r   %  s   D K6ABkd%--/)kBLMMOMH;; ;; . .
8   +1f fP,	I"!R
O 4'K  
 *",HD8%6(6D8'6&6I
+0"8 
1	"'8"@$/&/&BHC"X C"J ' '
 = = M M I I L L I I F F*
/
&J>XFP /b  #J,\bBHH HT;7		 *'?CN)'?CN)'?CN)'?CN!#
,,&@?"	.1`&CP
	06412;1 ;1z2 -W6IJ,W6IJ,W6IJ,W6IJ8

& & &  ) )  ,, #'$d P d(*+;Z~)@D*N   D !DLAH	%N (< (<T (.TT#'4TLL\'RP.d
 1E1Ef
? *'>BN  !D-,#&LFdLF\ &g{;J%g/@AJ%g~>J%g{/:L.IKJ/9NO/9NO*74DEO*!!#457O 1E1Ef
? *'>BN  !D-,LFdLF\ &g{;J%g/@AJ%g~>J%g{/:L.IKJ/9NO/9NO*74DEO*!!#457O &g{;J%g{;JLL9"#$# 
"
 7;>CN&` 37:?+*Z.<|(,

/<O@U>)-uU>n,><99G* /498 /4962*/ /YC Cs   Q*r   c                 D     " S S5      nU" X5      R                  U5      $ )a  
A helper function for rasterizing the list of artists.

The bookkeeping to track if we are or are not in rasterizing mode
with the mixed-mode backends is relatively complicated and is now
handled in the matplotlib.artist.allow_rasterization decorator.

This helper defines the absolute minimum methods and attributes on a
shim class to be compatible with that decorator and then uses it to
rasterize the list of artists.

This is maybe too-clever, but allows us to reuse the same code that is
used on normal artists to participate in the "are we rasterizing"
accounting.

Please do not use this outside of the "rasterize below a given zorder"
functionality of Axes.

Parameters
----------
figure : matplotlib.figure.Figure
    The figure all of the artists belong to (not checked).  We need this
    because we can at the figure level suppress composition and insert each
    rasterized artist as its own image.

artists : List[matplotlib.artist.Artist]
    The list of Artists to be rasterized.  These are assumed to all
    be in the same Figure.

renderer : matplotlib.backendbases.RendererBase
    The currently active renderer

Returns
-------
None

c                   T    \ rS rSrS rS rS rS	S jr\R                  S 5       r
Srg)
(_draw_rasterized.<locals>._MinimalArtisti  c                     g)NTr0   r
  s    r(   get_rasterized7_draw_rasterized.<locals>._MinimalArtist.get_rasterized      r+   c                     g r/   r0   r
  s    r(   get_agg_filter7_draw_rasterized.<locals>._MinimalArtist.get_agg_filter  r  r+   c                     Xl         X l        g r/   )figurer  )r$   r  r  s      r(   r)   1_draw_rasterized.<locals>._MinimalArtist.__init__  s     K"Lr+   c                 Z    U(       a  U R                   R                  SS9$ U R                   $ )NTrS   )r  rY   )r$   rT   s     r(   rY   3_draw_rasterized.<locals>._MinimalArtist.get_figure  s'    {{--4-88{{"r+   c                 L    U R                    H  nUR                  U5        M     g r/   )r  r\  )r$   r\   r   s      r(   r\  -_draw_rasterized.<locals>._MinimalArtist.draw  s    \\x  "r+   )r  r  Nr  )r8   r7   r9   rF   r  r  r)   rY   re  r  r\  rG   r0   r+   r(   _MinimalArtistr    s0    			#	# 
	$	$	! 
%	!r+   r  )r\  )r  r  r\   r  s       r(   rS  rS    s%    L! !, &*//99r+   )Pcollections.abcr   r   
contextlibr   rh  r   loggingnumbersr   operatorr   ro   rO  numpyr   
matplotlibrq   r   r	   r
   r   matplotlib.artistrt  re  matplotlib.axisr  r   matplotlib.cbookr   r   r   matplotlib.collectionsr  r  matplotlib.colorscolorsrh   matplotlib.font_managerrO  matplotlib.gridspecr   matplotlib.imager'  r  matplotlib.linesr  rk   matplotlib.patchesr  r   matplotlib.rcsetupr   r   matplotlib.spinesrD  r@  matplotlib.tabletabler  matplotlib.textr2  rR  matplotlib.tickertickerr@  matplotlib.transforms
transformsrU   	getLoggerr8   r  r   rI   r{   r}   define_aliasesArtistr   rS  r0   r+   r(   <module>r     s    .        	    9 9 #  = = & # . + ! ! % 9 # !  # +":& :&zH H2 8= P$fV* V*r
 kD6*+yA/ yA/ ,yA/xC<:r+   