Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/matplotlib/__pycache__/figure.cpython-37.pyc

1616 lines
82 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<><00>@s<>dZddlZddlmZddlZddlmZddlmZm Z m
Z
ddlm Z ddlm Z ddlmZddlmZmZdd lmZddlmZddlmZddlmZdd
lmZmZm Z dd l!m"Z"m#Z#dd l$m%Z%ddl&m'Z(dd l)m*Z*ddl+m,Z,m-Z-ddl.m/Z/m0Z0ddl1m2Z2m3Z3m4Z4m5Z5ddl6m7Z8ddlm9Z9e<01>:e;<3B>Z<e j=j>e,<2C>d<12>dd<14>Z?Gdd<16>dej@<40>ZAGdd<18>deB<65>ZCGdd<1A>de<11>ZDdd<1C>ZEe j=j>e<10>FeD<65>d<1D>dS)a5
The figure module provides the top-level
:class:`~matplotlib.artist.Artist`, the :class:`Figure`, which
contains all the plot elements. The following classes are defined
:class:`SubplotParams`
control the default spacing of the subplots
:class:`Figure`
Top level container for all plot elements.
<EFBFBD>N)<01>Integral)<01>rcParams)<03>backends<64> docstring<6E> projections)<01> __version__)<01> get_backend)<02>Artist<73>allow_rasterization)<01>FigureCanvasBase)<03>Axes<65> SubplotBase<73>subplot_class_factory)<02>BlockingMouseInput<75>BlockingKeyMouseInput)<01>GridSpec)<01> Rectangle)<02>get_projection_names<65>process_projection_requirements)<02>Text<78> TextWithDash)<04>Affine2D<32>Bbox<6F>BboxTransformTo<54>TransformedBbox)<01>NonGuiException)Zprojection_namescCs|jr||j_dS)N)<02>figure<72>stale)<02>self<6C>val<61>r <00>9/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/figure.py<70>_stale_figure_callback1sr"csteZdZdZ<03>fdd<03>Zdd<05>Zdd<07>Zdd <09>Z<07>fd
d <0B>Z<08>fd d <0A>Z <09>fdd<0F>Z
dd<11>Z dd<13>Z dd<15>Z <0A>ZS)<16> AxesStacka
Specialization of the `.Stack` to handle all tracking of
`~matplotlib.axes.Axes` in a `.Figure`.
This stack stores ``key, (ind, axes)`` pairs, where:
* **key** should be a hash of the args and kwargs
used in generating the Axes.
* **ind** is a serial number for tracking the order
in which axes were added.
The AxesStack is a callable, where ``ax_stack()`` returns
the current axes. Alternatively the :meth:`current_key_axes` will
return the current key and associated axes.
cst<00><00><01>d|_dS)Nr)<03>super<65>__init__<5F>_ind)r)<01> __class__r r!r%Fs
zAxesStack.__init__cCs&dd<02>|jD<00>}|<01><01>dd<02>|D<00>S)zY
Return a list of the Axes instances that have been added to the figure.
cSsg|] \}}|<02>qSr r )<03>.0<EFBFBD>k<>ar r r!<00>
<listcomp>Nsz%AxesStack.as_list.<locals>.<listcomp>cSsg|] \}}|<02>qSr r )r(<00>ir*r r r!r+Ps)<02> _elements<74>sort)rZia_listr r r!<00>as_listJszAxesStack.as_listcCs2t|j<01><01>|<01>}|dkrdStjddd<04>|dS)zr
Return the Axes instance that was added with *key*.
If it is not present, return *None*.
Nz2.1a)Adding an axes using the same arguments as a previous axes currently reuses the earlier instance. In a future version, a new instance will always be created and returned. Meanwhile, this warning can be suppressed, and the future behavior ensured, by passing a unique label to each axes instance.)<01>message<67>)<05>dictr-<00>get<65>cbook<6F>warn_deprecated)r<00>key<65>itemr r r!r3Rsz AxesStack.getcCs$dd<02>|jD<00>|\}}|||ffS)NcSsi|]\}\}}||f|<03>qSr r )r(r)<00>indr*r r r!<00>
<dictcomp>esz.AxesStack._entry_from_axes.<locals>.<dictcomp>)r-)r<00>er8r)r r r!<00>_entry_from_axesdszAxesStack._entry_from_axescst<00><00>|<00>|<01><01>dS)zRemove the axes from the stack.N)r$<00>remover;)rr*)r'r r!r<hszAxesStack.removecst<00><00>|<00>|<01><01>S)za
Move the given axes, which must already exist in the
stack, to the top.
)r$<00>bubbler;)rr*)r'r r!r=lszAxesStack.bubblecs<>t|t<01>std<01>|<02><01><01>y t|<01>Wntk
r>t<06>}YnX|<00>|<01>}|dk rrt<08><00> ||f<02>t
<EFBFBD> d<03>|<01><01>||kr~dS|j d7_ t<08><00> ||j |ff<02>S)z<>
Add Axes *a*, with key *key*, to the stack, and return the stack.
If *key* is unhashable, replace it by a unique, arbitrary object.
If *a* is already on the stack, don't add it again, but
return *None*.
z%second argument, {!r}, is not an AxesNz0key {!r} already existed; Axes is being replacedr1)<0E>
isinstancer <00>
ValueError<EFBFBD>format<61>hash<73> TypeError<6F>objectr3r$r<r4<00>_warn_externalr&<00>push)rr6r*Z
a_existing)r'r r!<00>addss
  
 z AxesStack.addcCs6t|j<01>s|j|jfS|j|j\}\}}||fSdS)z<>
Return a tuple of ``(key, axes)`` for the active axes.
If no axes exists on the stack, then returns ``(None, None)``.
N)<04>lenr-<00>_default<6C>_pos)rr6<00>index<65>axesr r r!<00>current_key_axes<65>s
 zAxesStack.current_key_axescCs |<00><00>dS)Nr1)rL)rr r r!<00>__call__<5F>szAxesStack.__call__cCs ||<00><00>kS)N)r/)rr*r r r!<00> __contains__<5F>szAxesStack.__contains__)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r%r/r3r;r<r=rFrLrMrN<00> __classcell__r r )r'r!r#6s     r#c@s,eZdZdZd dd<04>Zd
dd<06>Zdd<08>ZdS) <0B> SubplotParamsz7
A class to hold the parameters for a subplot.
NcCsd|_|<00>||||||<06>dS)a
All dimensions are fractions of the figure width or height.
Defaults are given by :rc:`figure.subplot.[name]`.
Parameters
----------
left : float
The left side of the subplots of the figure.
right : float
The right side of the subplots of the figure.
bottom : float
The bottom of the subplots of the figure.
top : float
The top of the subplots of the figure.
wspace : float
The amount of width reserved for space between subplots,
expressed as a fraction of the average axis width.
hspace : float
The amount of height reserved for space between subplots,
expressed as a fraction of the average axis height.
TN)<02>validate<74>update)r<00>left<66>bottom<6F>right<68>top<6F>wspace<63>hspacer r r!r%<00>szSubplotParams.__init__cs<>t<00>dd<02><03>t<00>dd<02><03>t<00>dd<02><03>t<00>dd<02><03>t<00>dd<02><03>t<00>dd<02><03><02><00>d|<01><00><00>d|<03><00><00>d|<02><00><00>d|<04><00><00>d|<05><00><00>d|<06><00><00><01><02><03><04><05>fdd <09>}<07>jr<><72>j<03>jkr<>|<07>td
<EFBFBD><01><01>j<06>jkr<>|<07>td <0B><01>dS) zY
Update the dimensions of the passed parameters. *None* means unchanged.
rWNrYrZrXr[r\cs(<00><03>_<00><04>_<01><05>_<02><01>_<03><06>_<04><02>_dS)N)rWrYrZrXr[r\r )r<00>
thisbottom<EFBFBD>
thishspace<EFBFBD>thisleft<66> thisright<68>thistop<6F>
thiswspacer r!<00>reset<65>s z#SubplotParams.update.<locals>.resetzleft cannot be >= rightzbottom cannot be >= top)<08>getattr<74> _update_thisrUrWrYr?rXrZ)rrWrXrYrZr[r\rcr )rr]r^r_r`rarbr!rV<00>s(              zSubplotParams.updatecCs<|dkr,t||d<00>}|dkr,d|}t|}t|||<02>dS)Nzfigure.subplot.)rdr<00>setattr)r<00>srr6r r r!re<00>s  zSubplotParams._update_this)NNNNNN)NNNNNN)rOrPrQrRr%rVrer r r r!rT<00>s 

#rTc s<>eZdZdZdd<03>Zdd<05>Zd<><64>fdd <09> Zd
d <0B>Zd<>d d<0E>Zdd<10>Z e
e dd<12>Z dd<14>Z d<>dd<16>Z e
e e dd<18>Zdd<1A>Zdd<1C>Zdd<1E>Zdd <20>Zd!d"<22>Zd<>d$d%<25>Zd<>d)d*<2A>Zd+d,<2C>Zd-d.<2E>Zd/d0<64>Zd1d2<64>Zd3d4<64>Zd<>d6d7<64>Zd<>d8d9<64>Zd:d;<3B>Zd<d=<3D>Zd>d?<3F>Zd@dA<64>Z dBdC<64>Z!dDdE<64>Z"dFdG<64>Z#dHdI<64>Z$dJdK<64>Z%dLdM<64>Z&d<>dNdO<64>Z'd<>dPdQ<64>Z(dRdS<64>Z)e
e#e)<29>Z*dTdU<64>Z+d<>dVdW<64>Z,dXdY<64>Z-d#ddZ<64>d[d\<5C>Z.e/j0d]d^<5E><00>Z1e/j0d_d`<60><00>Z2dadb<64>Z3d<33>ddde<64>Z4dfdg<64>Z5d<35>dhdi<64>Z6d<36>djdk<64>Z7e8dldm<64><00>Z9dndo<64>Z:dpdq<64>Z;e/j0drds<64><00>Z<e=<3D>>dtdu<64>e/j0d<30>dvdw<64><01><01>Z?dxdy<64>Z@e/j0dzd{<7B><00>ZAd|d}<7D>ZBd~d<64>ZC<5A>fd<>d<EFBFBD><64>ZDd<44>d<EFBFBD><64>ZEd<45>d<EFBFBD><64>ZFdd<><64>d<>d<EFBFBD><64>ZGe/j0d<30>d<EFBFBD>d<EFBFBD><64><01>ZHd<48>d<EFBFBD>d<EFBFBD><64>ZId<49>d<EFBFBD>d<EFBFBD><64>ZJd<4A>d<EFBFBD>d<EFBFBD><64>ZKd<4B>d<EFBFBD><64>ZLd<4C>d<EFBFBD>d<EFBFBD><64>ZMd<4D>d<EFBFBD><64>ZNd<4E>d<EFBFBD>d<EFBFBD><64>ZOd<4F>d<EFBFBD>d<EFBFBD><64>ZPd<50>d<EFBFBD>d<EFBFBD><64>ZQd<51>d<EFBFBD>d<EFBFBD><64>ZRd<52>d<EFBFBD>d<EFBFBD><64>ZSd<53>d<EFBFBD><64>ZT<5A>ZUS)<29><>Figurea<65>
The top level container for all the plot elements.
The Figure instance supports callbacks through a *callbacks* attribute
which is a `.CallbackRegistry` instance. The events you can connect to
are 'dpi_changed', and the callback will be called with ``func(fig)`` where
fig is the `Figure` instance.
Attributes
----------
patch
The `.Rectangle` instance representing the figure background patch.
suppressComposite
For multiple figure images, the figure will make composite images
depending on the renderer option_image_nocomposite function. If
*suppressComposite* is a boolean, this will override the renderer.
cCsdt|jj<02>S)Nz Figure(%gx%g))<03>tuple<6C>bbox<6F>size)rr r r!<00>__str__ szFigure.__str__cCs,dj|jj|jjd|jjdt|j<06>d<04>S)Nz.<{clsname} size {h:g}x{w:g} with {naxes} Axes>rr1)Zclsname<6D>h<>wZnaxes)r@r'rOrjrkrGrK)rr r r!<00>__repr__ szFigure.__repr__N<5F>c
sht<00><00><01>|`t<03><04>|_|dkr(td}|dkr8td}|dkrHtd}|dkrXtd}|dkrhtd}t<07>|<01><01> <09>s<>t
d<07> |<01><01><01>t j d |<01><02>|_t<0F><00>||<02>|_||_t|j|j<11>|_t|j<14>|_td d
d
||||d <0B>|_|<00>|j<18>|j<18>d <0C>t|<00>d|_|dk<08>rt<1D>}||_d|_|<00> | <09>|<00>!|<08>t"<22>|_#|<00>$<24>d|_%t<03>&<26>|_'t<03>&<26>|_(g|_)dS)a<>
Parameters
----------
figsize : 2-tuple of floats, default: :rc:`figure.figsize`
Figure dimension ``(width, height)`` in inches.
dpi : float, default: :rc:`figure.dpi`
Dots per inch.
facecolor : default: :rc:`figure.facecolor`
The figure patch facecolor.
edgecolor : default: :rc:`figure.edgecolor`
The figure patch edge color.
linewidth : float
The linewidth of the frame (i.e. the edge linewidth of the figure
patch).
frameon : bool, default: :rc:`figure.frameon`
If ``False``, suppress drawing the figure background patch.
subplotpars : :class:`SubplotParams`
Subplot parameters. If not given, the default subplot
parameters :rc:`figure.subplot.*` are used.
tight_layout : bool or dict, default: :rc:`figure.autolayout`
If ``False`` use *subplotpars*. If ``True`` adjust subplot
parameters using `.tight_layout` with default padding.
When providing a dict containing the keys ``pad``, ``w_pad``,
``h_pad``, and ``rect``, the default `.tight_layout` paddings
will be overridden.
constrained_layout : bool
If ``True`` use constrained layout to adjust positioning of plot
elements. Like ``tight_layout``, but designed to be more
flexible. See
:doc:`/tutorials/intermediate/constrainedlayout_guide`
for examples. (Note: does not work with :meth:`.subplot` or
:meth:`.subplot2grid`.)
Defaults to :rc:`figure.constrained_layout.use`.
Nzfigure.figsizez
figure.dpizfigure.facecolorzfigure.edgecolorzfigure.frameonz!figure size must be finite not {}r)rrr1)Zxy<78>width<74>height<68> facecolor<6F> edgecolor<6F> linewidthZvisibleF)rr)*r$r%Z_axesr4<00>CallbackRegistry<72> callbacksr<00>np<6E>isfinite<74>allr?r@rZ from_bounds<64> bbox_inchesr<00>scale<6C>dpi_scale_trans<6E>_dpirrjr<00> transFigurer<00>patch<63>_set_artist_propsZset_antialiasedr <00> _suptitlerT<00> subplotpars<72>
_layoutbox<EFBFBD>set_constrained_layout<75>set_tight_layoutr#<00>_axstack<63>clf<6C>_cachedRendererZGrouper<65>_align_xlabel_grp<72>_align_ylabel_grp<72>
_gridspecs)
r<00>figsize<7A>dpirsrtru<00>frameonr<6E><00> tight_layoutZconstrained_layout)r'r r!r%sR6

 
  




zFigure.__init__cCs*dt|j<01>jkr&ddlm}|<01>|<00>SdS)NZWebAggr)<01>backend_webagg)<06>type<70>canvasrOZmatplotlib.backendsr<73>Zipython_inline_display)rr<>r r r!<00> _repr_html_<6C>s zFigure._repr_html_Tc
Cs<>yt|jd<01>}Wn.tk
r>}ztd|<00><01>Wdd}~XYnX|dk rjy |<02><03>dStk
rhYnXt<05><06>dkr<>|r<>t<07>dt <09><00>dS)a.
If using a GUI backend with pyplot, display the figure window.
If the figure was not created using
:func:`~matplotlib.pyplot.figure`, it will lack a
:class:`~matplotlib.backend_bases.FigureManagerBase`, and
will raise an AttributeError.
.. warning::
This does not manage an GUI event loop. Consequently, the figure
may only be shown briefly or not shown at all if you or your
environment are not managing an event loop.
Proper use cases for `.Figure.show` include running this from a
GUI application or an IPython shell.
If you're running a pure python shell or executing a non-GUI
python script, you should use `matplotlib.pyplot.show` instead,
which takes care of managing the event loop for you.
Parameters
----------
warn : bool
If ``True`` and we are not running headless (i.e. on Linux with an
unset DISPLAY), issue warning when called on a non-GUI backend.
<20>managerz]%s
Figure.show works only for figures managed by pyplot, normally created by pyplot.figure().NZheadlesszXMatplotlib is currently using %s, which is a non-GUI backend, so cannot show the figure.)
rdr<><00>AttributeError<6F>showrrZ"_get_running_interactive_frameworkr4rDr)r<00>warnr<6E><00>errr r r!r<><00>s z Figure.showcCs
|j<00><01>S)N)r<>r/)rr r r!<00> _get_axes<65>szFigure._get_axesz<73>List of axes in the Figure. You can access the axes in the Figure through this list. Do not modify the list itself. Instead, use `~Figure.add_axes`, `~.Figure.subplot` or `~.Figure.delaxes` to add or remove an axes.)<02>fget<65>doccCs|jS)N)r~)rr r r!<00>_get_dpi<70>szFigure._get_dpicCsF||_|j<01><02><00>||<01>|<00><04>\}}|j|||d<01>|j<06>d|<00>dS)z<>
Parameters
----------
dpi : float
forward : bool
Passed on to `~.Figure.set_size_inches`
)<01>forwardZ dpi_changedN)r~r}<00>clearr|<00>get_size_inches<65>set_size_inchesrw<00>process)rr<>r<>rnrmr r r!<00>_set_dpi<70>s
 zFigure._set_dpiz The resolution in dots per inch.)r<>cCs|jS)z6Return whether `.tight_layout` is called when drawing.)<01>_tight)rr r r!<00>get_tight_layout<75>szFigure.get_tight_layoutcCs8|dkrtd}t|<01>|_t|t<04>r(|ni|_d|_dS)a<>
Set whether and how `.tight_layout` is called when drawing.
Parameters
----------
tight : bool or dict with keys "pad", "w_pad", "h_pad", "rect" or None
If a bool, sets whether to call `.tight_layout` upon drawing.
If ``None``, use the ``figure.autolayout`` rcparam instead.
If a dict, pass it as kwargs to `.tight_layout`, overriding the
default paddings.
Nzfigure.autolayoutT)r<00>boolr<6C>r>r2<00>_tight_parametersr)rZtightr r r!r<><00>s

zFigure.set_tight_layoutcCs|jS)z<>
Return a boolean: True means constrained layout is being used.
See :doc:`/tutorials/intermediate/constrainedlayout_guide`.
)<01> _constrained)rr r r!<00>get_constrained_layout<75>szFigure.get_constrained_layoutcCstt<00>|_d|jd<d|jd<d|jd<d|jd<|dkr@td}t|<01>|_t|t<00>rb|jf|<01>n|<00><06>d|_dS)aG
Set whether ``constrained_layout`` is used upon drawing. If None,
the rcParams['figure.constrained_layout.use'] value will be used.
When providing a dict containing the keys `w_pad`, `h_pad`
the default ``constrained_layout`` paddings will be
overridden. These pads are in inches and default to 3.0/72.0.
``w_pad`` is the width padding and ``h_pad`` is the height padding.
See :doc:`/tutorials/intermediate/constrainedlayout_guide`.
Parameters
----------
constrained : bool or dict or None
N<>w_pad<61>h_padr[r\zfigure.constrained_layout.useT)r2<00>_constrained_layout_padsrr<>r<>r><00>set_constrained_layout_padsr)rZ constrainedr r r!r<>s





zFigure.set_constrained_layoutcKsTddddg}xB|D]:}||kr:||dk r:|||j|<qtd||j|<qWdS)a<>
Set padding for ``constrained_layout``. Note the kwargs can be passed
as a dictionary ``fig.set_constrained_layout(**paddict)``.
See :doc:`/tutorials/intermediate/constrainedlayout_guide`.
Parameters
----------
w_pad : scalar
Width padding in inches. This is the pad around axes
and is meant to make sure there is enough room for fonts to
look good. Defaults to 3 pts = 0.04167 inches
h_pad : scalar
Height padding in inches. Defaults to 3 pts.
wspace : scalar
Width padding between subplots, expressed as a fraction of the
subplot width. The total padding ends up being w_pad + wspace.
hspace : scalar
Height padding between subplots, expressed as a fraction of the
subplot width. The total padding ends up being h_pad + hspace.
r<>r<>r[r\Nzfigure.constrained_layout.)r<>r)r<00>kwargs<67>todo<64>tdr r r!r<>s
 
z"Figure.set_constrained_layout_padsFcCst|jd}|jd}|jd}|jd}|rh|dk s<|dk rht<01>|<00>}|j}|||j}|||j}||||fS)ax
Get padding for ``constrained_layout``.
Returns a list of `w_pad, h_pad` in inches and
`wspace` and `hspace` as fractions of the subplot.
See :doc:`/tutorials/intermediate/constrainedlayout_guide`.
Parameters
----------
relative : boolean
If `True`, then convert from inches to figure relative.
r<>r<>r[r\N)r<><00> layoutbox<6F> get_rendererr<72>rqrr)r<00>relativer<65>r<>r[r\Z renderer0r<30>r r r!<00>get_constrained_layout_padsCs




z"Figure.get_constrained_layout_pads皙<73><E79A99><EFBFBD><EFBFBD><EFBFBD>?<3F>rYcCs<>tdd<02>|jD<00><01>}t|j<01>dkrTx<54>|jdj|d<05>D]}|<06>|<03>|<06>|<02>q6Wnt|r<>xn|<00><06>D]b}|<07><07>r<>xT|j|d<05>D]}|<06>|<03>|<06>|<02>q|Wqbx|j|d<05>D]}|<06>d<06>q<>W|<07> d<07>qbW|r<>|j
|d<08>d |_ d
S) aD
Date ticklabels often overlap, so it is useful to rotate them
and right align them. Also, a common use case is a number of
subplots with shared xaxes where the x-axis is date data. The
ticklabels are often long, and it helps to rotate them on the
bottom subplot and turn them off on other subplots, as well as
turn off xlabels.
Parameters
----------
bottom : scalar
The bottom of the subplots for :meth:`subplots_adjust`.
rotation : angle in degrees
The rotation of the xtick labels.
ha : string
The horizontal alignment of the xticklabels.
which : {None, 'major', 'minor', 'both'}
Selects which ticklabels to rotate. Default is None which works
the same as major.
css|]}t|d<00>VqdS)<02> is_last_rowN)<01>hasattr)r(<00>axr r r!<00> <genexpr>wsz'Figure.autofmt_xdate.<locals>.<genexpr>r1r)<01>whichF<68>)rXTN) rzrKrGZget_xticklabelsZset_haZ set_rotation<6F>get_axesr<73><00> set_visibleZ
set_xlabel<EFBFBD>subplots_adjustr)rrXZrotation<6F>har<61>Z allsubplots<74>labelr<6C>r r r!<00> autofmt_xdate_s"

 zFigure.autofmt_xdatecCs&|jf|j|j|j|j|j|j|j<07>S)z.Get a list of artists contained in the figure.)r<><00>artistsrK<00>lines<65>patches<65>texts<74>images<65>legends)rr r r!<00> get_children<65>szFigure.get_childrencCs0|jdk r|<00>||<01>S|j<01>|j|j<04>}|ifS)z|
Test whether the mouse event occurred on the figure.
Returns
-------
bool, {}
N)Z _containsrj<00>contains<6E>x<>y)rZ
mouseeventZinsider r r!r<><00>s
 zFigure.containscOs|jS)zY
Return the figure bounding box in display space. Arguments are ignored.
)rj)r<00>argsr<73>r r r!<00>get_window_extent<6E>szFigure.get_window_extentc Ks<>d|kpd|k}|<02>dd<03>}|<02>dd<04>}d|kr@d|kr@d|d<d|krXd |krXd
|d<d |kr<>d |kr|d |kr|td|d <d|kr<>d|kr<>td|d<|j|||f|<02>}|jdk r<>|j<03>|<01>|j<03>||f<02>|j<03>|<06>|<06><07>n<>||_d|j_|jdk <09>rx|<03>sx|j dd<14>\}}} }
|j} t
j | |j| j dd<16>|j_x:| j D]0} | |jjk <09>rDt
j|jj| g|ddd<19><00>qDWd|_|jS)aV
Add a centered title to the figure.
Parameters
----------
t : str
The title text.
x : float, default 0.5
The x location of the text in figure coordinates.
y : float, default 0.98
The y location of the text in figure coordinates.
horizontalalignment, ha : {'center', 'left', right'}, default: 'center'
The horizontal alignment of the text relative to (*x*, *y*).
verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, default: 'top'
The vertical alignment of the text relative to (*x*, *y*).
fontsize, size : default: :rc:`figure.titlesize`
The font size of the text. See `.Text.set_size` for possible
values.
fontweight, weight : default: :rc:`figure.titleweight`
The font weight of the text. See `.Text.set_weight` for possible
values.
Returns
-------
text
The `.Text` instance of the title.
Other Parameters
----------------
fontproperties : None or dict, optional
A dict of font properties. If *fontproperties* is given the
default values for font size and weight are taken from the
`FontProperties` defaults. :rc:`figure.titlesize` and
:rc:`figure.titleweight` are ignored in this case.
**kwargs
Additional kwargs are :class:`matplotlib.text.Text` properties.
Examples
--------
>>> fig.suptitle('This is the figure title', fontsize=12)
r<>r<>g<00>?g\<5C><><EFBFBD>(\<5C>?Zhorizontalalignmentr<74><00>centerZverticalalignment<6E>varZZfontpropertiesZfontsizerkzfigure.titlesizeZ
fontweightZweightzfigure.titleweightNT)r<>z .suptitle)<03>parent<6E>artist<73>nameg@<40>required)<02>paddingZstrength)<10>popr<00>textr<74>Zset_text<78> set_positionZ update_fromr<r<>r<>r<><00> LayoutBoxr<78><00>childrenZvstackr) r<00>tr<74>Zmanual_positionr<6E>r<><00>supr<70>r<>r[r\<00>figlb<6C>childr r r!<00>suptitle<6C>sB6    
  
 
zFigure.suptitlecCs
||_dS)z~
Set the canvas that contains the figure
Parameters
----------
canvas : FigureCanvas
N)r<>)rr<>r r r!<00>
set_canvas szFigure.set_canvasrc  s<>|
r<|<00><00><00><00>fdd<02>|jd|jdfD<00>} |j| dd<06>tj|||||| f| <0B>} t| _| <0A>|<01>| <0A>|<04>|dkr<>| <0A> ||<08>|j
<EFBFBD> | <0A>|j
j | _ d|_| S)a<>
Add a non-resampled image to the figure.
The image is attached to the lower or upper left corner depending on
*origin*.
Parameters
----------
X
The image data. This is an array of one of the following shapes:
- MxN: luminance (grayscale) values
- MxNx3: RGB values
- MxNx4: RGBA values
xo, yo : int
The *x*/*y* image offset in pixels.
alpha : None or float
The alpha blending value.
norm : :class:`matplotlib.colors.Normalize`
A :class:`.Normalize` instance to map the luminance to the
interval [0, 1].
cmap : str or :class:`matplotlib.colors.Colormap`
The colormap to use. Default: :rc:`image.cmap`.
vmin, vmax : scalar
If *norm* is not given, these values set the data limits for the
colormap.
origin : {'upper', 'lower'}
Indicates where the [0, 0] index of the array is in the upper left
or lower left corner of the axes. Defaults to :rc:`image.origin`.
resize : bool
If *True*, resize the figure to match the given image size.
Returns
-------
:class:`matplotlib.image.FigureImage`
Other Parameters
----------------
**kwargs
Additional kwargs are `.Artist` kwargs passed on to `.FigureImage`.
Notes
-----
figimage complements the axes image
(:meth:`~matplotlib.axes.Axes.imshow`) which will be resampled
to fit the current axes. If you want a resampled image to
fill the entire figure, you can define an
:class:`~matplotlib.axes.Axes` with extent [0,0,1,1].
Examples::
f = plt.figure()
nx = int(f.get_figwidth() * f.dpi)
ny = int(f.get_figheight() * f.dpi)
data = np.random.random((ny, nx))
f.figimage(data)
plt.show()
csg|] }|<01><00>qSr r )r(r<>)r<>r r!r+\sz#Figure.figimage.<locals>.<listcomp>r1rT)r<>N)<0F>get_dpi<70>shaper<65><00>mimageZ FigureImager"<00>stale_callbackZ set_arrayZ set_alphaZset_climr<6D><00>appendr<<00>_remove_methodr)r<00>XZxoZyo<79>alphaZnormZcmap<61>vmin<69>vmax<61>origin<69>resizer<65>r<><00>imr )r<>r!<00>figimagesE"

  
zFigure.figimagec
Cs<>|dkr|\}}tdd<03>||fD<00><01>s6td<04>||<02><02><01>||f|j_|r<>t|d<05>}|dk r<>t|jdd<07>}|j|}||}||}t|jdd<01>} | dk r<>| <09>t |<07>t |<08><01>d |_
dS)
a<EFBFBD>Set the figure size in inches.
Call signatures::
fig.set_size_inches(w, h) # OR
fig.set_size_inches((w, h))
optional kwarg *forward=True* will cause the canvas size to be
automatically updated; e.g., you can resize the figure window
from the shell
ACCEPTS: a (w, h) tuple with w, h in inches
See Also
--------
matplotlib.Figure.get_size_inches
Ncss|]}t<00>|<01>VqdS)N)rxry)r(<00>_r r r!r<><00>sz)Figure.set_size_inches.<locals>.<genexpr>z'figure size must be finite not ({}, {})r<>Z
_dpi_ratior1r<>T) rzr?r@r{<00>p1rdr<>r<>r<><00>intr)
rrnrmr<>r<>ZratioZdpivalZcanvaswZcanvashr<68>r r r!r<>ks"
 

zFigure.set_size_inchescCst<00>|jj<03>S)a
Returns the current size of the figure in inches.
Returns
-------
size : ndarray
The size (width, height) of the figure in inches.
See Also
--------
matplotlib.Figure.set_size_inches
)rx<00>arrayr{r<>)rr r r!r<><00>s zFigure.get_size_inchescCs
|j<00><01>S)z+Get the edge color of the Figure rectangle.)r<><00> get_edgecolor)rr r r!r<><00>szFigure.get_edgecolorcCs
|j<00><01>S)z+Get the face color of the Figure rectangle.)r<><00> get_facecolor)rr r r!r<><00>szFigure.get_facecolorcCs|jjS)z#Return the figure width as a float.)r{rq)rr r r!<00> get_figwidth<74>szFigure.get_figwidthcCs|jjS)z$Return the figure height as a float.)r{rr)rr r r!<00> get_figheight<68>szFigure.get_figheightcCs|jS)z2Return the resolution in dots per inch as a float.)r<>)rr r r!r<><00>szFigure.get_dpicCs
|j<00><01>S)z<>
Return the figure's background patch visibility, i.e.
whether the figure background will be drawn. Equivalent to
``Figure.patch.get_visible()``.
)r<><00> get_visible)rr r r!<00> get_frameon<6F>szFigure.get_frameoncCs|j<00>|<01>dS)zz
Set the edge color of the Figure rectangle.
Parameters
----------
color : color
N)r<><00> set_edgecolor)r<00>colorr r r!r<><00>szFigure.set_edgecolorcCs|j<00>|<01>dS)zz
Set the face color of the Figure rectangle.
Parameters
----------
color : color
N)r<><00> set_facecolor)rr<>r r r!r<><00>szFigure.set_facecolorcCs||_d|_dS)z
Set the resolution of the figure in dots-per-inch.
Parameters
----------
val : float
TN)r<>r)rrr r r!<00>set_dpi<70>szFigure.set_dpicCs|j||<00><01>|d<01>dS)z<>
Set the width of the figure in inches.
Parameters
----------
val : float
forward : bool
)r<>N)r<>r<>)rrr<>r r r!<00> set_figwidth<74>s zFigure.set_figwidthcCs|j|<00><01>||d<01>dS)z<>
Set the height of the figure in inches.
Parameters
----------
val : float
forward : bool
)r<>N)r<>r<>)rrr<>r r r!<00> set_figheight<68>s zFigure.set_figheightcCs|j<00>|<01>d|_dS)z<>
Set the figure's background patch visibility, i.e.
whether the figure background will be drawn. Equivalent to
``Figure.patch.set_visible()``.
Parameters
----------
b : bool
TN)r<>r<>r)r<00>br r r!<00> set_frameon<6F>s
zFigure.set_frameoncCs.|j<00>|<01>x|jD] }||<00>qWd|_dS)zn
Remove the `~matplotlib.axes.Axes` *ax* from the figure and update the
current axes.
TN)r<>r<<00> _axobserversr)rr<><00>funcr r r!<00>delaxess   zFigure.delaxescCsN|<01>|<00>|j<01>|<01>|jj|_|<01><05>s4|<01>|j<07>|rD|<01>|j <09>d|_
|S)aT
Add any :class:`~matplotlib.artist.Artist` to the figure.
Usually artists are added to axes objects using
:meth:`matplotlib.axes.Axes.add_artist`, but use this method in the
rare cases that adding directly to the figure is necessary.
Parameters
----------
artist : `~matplotlib.artist.Artist`
The artist to add to the figure. If the added artist has no
transform previously set, its transform will be set to
``figure.transFigure``.
clip : bool, optional, default ``False``
An optional parameter ``clip`` determines whether the added artist
should be clipped by the figure patch. Default is *False*,
i.e. no clipping.
Returns
-------
artist : The added `~matplotlib.artist.Artist`
T) <0B>
set_figurer<EFBFBD>r<>r<r<>Zis_transform_set<65> set_transformrZ set_clip_pathr<68>r)rr<><00>clipr r r!<00>
add_artist s
 
  zFigure.add_artistcOs(dd<02>}dd<04>}||<01>||<02><00><00>f}|S)z+Make a hashable key out of args and kwargs.c SsNg}x@|D]8\}}y t|<03>}Wntk
r2YnX|<01>||f<02>q
Wt|<01>S)N)ri<00> Exceptionr<6E>)<04>items<6D>retr)<00>vr r r!<00>fixitems3s z"Figure._make_key.<locals>.fixitemscSs6g}x(|D] }t<00>|<02>r t|<02>}|<01>|<02>q
Wt|<01>S)N)rx<00>iterablerir<>)r<>r
r*r r r!<00>fixlistCs 

z!Figure._make_key.<locals>.fixlist)r )rr<>r<>r rr6r r r!<00> _make_key0szFigure._make_key)<02>polar<61>
projectioncOs<>|r$|dk r |dkr td|<00><01>d}t|t<02>s6|dkrBt<03>|<02>}n0t|d<04>rf|<02><06>\}}|jf|<06>n td|<00><01>|j ||<04>}|||fS)z<>
Handle the args/kwargs to add_axes/add_subplot/gca, returning::
(axes_proj_class, proj_class_kwargs, proj_stack_key)
which can be used for new axes initialization/identification.
NrzNpolar=True, yet projection=%r. Only one of these arguments should be supplied.<2E> _as_mpl_axeszLprojection must be a string, None or implement a _as_mpl_axes method. Got %r)
r?r><00>strrZget_projection_classr<73>rrVrBr)rrrr<>r<><00>projection_class<73> extra_kwargsr6r r r!<00> _process_projection_requirementsNs  
  z'Figure._process_projection_requirementscOs<>t|<01>s dS|j||<02>}|j<02>|<03>}|dk r:|<00>|<04>|St|dt<06>rf|d}|<05><07>|k r<>td<03><01>nh|d}t <09>
|<06><01> <0B>s<>td<04> |<06><01><01>|j ||<02>\}}}|j<02>|<03>}t||<07>r<>|<00>|<04>|S|||f|<02>}|<00>||<05>S)a~
Add an axes to the figure.
Call signatures::
add_axes(rect, projection=None, polar=False, **kwargs)
add_axes(ax)
Parameters
----------
rect : sequence of float
The dimensions [left, bottom, width, height] of the new axes. All
quantities are in fractions of figure width and height.
projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
The projection type of the `~.axes.Axes`. *str* is the name of
a custom projection, see `~matplotlib.projections`. The default
None results in a 'rectilinear' projection.
polar : boolean, optional
If True, equivalent to projection='polar'.
sharex, sharey : `~.axes.Axes`, optional
Share the x or y `~matplotlib.axis` with sharex and/or sharey.
The axis will have the same limits, ticks, and scale as the axis
of the shared axes.
label : str
A label for the returned axes.
Other Parameters
----------------
**kwargs
This method also takes the keyword arguments for
the returned axes class. The keyword arguments for the
rectilinear axes class `~.axes.Axes` can be found in
the following table but there might also be other keyword
arguments if another projection is used, see the actual axes
class.
%(Axes)s
Returns
-------
axes : `~.axes.Axes` (or a subclass of `~.axes.Axes`)
The returned axes class depends on the projection used. It is
`~.axes.Axes` if rectilinear projection are used and
`.projections.polar.PolarAxes` if polar projection
are used.
Notes
-----
If the figure already has an axes with key (*args*,
*kwargs*) then it will simply make that axes current and
return it. This behavior is deprecated. Meanwhile, if you do
not want this behavior (i.e., you want to force the creation of a
new axes), you must use a unique set of args and kwargs. The axes
*label* attribute has been exposed for this purpose: if you want
two axes that are otherwise identical to be added to the figure,
make sure you give them unique labels.
In rare circumstances, `.add_axes` may be called with a single
argument, a axes instance already created in the present figure but
not in the figure's list of axes.
See Also
--------
.Figure.add_subplot
.pyplot.subplot
.pyplot.axes
.Figure.subplots
.pyplot.subplots
Examples
--------
Some simple examples::
rect = l, b, w, h
fig = plt.figure()
fig.add_axes(rect,label=label1)
fig.add_axes(rect,label=label2)
fig.add_axes(rect, frameon=False, facecolor='g')
fig.add_axes(rect, polar=True)
ax=fig.add_axes(rect, projection='polar')
fig.delaxes(ax)
fig.add_axes(ax)
Nrz5The Axes must have been created in the present figurez)all entries in rect must be finite not {})rGrr<>r3<00>scar>r <00>
get_figurer?rxryrzr@r<00>_add_axes_internal)rr<>r<>r6r<>r*<00>rectrr r r!<00>add_axesns.[  
  

zFigure.add_axescOs
t|<01>s d}t|<01>dkrht|dt<02>rhd|dkr>dksRntd<06>|d<00><01><01>tttt|d<00><01><02>}t|dt <09>r<>|d}|<03>
<EFBFBD>|k r<>td<07><01>|j ||<02>}n^|j ||<02>\}}}|j <0A>|<04>}|dk r<>t||<05>r<>|<00>|<06>|S|j <0A>|<06>t|<05>|f|<01>|<02>}|<00>||<03>S) a<>
Add an `~.axes.Axes` to the figure as part of a subplot arrangement.
Call signatures::
add_subplot(nrows, ncols, index, **kwargs)
add_subplot(pos, **kwargs)
add_subplot(ax)
add_subplot()
Parameters
----------
*args
Either a 3-digit integer or three separate integers
describing the position of the subplot. If the three
integers are *nrows*, *ncols*, and *index* in order, the
subplot will take the *index* position on a grid with *nrows*
rows and *ncols* columns. *index* starts at 1 in the upper left
corner and increases to the right.
*pos* is a three digit integer, where the first digit is the
number of rows, the second the number of columns, and the third
the index of the subplot. i.e. fig.add_subplot(235) is the same as
fig.add_subplot(2, 3, 5). Note that all integers must be less than
10 for this form to work.
If no positional arguments are passed, defaults to (1, 1, 1).
In rare circumstances, `.add_subplot` may be called with a single
argument, a subplot axes instance already created in the
present figure but not in the figure's list of axes.
projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optional
The projection type of the subplot (`~.axes.Axes`). *str* is the
name of a custom projection, see `~matplotlib.projections`. The
default None results in a 'rectilinear' projection.
polar : boolean, optional
If True, equivalent to projection='polar'.
sharex, sharey : `~.axes.Axes`, optional
Share the x or y `~matplotlib.axis` with sharex and/or sharey.
The axis will have the same limits, ticks, and scale as the axis
of the shared axes.
label : str
A label for the returned axes.
Other Parameters
----------------
**kwargs
This method also takes the keyword arguments for
the returned axes base class. The keyword arguments for the
rectilinear base class `~.axes.Axes` can be found in
the following table but there might also be other keyword
arguments if another projection is used.
%(Axes)s
Returns
-------
axes : `.axes.SubplotBase`, or another subclass of `~.axes.Axes`
The axes of the subplot. The returned axes base class depends on
the projection used. It is `~.axes.Axes` if rectilinear projection
are used and `.projections.polar.PolarAxes` if polar projection
are used. The returned axes is then a subplot subclass of the
base class.
Notes
-----
If the figure already has a subplot with key (*args*,
*kwargs*) then it will simply make that subplot current and
return it. This behavior is deprecated. Meanwhile, if you do
not want this behavior (i.e., you want to force the creation of a
new subplot), you must use a unique set of args and kwargs. The axes
*label* attribute has been exposed for this purpose: if you want
two subplots that are otherwise identical to be added to the figure,
make sure you give them unique labels.
See Also
--------
.Figure.add_axes
.pyplot.subplot
.pyplot.axes
.Figure.subplots
.pyplot.subplots
Examples
--------
::
fig = plt.figure()
fig.add_subplot(221)
# equivalent but more general
ax1 = fig.add_subplot(2, 2, 1)
# add a subplot with no frame
ax2 = fig.add_subplot(222, frameon=False)
# add a polar subplot
fig.add_subplot(223, projection='polar')
# add a red subplot that share the x-axis with ax1
fig.add_subplot(224, sharex=ax1, facecolor='red')
#delete x2 from the figure
fig.delaxes(ax2)
#add x2 to the figure again
fig.add_subplot(ax2)
)r1r1r1r1r<00>di<>zBInteger subplot specification must be a three-digit number, not {}z8The Subplot must have been created in the present figureN)rGr>rr?r@ri<00>mapr<70>rr rrrr<>r3rr<rr)rr<>r<>r*r6rr<>r r r!<00> add_subplot<6F>s,s   

 zFigure.add_subplotcCs0|j<00>||<02>|<00>|<02>|j|_d|_t|_|S)z0Private helper for `add_axes` and `add_subplot`.T)r<>rFr<00>
_remove_axr<EFBFBD>rr"r<>)rr6r<>r r r!r<00>s 
zFigure._add_axes_internalr1cCst|t<01>r|rdnd}t|t<01>r,|r(dnd}t|t<02>r@t<03>d<03>tjddddg||d<06>|dkrdi}|dkrpi}|<06><06>}|<07><06>}|<00><07>r<>t||fd|i|<07><02>}nt||fddi|<07><02>}|j <09>
|<08>t j ||ft d <09>} xzt|<01>D]n}
xht|<02>D]\} d| d
| |
d f| d | fd <0C>} | ||d <| ||d<|j||
| ff|<06>| |
| f<q<>Wq<>W|dk<06>r<>x@| dd<10>dd<07>fjD]&} | jjdddd<13>| jj<13>d<12><00>qrW|dk<06>r<>x@| dd<07>dd<07>fjD]&} | jjdddd<16>| jj<13>d<12><00>q<>W|<05>r
| jdk<02>r| <09><17>S| <09><18>S| SdS)a<>
Add a set of subplots to this figure.
This utility wrapper makes it convenient to create common layouts of
subplots in a single call.
Parameters
----------
nrows, ncols : int, optional, default: 1
Number of rows/columns of the subplot grid.
sharex, sharey : bool or {'none', 'all', 'row', 'col'}, default: False
Controls sharing of properties among x (`sharex`) or y (`sharey`)
axes:
- True or 'all': x- or y-axis will be shared among all
subplots.
- False or 'none': each subplot x- or y-axis will be
independent.
- 'row': each subplot row will share an x- or y-axis.
- 'col': each subplot column will share an x- or y-axis.
When subplots have a shared x-axis along a column, only the x tick
labels of the bottom subplot are created. Similarly, when subplots
have a shared y-axis along a row, only the y tick labels of the
first column subplot are created. To later turn other subplots'
ticklabels on, use `~matplotlib.axes.Axes.tick_params`.
squeeze : bool, optional, default: True
- If True, extra dimensions are squeezed out from the returned
array of Axes:
- if only one subplot is constructed (nrows=ncols=1), the
resulting single Axes object is returned as a scalar.
- for Nx1 or 1xM subplots, the returned object is a 1D numpy
object array of Axes objects.
- for NxM, subplots with N>1 and M>1 are returned
as a 2D array.
- If False, no squeezing at all is done: the returned Axes object
is always a 2D array containing Axes instances, even if it ends
up being 1x1.
subplot_kw : dict, optional
Dict with keywords passed to the
:meth:`~matplotlib.figure.Figure.add_subplot` call used to create
each subplot.
gridspec_kw : dict, optional
Dict with keywords passed to the
`~matplotlib.gridspec.GridSpec` constructor used to create
the grid the subplots are placed on.
Returns
-------
ax : `~.axes.Axes` object or array of Axes objects.
*ax* can be either a single `~matplotlib.axes.Axes` object or
an array of Axes objects if more than one subplot was created. The
dimensions of the resulting array can be controlled with the
squeeze keyword, see above.
Examples
--------
::
# First create some toy data:
x = np.linspace(0, 2*np.pi, 400)
y = np.sin(x**2)
# Create a figure
plt.figure()
# Creates a subplot
ax = fig.subplots()
ax.plot(x, y)
ax.set_title('Simple plot')
# Creates two subplots and unpacks the output array immediately
ax1, ax2 = fig.subplots(1, 2, sharey=True)
ax1.plot(x, y)
ax1.set_title('Sharing Y axis')
ax2.scatter(x, y)
# Creates four polar axes, and accesses them through the
# returned array
axes = fig.subplots(2, 2, subplot_kw=dict(polar=True))
axes[0, 0].plot(x, y)
axes[1, 1].scatter(x, y)
# Share a X axis with each column of subplots
fig.subplots(2, 2, sharex='col')
# Share a Y axis with each row of subplots
fig.subplots(2, 2, sharey='row')
# Share both X and Y axes with all subplots
fig.subplots(2, 2, sharex='all', sharey='all')
# Note that this is the same as
fig.subplots(2, 2, sharex=True, sharey=True)
See Also
--------
.pyplot.subplots
.Figure.add_subplot
.pyplot.subplot
rz<00>nonez]sharex argument to subplots() was an integer. Did you intend to use subplot() (without 's')?<3F>row<6F>col)<02>sharex<65>shareyNr)Zdtype)rrr)r rzr!r"r#r$)r"rz<00><><EFBFBD><EFBFBD><EFBFBD>ZbothF)r<>Z labelbottomZlabeltop)r!rzr1)r<>Z labelleftZ
labelright)r>r<>rr4rDZ_check_in_list<73>copyr<79>rr<>r<>rx<00>emptyrC<00>rangerZflat<61>xaxisZset_tick_paramsZ
offsetTextr<EFBFBD><00>yaxisrkr7<00>squeeze)r<00>nrows<77>ncolsr#r$r+Z
subplot_kwZ gridspec_kw<6B>gsZaxarrr!r"Z shared_withr<68>r r r!<00>subplots<74>sPn
 
 

   &



zFigure.subplotscCsZdd<02>}dd<04>}|<00>|<01>|||j<01>}|dk r8||j<02>|||j<03>}|dk rV||j<04>dS)NcSs<|<00>|<00><01><00>|<00>|<00><03><00>|<00>|<00><05><00>|<00>|<00><07><00>dS)N)Zset_major_formatterZget_major_formatterZset_major_locatorZget_major_locatorZset_minor_formatterZget_minor_formatterZset_minor_locatorZget_minor_locator)Zaxisr r r!<00>_reset_loc_form@sz*Figure._remove_ax.<locals>._reset_loc_formcSs>|<01>|<00>}t|<02>dkr:|<01>|<00>x|D]}||k r&|Sq&WdS)Nr1)Z get_siblingsrGr<)r<>ZgrouperZsiblings<67>last_axr r r!<00>_break_share_linkFs
 

z,Figure._remove_ax.<locals>._break_share_link)rZ_shared_y_axesr*Z_shared_x_axesr))rr<>r0r2r1r r r!r?s
 
 zFigure._remove_axcCs<>d|_t<01><02>|_x$t|j<05>D]}|<02><06>|<00>|<02>qWt|j dd<01>}|dk rT|<03>
<EFBFBD>|j <0B> <0C>g|_ g|_g|_g|_g|_g|_|s<>g|_d|_|<00><15>r<>t<16>|j<18>d|_dS)z<>
Clear the figure.
Set *keep_observers* to True if, for example,
a gui widget is tracking the axes in the figure.
N<>toolbarT)<1A>suppressCompositer4rvrwrirKZclarrdr<>rVr<>r<>r<>r<>r<>r<>r<>r<>rr<>r<>r<>Znonetreer<65>r)r<00>keep_observersr<73>r3r r r!r<>Xs*

 z
Figure.clfcCs|j|d<01>dS)z>
Clear the figure -- synonym for :meth:`clf`.
)r5N)r<>)rr5r r r!r<>wsz Figure.clearcCsf|<00><00>s dS|<00><01>}|<02>|j<03>tdd<03>|D<00>dd<05>d<06>}x~|jD]t}|<03><06>}|rh|||<01>}|<03>|<05>n|<03><07>xD|<03><01>D]8}t|d<07>rz|<06><06>}|r<>|||<01>}|<06>|<05>qz|<06><07>qzWqBWz<>|<01> d<08>|<00>
<EFBFBD>r<>|jr<>|<00> |<01>|<00> <0C><00>r|j<05>ry|j |f|j<0E>Wntk
<EFBFBD>rYnX|j<03>|<01>t<11>||||j<13>|<01>d<08>Wdd |_X||_|j<17>|<01>dS)
zu
Render the figure using :class:`matplotlib.backend_bases.RendererBase`
instance *renderer*.
Ncss|]}|<01><00>s|VqdS)N)Z get_animated)r(r<>r r r!r<><00>szFigure.draw.<locals>.<genexpr>cSs|<00><00>S)N)Z
get_zorder)r<>r r r!<00><lambda><3E><00>zFigure.draw.<locals>.<lambda>)r6<00> apply_aspectrF)r<>r<>r<r<><00>sortedrKZget_axes_locatorr8r<>Z
open_groupr<EFBFBD><00>execute_constrained_layoutr<74>r<>r<>r?<00>drawr<77>Z_draw_list_compositing_imagesr4Z close_grouprr<>r<>Z
draw_event)r<00>rendererr<72>r<><00>locator<6F>posr<73>r r r!r;}sJ    
 

 

  z Figure.drawcCs"|jdkrtd<02><01>|<01>|j<00>dS)z<>
Draw :class:`matplotlib.artist.Artist` instance *a* only.
This is available only after the figure is drawn.
NzLdraw_artist can only be used after an initial draw which caches the renderer)r<>r<>r;)rr*r r r!<00> draw_artist<73>s
zFigure.draw_artistcCs|jS)aY
Return a list of axes in the Figure. You can access and modify the
axes in the Figure through this list.
Do not modify the list itself. Instead, use `~Figure.add_axes`,
`~.Figure.subplot` or `~.Figure.delaxes` to add or remove an axes.
Note: This is equivalent to the property `~.Figure.axes`.
)rK)rr r r!r<><00>s
zFigure.get_axescOsZtj|jf|<01>|<02>\}}}}t|<05>r$tj|||f|<05>|<02>}|j<05>|<06>|jj|_d|_ |S)at
Place a legend on the figure.
To make a legend from existing artists on every axes::
legend()
To make a legend for a list of lines and labels::
legend(
(line1, line2, line3),
('label1', 'label2', 'label3'),
loc='upper right')
These can also be specified by keyword::
legend(
handles=(line1, line2, line3),
labels=('label1', 'label2', 'label3'),
loc='upper right')
Parameters
----------
handles : sequence of `.Artist`, optional
A list of Artists (lines, patches) to be added to the legend.
Use this together with *labels*, if you need full control on what
is shown in the legend and the automatic mechanism described above
is not sufficient.
The length of handles and labels should be the same in this
case. If they are not, they are truncated to the smaller length.
labels : sequence of strings, optional
A list of labels to show next to the artists.
Use this together with *handles*, if you need full control on what
is shown in the legend and the automatic mechanism described above
is not sufficient.
Other Parameters
----------------
%(_legend_kw_doc)s
Returns
-------
:class:`matplotlib.legend.Legend` instance
Notes
-----
Not all kinds of artist are supported by the legend command. See
:doc:`/tutorials/intermediate/legend_guide` for details.
T)
<EFBFBD>mlegendZ_parse_legend_argsrKrGZLegendr<64>r<>r<r<>r)rr<>r<>Zhandles<65>labels<6C>
extra_args<EFBFBD>lr r r!<00>legend<6E>s8
 
z Figure.legendz3.1<EFBFBD>withdashc Ks<>t|jd<01>}|r,|tjjk r,t|||d<02>}nt|||d<02>}|<08>|<07>|dk rV|<08>|<04>|<08>|<06>|<08>|<00>t |_
|j <0B> |<08>|j j |_d|_|S)aU
Add text to figure.
Parameters
----------
x, y : float
The position to place the text. By default, this is in figure
coordinates, floats in [0, 1]. The coordinate system can be changed
using the *transform* keyword.
s : str
The text string.
fontdict : dictionary, optional, default: None
A dictionary to override the default text properties. If fontdict
is None, the defaults are determined by your rc parameters. A
property in *kwargs* override the same property in fontdict.
withdash : boolean, optional, default: False
Creates a `~matplotlib.text.TextWithDash` instance instead of a
`~matplotlib.text.Text` instance.
Other Parameters
----------------
**kwargs : `~matplotlib.text.Text` properties
Other miscellaneous text parameters.
%(Text)s
Returns
-------
text : `~.text.Text`
See Also
--------
.Axes.text
.pyplot.text
)Z transform)r<>r<>r<>NT)r2rr4<00> deprecationZ_deprecated_parameterrrrVrr"r<>r<>r<>r<r<>r) rr<>r<>rgZfontdictrEr<><00>defaultr<74>r r r!r<>s(  



 
z Figure.textcCs(||kr|<01>|<00>t|_|<01>|j<04>dS)N)rr"r<>rr)rr*r r r!r<>Zs
zFigure._set_artist_propscKst|j<00><01>\}}|dk rh|s|S|jf|<01>\}}}|dd<01>}|dd<01>}||kr^t||<04>r^|St<04>d<03>|jd|<01>S)a
Get the current axes, creating one if necessary.
The following kwargs are supported for ensuring the returned axes
adheres to the given projection etc., and for axes creation if
the active axes does not exist:
%(Axes)s
Nr1zlRequested projection is different from current axis projection, creating new axis with requested projection.)r1r1r1)r<>rLrr>r4rDr)rr<>Zckey<65>caxrr<>r6r r r!<00>gca`s   
z
Figure.gcacCs(|j<00>|<01>x|jD] }||<00>qW|S)z*Set the current axes to be a and return a.)r<>r=r)rr*rr r r!r<00>s   z
Figure.scacCsZ|j<00><01>d}|dkrdS|<01><02>}|dk r.|Sx&t|j<04>D]}|<03><02>}|dk r:|Sq:WdS)zR
Helper for :func:`~matplotlib.pyplot.gci`. Do not use elsewhere.
r1N)r<>rL<00>_gci<63>reversedrK)rrHr<>r<>r r r!rJ<00>sz Figure._gcics|t<00><00><01>}xdD]}|<01>|d<00>qWt|d<ddlm}t|jdd<00>|jj <09>
<EFBFBD>krZd|d<|<01>dd<00>|j dk rxd|j _ |S) N)rr<>r<>r<><00>__mpl_version__r)<01>_pylab_helpersr<73>T<>_restore_to_pylabr<62>) r$<00> __getstate__r<5F><00> _mpl_version<6F>
matplotlibrMrdr<><00>GcfZfigs<67>valuesr<73>r<>)r<00>stateZ attr_to_poprM)r'r r!rO<00>s

   
zFigure.__getstate__cs<>|<01>d<01>}|<01>dd<03>}|tkr0t<02>d|<02>d<05><03>||_g|_d|_d|_|r<>ddlm }ddl
m <0B>|<04> <0C>}|r|t |<05>dnd}|j<0E>||<00><02>|<00><10>r<><72><00>|<00><10><00><00><00>fdd <09>}<07>j<06>d
|<07><02>_<13>j<14><15><00>||_|<04><17>d |_dS) NrLrNFz.This figure was saved with matplotlib version z' and is unlikely to function correctly.rr1cs<00>j<00><01><00>dS)N)rR<00>
set_active)<01>event)<02>mgr<67> pylab_helpersr r!<00> make_active<76>sz(Figure.__setstate__.<locals>.make_activeZbutton_press_eventT)r<>rPr4rD<00>__dict__rr<>r<>Zmatplotlib.pyplotZpyplotZmatplotlib._pylab_helpersrMZ get_fignums<6D>maxZ _backend_modZnew_figure_manager_given_figureZ get_labelZset_window_titleZ mpl_connectZ_cidgcfrRrU<00>numberZdraw_if_interactiver)rrT<00>versionZrestore_to_pylabZpltZallnums<6D>numrYr )rWrXr!<00> __setstate__<5F>s0
    zFigure.__setstate__cCs|j<00>|<01>dS)z>Whenever the axes state change, ``func(self)`` will be called.N)rr<>)rrr r r!<00>add_axobserver<65>szFigure.add_axobserver)<01> transparentc
Ksb|<03>dtd<00>d|krJtjddddd<07>|<03>d<03>}|dkrNt<05>td <09>}nd
}|dkr^td }|r<>|<03>dd <0C>|<03>d d <0C>g}x`|jD]4}|j}|<05> |<07>
<EFBFBD>|<07> <0B>f<02>|<07> d <0C>|<07> d <0C>q<>Wn |<03>dtd<00>|<03>d td<00>|r<>|j<08><0E>}|j<08>|<04>|jj|f|<03>|<04>r|j<08>|<08>|<02>r^x:t|j|<05>D]*\}} |j<08> | d<00>|j<08> | d<00><00>q0WdS)a<>
Save the current figure.
Call signature::
savefig(fname, dpi=None, facecolor='w', edgecolor='w',
orientation='portrait', papertype=None, format=None,
transparent=False, bbox_inches=None, pad_inches=0.1,
frameon=None, metadata=None)
The output formats available depend on the backend being used.
Parameters
----------
fname : str or PathLike or file-like object
A path, or a Python file-like object, or
possibly some backend-dependent object such as
`matplotlib.backends.backend_pdf.PdfPages`.
If *format* is not set, then the output format is inferred from
the extension of *fname*, if any, and from :rc:`savefig.format`
otherwise. If *format* is set, it determines the output format.
Hence, if *fname* is not a path or has no extension, remember to
specify *format* to ensure that the correct backend is used.
Other Parameters
----------------
dpi : [ *None* | scalar > 0 | 'figure' ]
The resolution in dots per inch. If *None*, defaults to
:rc:`savefig.dpi`. If 'figure', uses the figure's dpi value.
quality : [ *None* | 1 <= scalar <= 100 ]
The image quality, on a scale from 1 (worst) to 95 (best).
Applicable only if *format* is jpg or jpeg, ignored otherwise.
If *None*, defaults to :rc:`savefig.jpeg_quality` (95 by default).
Values above 95 should be avoided; 100 completely disables the
JPEG quantization stage.
optimize : bool
If *True*, indicates that the JPEG encoder should make an extra
pass over the image in order to select optimal encoder settings.
Applicable only if *format* is jpg or jpeg, ignored otherwise.
Is *False* by default.
progressive : bool
If *True*, indicates that this image should be stored as a
progressive JPEG file. Applicable only if *format* is jpg or
jpeg, ignored otherwise. Is *False* by default.
facecolor : color spec or None, optional
The facecolor of the figure; if *None*, defaults to
:rc:`savefig.facecolor`.
edgecolor : color spec or None, optional
The edgecolor of the figure; if *None*, defaults to
:rc:`savefig.edgecolor`
orientation : {'landscape', 'portrait'}
Currently only supported by the postscript backend.
papertype : str
One of 'letter', 'legal', 'executive', 'ledger', 'a0' through
'a10', 'b0' through 'b10'. Only supported for postscript
output.
format : str
The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when
this is unset is documented under *fname*.
transparent : bool
If *True*, the axes patches will all be transparent; the
figure patch will also be transparent unless facecolor
and/or edgecolor are specified via kwargs.
This is useful, for example, for displaying
a plot on top of a colored background on a web page. The
transparency of these patches will be restored to their
original values upon exit of this function.
bbox_inches : str or `~matplotlib.transforms.Bbox`, optional
Bbox in inches. Only the given portion of the figure is
saved. If 'tight', try to figure out the tight bbox of
the figure. If None, use savefig.bbox
pad_inches : scalar, optional
Amount of padding around the figure when bbox_inches is
'tight'. If None, use savefig.pad_inches
bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
A list of extra artists that will be considered when the
tight bbox is calculated.
metadata : dict, optional
Key/value pairs to store in the image metadata. The supported keys
and defaults depend on the image format and backend:
- 'png' with Agg backend: See the parameter ``metadata`` of
`~.FigureCanvasAgg.print_png`.
- 'pdf' with pdf backend: See the parameter ``metadata`` of
`~.backend_pdf.PdfPages`.
- 'eps' and 'ps' with PS backend: Only 'Creator' is supported.
pil_kwargs : dict, optional
Additional keyword arguments that are passed to `PIL.Image.save`
when saving the figure. Only applicable for formats that are saved
using Pillow, i.e. JPEG, TIFF, and (if the keyword is set to a
non-None value) PNG.
r<>z savefig.dpir<69>z3.1<EFBFBD>kwargrs)r<>Zobj_type<70> alternativeNzsavefig.frameonFzsavefig.transparentr rtzsavefig.facecolorzsavefig.edgecolorrr1)<13>
setdefaultrr4r5r<>r2<00> __getitem__rKr<>r<>r<>r<>r<>r<>r<>r<>r<>Z print_figure<72>zip)
r<00>fnamerar<>r<>Zoriginal_axes_colorsr<73>r<>Zoriginal_frameon<6F>ccr r r!<00>savefig<69>s@p

   
 

  zFigure.savefigc  s<>|dkr|<00><00>}|<00><00>}|dkr\|rJt|t<02>rJ|<00><03>sJtj|f|<05>\}}ntj|f|<05>\}}ddddddg<06><00>fdd <09>|<05><07>D<00>}tj||f|<07>}|<00> |<06>d
|_
|S) z<>
Create a colorbar for a ScalarMappable instance, *mappable*.
Documentation for the pyplot thin wrapper:
%(colorbar_doc)s
N<>fraction<6F>pad<61>shrinkZaspect<63>anchorZpanchorcsi|]\}}|<01>kr||<01>qSr r )r(r)r )<01>NON_COLORBAR_KEYSr r!r9<00>sz#Figure.colorbar.<locals>.<dictcomp>T) rIr>r r<><00>cbarZmake_axes_gridspecZ make_axesr Zcolorbar_factoryrr) rZmappablerHr<>Z use_gridspec<65>kwZ
current_axZcb_kw<6B>cbr )rnr!<00>colorbar<61>s

zFigure.colorbarcCs<>|<00><00>r|<00>d<01>t<02>d<02>|j<04>||||||<06>xx|jD]n}t|t<08>s<>t|j t<08>rn|j <09>
<EFBFBD>|<07> |j j <0C>q<>t|j t<08>r<>|j <0A>
<EFBFBD>|<07> |j j <0C>q:|<07>
<EFBFBD>|<07> |j <0C>q:Wd|_dS)z<>
Update the :class:`SubplotParams` with *kwargs* (defaulting to rc when
*None*) and update the subplot locations.
Fz<46>This figure was using constrained_layout==True, but that is incompatible with subplots_adjust and or tight_layout: setting constrained_layout==False. TN)r<>r<>r4rDr<>rVrKr>r Z_sharexZ update_paramsr<73>ZfigboxZ_shareyr)rrWrXrYrZr[r\r<>r r r!r<><00>s

 
 
 
zFigure.subplots_adjust<73><00>cCst||||d<01>}||||d<02>S)a<>
Blocking call to interact with a figure.
Wait until the user clicks *n* times on the figure, and return the
coordinates of each click in a list.
There are three possible interactions:
- Add a point.
- Remove the most recently added point.
- Stop the interaction and return the points added so far.
The actions are assigned to mouse buttons via the arguments
*mouse_add*, *mouse_pop* and *mouse_stop*. Mouse buttons are defined
by the numbers:
- 1: left mouse button
- 2: middle mouse button
- 3: right mouse button
- None: no mouse button
Parameters
----------
n : int, optional, default: 1
Number of mouse clicks to accumulate. If negative, accumulate
clicks until the input is terminated manually.
timeout : scalar, optional, default: 30
Number of seconds to wait before timing out. If zero or negative
will never timeout.
show_clicks : bool, optional, default: True
If True, show a red cross at the location of each click.
mouse_add : {1, 2, 3, None}, optional, default: 1 (left click)
Mouse button used to add points.
mouse_pop : {1, 2, 3, None}, optional, default: 3 (right click)
Mouse button used to remove the most recently added point.
mouse_stop : {1, 2, 3, None}, optional, default: 2 (middle click)
Mouse button used to stop input.
Returns
-------
points : list of tuples
A list of the clicked (x, y) coordinates.
Notes
-----
The keyboard can also be used to select points in case your mouse
does not have one or more of the buttons. The delete and backspace
keys act like right clicking (i.e., remove last point), the enter key
terminates input and any other key (not already used by the window
manager) selects a point.
)<03> mouse_add<64> mouse_pop<6F>
mouse_stop)<03>n<>timeout<75> show_clicks)r)rrxryrzrurvrwZblocking_mouse_inputr r r!<00>ginput<75>s 6z Figure.ginputr%cCst|<00>}||d<01>S)a
Blocking call to interact with the figure.
This will return True is a key was pressed, False if a mouse
button was pressed and None if *timeout* was reached without
either being pressed.
If *timeout* is negative, does not timeout.
)ry)r)rryZblocking_inputr r r!<00>waitforbuttonpress s zFigure.waitforbuttonpresscCsRdd<02>|<00><00>D<00>}x$|jD]}|<02><02>r|<01>|<02><04><00>qW|j|krN|<01>|j<05>|S)NcSs g|]}|<01><00>r|<01><01>r|<01>qSr )r<>Z get_in_layout)r(r<>r r r!r+ sz9Figure.get_default_bbox_extra_artists.<locals>.<listcomp>)r<>rKr<><00>extend<6E>get_default_bbox_extra_artistsr<73>r<)rZ bbox_artistsr<73>r r r!r~ s 
 z%Figure.get_default_bbox_extra_artistsc
Cs<>g}|dkr|<00><00>}n|}x<|D]4}|<05>|<01>}|dk r |jdksJ|jdkr |<03>|<06>q WxR|jD]H}|<07><06>r`y|j||d<03>}Wntk
r<EFBFBD>|<07>|<01>}YnX|<03>|<06>q`Wdd<05>|D<00>}t|<03>dkr<>|j St
<EFBFBD> |<03>}t |t <0A><00>d|j<00><01>} | S)a<>
Return a (tight) bounding box of the figure in inches.
Artists that have ``artist.set_in_layout(False)`` are not included
in the bbox.
Parameters
----------
renderer : `.RendererBase` instance
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 each axes are
included in the tight bounding box.
Returns
-------
bbox : `.BboxBase`
containing the bounding box (in figure inches).
Nr)<01>bbox_extra_artistscSs<g|]4}t<00>|j<02>rt<00>|j<03>r|jdks4|jdkr|<01>qS)r)rxryrqrr)r(r<>r r r!r+M sz(Figure.get_tightbbox.<locals>.<listcomp>g<00>?)r~<00> get_tightbboxrqrrr<>rKr<>rBrGr{r<00>unionrrr|r<>)
rr<rZbbr<62>r*rjr<>Z_bboxr{r r r!r<> s.


   
zFigure.get_tightbboxcCs2|jdkr.tjdd|d<03>|_|j<00>dddd<05>dS)z7Initialize the layoutbox for use in constrained_layout.Nr<4E>)r<>r<>r<>gg<00>?)r<>r<>r<>Zconstrain_geometry)rr r r!<00>init_layoutbox[ s


zFigure.init_layoutboxc
Cs<>ddlm}t<02>d<03>|jdkr.t<05>d<05>dS|<00><07>\}}}}|}|<07><08>\}} ||}|| }|dkrpt <09>
|<07>}|||||||<05>dS)z}
Use ``layoutbox`` to determine pos positions within axes.
See also `.set_constrained_layout_pads`.
r)<01>do_constrained_layoutzExecuting constrainedlayoutNz<4E>Calling figure.constrained_layout, but figure not setup to do constrained layout. You either called GridSpec without the fig keyword, you are using plt.subplot, or you need to call figure or subplots with the constrained_layout=True kwarg.) Zmatplotlib._constrained_layoutr<74><00>_log<6F>debugr<67>r4rDr<>r<>r<>r<>)
rr<r<>r<>r<>r[r\Zfigrqrrr r r!r:c s 


 
z!Figure.execute_constrained_layout<75>H<EFBFBD>z<14>G<EFBFBD>?c
Csnddlm}m}m}||j<04>} d| kr0t<05>d<04>|dkr@||<00>}|||j| |||||d<05>}
|
rj|jf|
<EFBFBD>dS)an
Automatically adjust subplot parameters to give specified padding.
To exclude an artist on the axes from the bounding box calculation
that determines the subplot parameters (i.e. legend, or annotation),
then set `a.set_in_layout(False)` for that artist.
Parameters
----------
renderer : subclass of `~.backend_bases.RendererBase`, optional
Defaults to the renderer for the figure.
pad : float, optional
Padding between the figure edge and the edges of subplots,
as a fraction of the font size.
h_pad, w_pad : float, optional
Padding (height/width) between edges of adjacent subplots,
as a fraction of the font size. Defaults to *pad*.
rect : tuple (left, bottom, right, top), optional
A rectangle (left, bottom, right, top) in the normalized
figure coordinate that the whole subplots area (including
labels) will fit into. Default is (0, 0, 1, 1).
See Also
--------
.Figure.set_tight_layout
.pyplot.tight_layout
r1)r<><00>get_subplotspec_list<73>get_tight_layout_figureNzcThis figure includes Axes that are not compatible with tight_layout, so results might be incorrect.)rkr<>r<>r)r<>r<>r<>r<>rKr4rDr<>) rr<rkr<>r<>rr<>r<>r<>Zsubplotspec_listr<74>r r r!r<> s


zFigure.tight_layoutcCs<>|dkr|j}t<01>|<01><01><03>}x<>|D]<5D>}t<04>d|<02><06><00>|<02><07>}|<03><08>\}}}}}} |j <09>
<EFBFBD>}
xd|D]\} | j <09>
<EFBFBD>|
krb| <0B><07>}|<03><08>\}}} } }} |
dkr<>| |ks<>|
dkrb| |krb|j <0B> || <0B>qbWq"WdS)at
Align the ylabels of subplots in the same subplot column if label
alignment is being done automatically (i.e. the label position is
not manually set).
Alignment persists for draw events after this is called.
If a label is on the bottom, it is aligned with labels on axes that
also have their label on the bottom and that have the same
bottom-most subplot row. If the label is on the top,
it is aligned with labels on axes with the same top-most row.
Parameters
----------
axs : list of `~matplotlib.axes.Axes`
Optional list of (or ndarray) `~matplotlib.axes.Axes`
to align the xlabels.
Default is to align all axes on the figure.
See Also
--------
matplotlib.figure.Figure.align_ylabels
matplotlib.figure.Figure.align_labels
Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.
Examples
--------
Example with rotated xtick labels::
fig, axs = plt.subplots(1, 2)
for tick in axs[0].get_xticklabels():
tick.set_rotation(55)
axs[0].set_xlabel('XLabel 0')
axs[1].set_xlabel('XLabel 1')
fig.align_xlabels()
Nz Working on: %srXrZ) rKrx<00>asarray<61>ravelr<6C>r<>Z
get_xlabel<EFBFBD>get_subplotspec<65>get_rows_columnsr)<00>get_label_positionr<6E><00>join)r<00>axsr<73><00>ssr,r-<00>row0<77>row1<77>col0<6C>col1<6C>labpo<70>axcZrowc0Zrowc1Zcolcr r r!<00> align_xlabels<6C> s,


zFigure.align_xlabelscCs<>|dkr|j}t<01>|<01><01><03>}x<>|D]<5D>}t<04>d|<02><06><00>|<02><07>}|<03><08>\}}}}}} |j <09>
<EFBFBD>}
xl|D]d} | |krb| j <09>
<EFBFBD>|
krb| <0B><07>}|<03><08>\}}}}} } |
dkr<>| |ks<>|
dkrb| | krb|j <0B> || <0B>qbWq"WdS)aO
Align the ylabels of subplots in the same subplot column if label
alignment is being done automatically (i.e. the label position is
not manually set).
Alignment persists for draw events after this is called.
If a label is on the left, it is aligned with labels on axes that
also have their label on the left and that have the same
left-most subplot column. If the label is on the right,
it is aligned with labels on axes with the same right-most column.
Parameters
----------
axs : list of `~matplotlib.axes.Axes`
Optional list (or ndarray) of `~matplotlib.axes.Axes`
to align the ylabels.
Default is to align all axes on the figure.
See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_labels
Notes
-----
This assumes that ``axs`` are from the same `.GridSpec`, so that
their `.SubplotSpec` positions correspond to figure positions.
Examples
--------
Example with large yticks labels::
fig, axs = plt.subplots(2, 1)
axs[0].plot(np.arange(0, 1000, 50))
axs[0].set_ylabel('YLabel 0')
axs[1].set_ylabel('YLabel 1')
fig.align_ylabels()
Nz Working on: %srWrY) rKrxr<>r<>r<>r<>Z
get_ylabelr<EFBFBD>r<>r*r<>r<>r<>)rr<>r<>r<>r,r-r<>r<>r<>r<>r<>r<>Zcolc0Zcolc1r r r!<00> align_ylabels<6C> s +


zFigure.align_ylabelscCs|j|d<01>|j|d<01>dS)a<>
Align the xlabels and ylabels of subplots with the same subplots
row or column (respectively) if label alignment is being
done automatically (i.e. the label position is not manually set).
Alignment persists for draw events after this is called.
Parameters
----------
axs : list of `~matplotlib.axes.Axes`
Optional list (or ndarray) of `~matplotlib.axes.Axes`
to align the labels.
Default is to align all axes on the figure.
See Also
--------
matplotlib.figure.Figure.align_xlabels
matplotlib.figure.Figure.align_ylabels
)r<>N)r<>r<>)rr<>r r r!<00> align_labels9
s zFigure.align_labelscKs2|<03>dd<02>}tf|||d<03>|<03><02>}|j<02>|<05>|S)a^
Return a `.GridSpec` that has this figure as a parent. This allows
complex layout of axes in the figure.
Parameters
----------
nrows : int
Number of rows in grid.
ncols : int
Number or columns in grid.
Returns
-------
gridspec : `.GridSpec`
Other Parameters
----------------
**kwargs
Keyword arguments are passed to `.GridSpec`.
See Also
--------
matplotlib.pyplot.subplots
Examples
--------
Adding a subplot that spans two rows::
fig = plt.figure()
gs = fig.add_gridspec(2, 2)
ax1 = fig.add_subplot(gs[0, 0])
ax2 = fig.add_subplot(gs[1, 0])
# spans two rows:
ax3 = fig.add_subplot(gs[:, 1])
rN)r,r-r)r<>rr<>r<>)rr,r-r<>r<>r.r r r!<00> add_gridspecQ
s'  zFigure.add_gridspec) NNNNrpNNNN)T)T)F)r<>r<>rYN) rrNNNNNNF)NT)T)T)F)r1r1FFTNN)F)F)NF)NNT)NNNNNN)r1r<>Tr1rsrt)r%)N)N)Nr<4E>NNN)N)N)N)VrOrPrQrRrlror%r<>r<>r<><00>propertyrKr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rr<>rrrrrZdedent_interpdrrrr/rr<>r<>r
r;r?r<>rDr4Z_delete_parameterr<72>r<>rIrrJrOr_r`rirrr<>r{r|r~r<>r<>r:r<>r<>r<>r<>r<>rSr r )r'r!rh<00>s<>r
/
$

-  a

U
(




$ 
,

 9
M
;. + 

<

;

0
E
D
rhc Cs<>t|d<01>ot<01>|<00> }t<01>d<02>}t<01>d<03>}|rJ|jdd<05>\}}||}n|}tdd}t<01>|||f<02>}|td ||<00><02>}|td
||<00><02>}t<01>|||<03>}|S) a<>
Calculate the width and height for a figure with a specified aspect ratio.
While the height is taken from :rc:`figure.figsize`, the width is
adjusted to match the desired aspect ratio. Additionally, it is ensured
that the width is in the range [4., 16.] and the height is in the range
[2., 16.]. If necessary, the default height is adjusted to ensure this.
Parameters
----------
arg : scalar or 2d array
If a scalar, this defines the aspect ratio (i.e. the ratio height /
width).
In case of an array the aspect ratio is number of rows / number of
columns, so that the array could be fitted in the figure undistorted.
Returns
-------
width, height
The figure size in inches.
Notes
-----
If you want to create an axes within the figure, that still preserves the
aspect ratio, be sure to create it with equal width and height. See
examples below.
Thanks to Fernando Perez for this function.
Examples
--------
Make a figure twice as tall as it is wide::
w, h = figaspect(2.)
fig = Figure(figsize=(w, h))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax.imshow(A, **kwargs)
Make a figure with the proper aspect for an array::
A = rand(5,3)
w, h = figaspect(A)
fig = Figure(figsize=(w, h))
ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
ax.imshow(A, **kwargs)
r<>)g@g@)g0@g0@Nrtzfigure.figsizer1<00><00>?)r<>)r<>) r<>rxZisscalarr<72>r<>r<00>minr[r) <09>argZisarrayZ figsize_minZ figsize_max<61>nr<6E>ncZ arr_ratioZ
fig_heightZnewsizer r r!<00> figaspect~
s0


 r<>)rh)GrR<00>logging<6E>numbersrZnumpyrxrQrrrrrrPrZmatplotlib.artistr<74>Zmartistr r
Zmatplotlib.backend_basesr Zmatplotlib.cbookr4Zmatplotlib.colorbarrrroZmatplotlib.image<67>imager<65>Zmatplotlib.axesr r rZmatplotlib.blocking_inputrrZmatplotlib.gridspecrZmatplotlib.legendrDr@Zmatplotlib.patchesrZmatplotlib.projectionsrrZmatplotlib.textrrZmatplotlib.transformsrrrrZmatplotlib._layoutboxr<78>r<>r<00> getLoggerrOr<>ZinterpdrVr"ZStackr#rCrTrhr<>Zkwdocr r r r!<00><module> sd              
nQO