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

824 lines
48 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
U<>]<5D><><00>@sddlmZmZddlmZddlZddlZddlmZddl Z ddl
Z
ddl Z ddl Z ddlmZmZmZddlmZddlmZmZmZmZmZmZe<06>e<1C>Zd d
<EFBFBD>Zd d <0C>Zed d<0E>Z Gdd<10>de!<21>Z"Gdd<12>de!<21>Z#ddd<14>Z$e$Z%dd<16>Z&dd<18>Z'ej(j)e'e"<22>d<19>dS)<1B>)<02> OrderedDict<63>
namedtuple)<01>wrapsN)<01>Number<65>)<03>cbook<6F> docstring<6E>rcParams)<01>Path)<06>Bbox<6F>IdentityTransform<72> Transform<72>TransformedBbox<6F>TransformedPatchPath<74>TransformedPathcst<00><00><01>fdd<02><08>}d|_|S)a-
Decorator for Artist.draw method. Provides routines
that run before and after the draw call. The before and after functions
are useful for changing artist-dependent renderer attributes or making
other setup function calls, such as starting and flushing a mixed-mode
renderer.
c
shz6|<00><00>r|<01><01>|<00><02>dk r&|<01><03><00>||f|<02>|<03>S|<00><02>dk rR|<01>|<00><02><00>|<00><00>rb|<01><05>XdS)N)<06>get_rasterizedZstart_rasterizing<6E>get_agg_filterZ start_filterZ stop_filterZstop_rasterizing)<04>artist<73>renderer<65>args<67>kwargs)<01>draw<61><00>9/tmp/pip-install-i8dhxrtk/matplotlib/matplotlib/artist.py<70> draw_wrappers  z)allow_rasterization.<locals>.draw_wrapperT)r<00>_supports_rasterization)rrr)rr<00>allow_rasterizations
rcCs|jr||j_dS)N)<02>axes<65>stale)<02>self<6C>valrrr<00>_stale_axes_callback1sr!<00>_XYPairzx yc@s<>eZdZdZe<04>d<02>edd<04><00><01>ZdZe dd<07>Z
dd <09>Z d
d <0B>Z d d <0A>Z dd<0F>Zdd<11>Zdd<13>Zedd<15><00>Zejdd<15><00>Zedd<18><00>Zejdd<18><00>Zdd<1B>Zdd<1D>Zdd<1F>Zd d!<21>Zd"d#<23>Zd$d%<25>Zd&d'<27>Zd(d)<29>Zd*d+<2B>Zd,d-<2D>Zd.d/<2F>Zd0d1<64>Zd2d3<64>Z d4d5<64>Z!d6d7<64>Z"d8d9<64>Z#d:d;<3B>Z$d<d=<3D>Z%d>d?<3F>Z&d@dA<64>Z'dBdC<64>Z(dDdE<64>Z)dFdG<64>Z*dHdI<64>Z+d<>dKdL<64>Z,dMdN<64>Z-dOdP<64>Z.dQdR<64>Z/dSdT<64>Z0dUdV<64>Z1d<31>dWdX<64>Z2dYdZ<64>Z3d[d\<5C>Z4d]d^<5E>Z5d_d`<60>Z6dadb<64>Z7dcdd<64>Z8dedf<64>Z9dgdh<64>Z:didj<64>Z;dkdl<64>Z<dmdn<64>Z=dodp<64>Z>dqdr<64>Z?dsdt<64>Z@dudv<64>ZAdwdx<64>ZBdydz<64>ZCd{d|<7C>ZDd}d~<7E>ZEdd<7F><64>ZFd<46>d<EFBFBD><64>ZGd<47>d<EFBFBD><64>ZHd<48>d<EFBFBD><64>ZId<49>d<EFBFBD><64>ZJed<>d<EFBFBD><64><00>ZKd<4B>d<EFBFBD><64>ZLd<4C>d<EFBFBD><64>ZMd<4D>d<EFBFBD><64>ZNd<4E>d<EFBFBD>d<EFBFBD><64>ZOd<4F>d<EFBFBD><64>ZPd<50>d<EFBFBD><64>ZQed<>d<EFBFBD><64><00>ZReRjd<>d<EFBFBD><64><00>ZRdJS)<29><>Artistz<74>
Abstract base class for objects that render into a FigureCanvas.
Typically, all visible elements in a figure are subclasses of Artist.
z3.1cCsdS)Nr#r)rrrr<00>aname?sz Artist.anamer<00><><EFBFBD><EFBFBD><EFBFBD>)<01>colorcCs<>d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_
d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_i|_y
d|_Wntk
r<EFBFBD>YnXd|_d|_d|_d|_td|_td|_tgg<00>|_d|_ dS)NTF<54>rz path.sketchz path.effects)!<21>_stale<6C>stale_callback<63>_axes<65>figure<72>
_transform<EFBFBD> _transformSet<65>_visible<6C> _animated<65>_alpha<68>clipbox<6F> _clippath<74>_clipon<6F>_label<65>_picker<65> _contains<6E> _rasterized<65> _agg_filter<65>
_mouseover<EFBFBD>eventson<6F>_oid<69>_propobserversr<00>AttributeError<6F>_remove_method<6F>_url<72>_gid<69>_snapr <00>_sketch<63> _path_effectsr"<00> _sticky_edges<65>
_in_layout)rrrr<00>__init__JsB


 zArtist.__init__cCs|j<00><01>}d|d<|S)Nr))<02>__dict__<5F>copy)r<00>drrr<00> __getstate__os
zArtist.__getstate__cCsr|jdk rf|<00>|<00>d|_d}t|d<03>rN|jrN|jj<04>|<00>d|j_d|_d}|jrnd|_|snd|_ntd<05><01>dS)a<>
Remove the artist from the figure if possible.
The effect will not be visible until the figure is redrawn, e.g.,
with `.FigureCanvasBase.draw_idle`. Call `~.axes.Axes.relim` to
update the axes limits if desired.
Note: `~.axes.Axes.relim` will not see collections even if the
collection was added to the axes with *autolim* = True.
Note: there is no support for removing the artist's legend entry.
NFrTzcannot remove artist) r>r)<00>hasattrr<00>_mouseover_set<65>discardrr+<00>NotImplementedError)rZ_ax_flagrrr<00>removevs

z Artist.removecCs0|j}|dks|jdkrdS|j<01><02>p.|j<03><02>S)z6Return *True* if units are set on the *x* or *y* axes.NF)r<00>xaxis<69>
have_units<EFBFBD>yaxis)r<00>axrrrrQ<00>szArtist.have_unitscCs.t|dd<02>}|dks|jdkr"|S|j<01>|<01>S)z<>
Convert *x* using the unit type of the xaxis.
If the artist is not in contained in an Axes or if the xaxis does not
have units, *x* itself is returned.
rN)<03>getattrrP<00> convert_units)r<00>xrSrrr<00>convert_xunits<74>s zArtist.convert_xunitscCs.t|dd<02>}|dks|jdkr"|S|j<01>|<01>S)z<>
Convert *y* using the unit type of the yaxis.
If the artist is not in contained in an Axes or if the yaxis does not
have units, *y* itself is returned.
rN)rTrRrU)r<00>yrSrrr<00>convert_yunits<74>s zArtist.convert_yunitscCs|jS)z<The `~.axes.Axes` instance the artist resides in, or *None*.)r*)rrrrr<00>sz Artist.axescCsD|dk r$|jdk r$||jkr$td<01><01>||_|dk r@||k r@t|_|S)NzqCan not reset the axes. You are probably trying to re-use an artist in more than one Axes which is not supported)r*<00>
ValueErrorr!r))rZnew_axesrrrr<00>s
cCs|jS)z<>
Whether the artist is 'stale' and needs to be re-drawn for the output
to match the internal state of the artist.
)r()rrrrr<00>sz Artist.stalecCs0||_|<00><01>rdS|r,|jdk r,|<00>||<01>dS)N)r(<00> get_animatedr))rr rrrr<00>s
cCstddgddgg<02>S)a<>
Get the axes bounding box in display space.
The bounding box' width and height are nonnegative.
Subclasses should override for inclusion in the bounding box
"tight" calculation. Default is to return an empty bounding
box at 0, 0.
Be careful when using this function, the results will not update
if the artist window extent of the artist changes. The extent
can change due to any changes in the transform stack, such as
changing the axes limits, the figure size, or the canvas used
(as is done when saving a figure). This can lead to unexpected
behavior where interactive figures will look fine on the screen,
but will save incorrectly.
r)r )rrrrr<00>get_window_extent<6E>szArtist.get_window_extentcCsTd}|<00><00>rP|<00><01>}|dk r |}|<00><02>}|dk rP|dk rP|<03><03>}t<04>||<03><06><00>}|S)z<>
Return a bbox with the extents of the intersection of the clip_path
and clip_box for this artist, or None if both of these are
None, or ``get_clip_on`` is False.
N)<07> get_clip_on<6F> get_clip_box<6F> get_clip_path<74>get_fully_transformed_pathr <00> intersection<6F> get_extents)r<00>bbox<6F>clip_box<6F> clip_pathrrr<00>_get_clipping_extent_bbox<6F>sz Artist._get_clipping_extent_bboxcCsb|<00>|<01>}|<00><01>r^|<00><02>}|dk r.t<03>||<03>}|<00><05>}|dk r^|dk r^|<04><06>}t<03>||<04><07><00>}|S)a<>
Like `Artist.get_window_extent`, but includes any clipping.
Parameters
----------
renderer : `.RendererBase` instance
renderer that will be used to draw the figures (i.e.
``fig.canvas.get_renderer()``)
Returns
-------
bbox : `.BBox`
The enclosing bounding box (in figure pixel co-ordinates).
N)r\r]r^r rar_r`rb)rrrcrdrerrr<00> get_tightbbox s
 zArtist.get_tightbboxcCs"|j}||j|<|jd7_|S)a<>
Add a callback function that will be called whenever one of the
`.Artist`'s properties changes.
Parameters
----------
func : callable
The callback function. It must have the signature::
def func(artist: Artist) -> Any
where *artist* is the calling `.Artist`. Return values may exist
but are ignored.
Returns
-------
oid : int
The observer id associated with the callback. This id can be
used for removing the callback with `.remove_callback` later.
See Also
--------
remove_callback
r)r;r<)r<00>func<6E>oidrrr<00> add_callback's
zArtist.add_callbackcCs&y |j|=Wntk
r YnXdS)zu
Remove a callback based on its observer id.
See Also
--------
add_callback
N)r<<00>KeyError)rrirrr<00>remove_callbackEs zArtist.remove_callbackcCs$x|j<00><01>D]\}}||<00>q WdS)z<>
Call all of the registered callbacks.
This function is triggered internally when a property is changed.
See Also
--------
add_callback
remove_callback
N)r<<00>items)rrirhrrr<00>pchangedRs zArtist.pchangedcCs|jS)z<>
Return whether the Artist has an explicitly set transform.
This is *True* after `.set_transform` has been called.
)r-)rrrr<00>is_transform_set`szArtist.is_transform_setcCs||_d|_|<00><02>d|_dS)zk
Set the artist transform.
Parameters
----------
t : `.Transform`
TN)r,r-rnr)r<00>trrr<00> set_transformhszArtist.set_transformcCsB|jdkrt<01>|_n(t|jt<03>s<t|jd<02>r<|j<00>|j<06>|_|jS)z5Return the `.Transform` instance used by this artist.N<>_as_mpl_transform)r,r <00>
isinstancer rKrrr)rrrr<00> get_transformus 

  zArtist.get_transformcCsgS)z9Return a list of the child `.Artist`\s of this `.Artist`.r)rrrr<00> get_children~szArtist.get_childrencCs.|jdk r|<00>||<01>St<01>d|jj<04>difS)a4Test whether the artist contains the mouse event.
Parameters
----------
mouseevent : `matplotlib.backend_bases.MouseEvent`
Returns
-------
contains : bool
Whether any values are within the radius.
details : dict
An artist-specific dictionary of details of the event context,
such as which points are contained in the pick radius. See the
individual Artist subclasses for details.
See Also
--------
set_contains, get_contains
Nz%r needs 'contains' methodF)r6<00>_log<6F>warning<6E> __class__<5F>__name__)r<00>
mouseeventrrr<00>contains<6E>s
 zArtist.containscCst|<01>std<01><01>||_dS)a
Define a custom contains test for the artist.
The provided callable replaces the default `.contains` method
of the artist.
Parameters
----------
picker : callable
A custom picker function to evaluate if an event is within the
artist. The function must have the signature::
def contains(artist: Artist, event: MouseEvent) -> bool, dict
that returns:
- a bool indicating if the event is within the artist
- a dict of additional information. The dict should at least
return the same information as the default ``contains()``
implementation of the respective artist, but may provide
additional information.
zpicker is not a callableN)<03>callable<6C> TypeErrorr6)r<00>pickerrrr<00> set_contains<6E>szArtist.set_containscCs|jS)z<>
Return the custom contains function of the artist if set, or *None*.
See Also
--------
set_contains
)r6)rrrr<00> get_contains<6E>szArtist.get_containscCs|jdk o|jdk S)z<>
Return whether the artist is pickable.
See Also
--------
set_picker, get_picker, pick
N)r+r5)rrrr<00>pickable<6C>szArtist.pickablecCs<>|<00><00>rN|<00><01>}t|<02>r(|||<01>\}}n|<00>|<01>\}}|rN|jjj||f|<04>xB|<00><07>D]6}t|dd<02>}|j dks<>|dks<>|j |krX|<05>
|<01>qXWdS)z<>
Process a pick event.
Each child artist will fire a pick event if *mouseevent* is over
the artist and the artist has picker set.
See Also
--------
set_picker, get_picker, pickable
rN) r<><00>
get_pickerr|r{r+ZcanvasZ
pick_eventrurTZinaxes<65>pick)rrzr~Zinside<64>prop<6F>arSrrrr<><00>s  
z Artist.pickcCs
||_dS)a=
Define the picking behavior of the artist.
Parameters
----------
picker : None or bool or float or callable
This can be one of the following:
- *None*: Picking is disabled for this artist (default).
- A boolean: If *True* then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist.
- A float: If picker is a number it is interpreted as an
epsilon tolerance in points and the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, e.g., the indices of the data within
epsilon of the pick event
- A function: If picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event::
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return *hit=True* and props is a dictionary of
properties you want added to the PickEvent attributes.
N)r5)rr~rrr<00>
set_picker<EFBFBD>s"zArtist.set_pickercCs|jS)z<>
Return the picking behavior of the artist.
The possible values are described in `.set_picker`.
See Also
--------
set_picker, pickable, pick
)r5)rrrrr<>s
zArtist.get_pickercCs|jS)zReturn the url.)r?)rrrr<00>get_urlszArtist.get_urlcCs
||_dS)zf
Set the url for the artist.
Parameters
----------
url : str
N)r?)r<00>urlrrr<00>set_url!szArtist.set_urlcCs|jS)zReturn the group id.)r@)rrrr<00>get_gid+szArtist.get_gidcCs
||_dS)zm
Set the (group) id for the artist.
Parameters
----------
gid : str
N)r@)r<00>gidrrr<00>set_gid/szArtist.set_gidcCstdr|jSdSdS)zQ
Returns the snap setting.
See `.set_snap` for details.
z path.snapFN)r rA)rrrr<00>get_snap9szArtist.get_snapcCs||_d|_dS)a<>
Set the snapping behavior.
Snapping aligns positions with the pixel grid, which results in
clearer images. For example, if a black line of 1px width was
defined at a position in between two pixels, the resulting image
would contain the interpolated value of that line in the pixel grid,
which would be a grey value on both adjacent pixel positions. In
contrast, snapping will move the line to the nearest integer pixel
value, so that the resulting image will really contain a 1px wide
black line.
Snapping is currently only supported by the Agg and MacOSX backends.
Parameters
----------
snap : bool or None
Possible values:
- *True*: Snap vertices to the nearest pixel center.
- *False*: Do not modify vertex positions.
- *None*: (auto) If the path contains only rectilinear line
segments, round to the nearest pixel center.
TN)rAr)rZsnaprrr<00>set_snapDszArtist.set_snapcCs|jS)a
Returns the sketch parameters for the artist.
Returns
-------
sketch_params : tuple or None
A 3-tuple with the following elements:
- *scale*: The amplitude of the wiggle perpendicular to the
source line.
- *length*: The length of the wiggle along the line.
- *randomness*: The scale factor by which the length is
shrunken or expanded.
Returns *None* if no sketch parameters were set.
)rB)rrrr<00>get_sketch_params`szArtist.get_sketch_paramsNcCs.|dkrd|_n||pd|pdf|_d|_dS)a~
Sets the sketch parameters.
Parameters
----------
scale : float, optional
The amplitude of the wiggle perpendicular to the source
line, in pixels. If scale is `None`, or not provided, no
sketch filter will be provided.
length : float, optional
The length of the wiggle along the line, in pixels
(default 128.0)
randomness : float, optional
The scale factor by which the length is shrunken or
expanded (default 16.0)
.. ACCEPTS: (scale: float, length: float, randomness: float)
Ng`@g0@T)rBr)rZscale<6C>lengthZ
randomnessrrr<00>set_sketch_paramstszArtist.set_sketch_paramscCs||_d|_dS)zrSet the path effects.
Parameters
----------
path_effects : `.AbstractPathEffect`
TN)rCr)rZ path_effectsrrr<00>set_path_effects<74>szArtist.set_path_effectscCs|jS)N)rC)rrrr<00>get_path_effects<74>szArtist.get_path_effectscCs|jS)z4Return the `.Figure` instance the artist belongs to.)r+)rrrr<00>
get_figure<EFBFBD>szArtist.get_figurecCsH|j|krdS|jdk r td<02><01>||_|jr>|j|k r>|<00><02>d|_dS)z<>
Set the `.Figure` instance the artist belongs to.
Parameters
----------
fig : `.Figure`
Nz1Can not put single artist in more than one figureT)r+<00> RuntimeErrorrnr)rZfigrrr<00>
set_figure<EFBFBD>s

zArtist.set_figurecCs||_|<00><01>d|_dS)zq
Set the artist's clip `.Bbox`.
Parameters
----------
clipbox : `.Bbox`
TN)r1rnr)rr1rrr<00> set_clip_box<6F>szArtist.set_clip_boxcCs<>ddlm}m}d}|dkrrt||<04>rFtt<05><06>|<01><07><00>|_d|_ d}n,t||<03>r`t
|<01>|_ d}nt|t <0B>rr|\}}|dkr<>d|_ d}nFt|t <0C>r<>t ||<02>|_ d}n*t|t
<EFBFBD>r<>||_ d}nt|t <0A>r<>||_ d}|s<>td<06>t|<01>jt|<02>j<11><02><01>|<00><12>d|_dS)a<>
Set the artist's clip path, which may be:
- a :class:`~matplotlib.patches.Patch` (or subclass) instance; or
- a :class:`~matplotlib.path.Path` instance, in which case a
:class:`~matplotlib.transforms.Transform` instance, which will be
applied to the path before using it for clipping, must be provided;
or
- ``None``, to remove a previously set clipping path.
For efficiency, if the path happens to be an axis-aligned rectangle,
this method will set the clipping box to the corresponding rectangle
and set the clipping path to ``None``.
ACCEPTS: [(`~matplotlib.path.Path`, `.Transform`) | `.Patch` | None]
r)<02>Patch<63> RectangleFNTz5Invalid arguments to set_clip_path, of type {} and {})Zmatplotlib.patchesr<73>r<>rsrr <00>unitrtr1r2r<00>tupler
rr}<00>format<61>typeryrnr)r<00>pathZ transformr<6D>r<><00>successrrr<00> set_clip_path<74>s>
 



 

zArtist.set_clip_pathcCs|jS)zb
Return the alpha value used for blending - not supported on all
backends
)r0)rrrr<00> get_alpha<68>szArtist.get_alphacCs|jS)zReturn the visibility.)r.)rrrr<00> get_visibleszArtist.get_visiblecCs|jS)zReturn the animated state.)r/)rrrrr[szArtist.get_animatedcCs|jS)a
Return boolean flag, ``True`` if artist is included in layout
calculations.
E.g. :doc:`/tutorials/intermediate/constrainedlayout_guide`,
`.Figure.tight_layout()`, and
``fig.savefig(fname, bbox_inches='tight')``.
)rE)rrrr<00> get_in_layout
s zArtist.get_in_layoutcCs|jS)z(Return whether the artist uses clipping.)r3)rrrrr]szArtist.get_clip_oncCs|jS)zReturn the clipbox.)r1)rrrrr^szArtist.get_clip_boxcCs|jS)zReturn the clip path.)r2)rrrrr_szArtist.get_clip_pathcCs|jdk r|j<00><01>SdS)z<>
Return the clip path with the non-affine part of its
transformation applied, and the remaining affine part of its
transformation.
N)NN)r2Zget_transformed_path_and_affine)rrrr<00>$get_transformed_clip_path_and_affine!s

z+Artist.get_transformed_clip_path_and_affinecCs||_|<00><01>d|_dS)z<>
Set whether the artist uses clipping.
When False artists will be visible out side of the axes which
can lead to unexpected results.
Parameters
----------
b : bool
TN)r3rnr)r<00>brrr<00> set_clip_on+s zArtist.set_clip_oncCsB|jr*|jdk r|<01>|j<01>|<01>|j<04>n|<01>d<01>|<01>d<01>dS)z Set the clip properly for the gcN)r3r1Zset_clip_rectangler<65>r2)r<00>gcrrr<00> _set_gc_clip<s 
 
zArtist._set_gc_clipcCs|jS)z.Return whether the artist is to be rasterized.)r7)rrrrrFszArtist.get_rasterizedcCs(|rt|jd<01>st<02>d|<00>||_dS)z<>
Force rasterized (bitmap) drawing in vector backend output.
Defaults to None, which implies the backend's default behavior.
Parameters
----------
rasterized : bool or None
rz%Rasterization of '%s' will be ignoredN)rKrrZ_warn_externalr7)rZ
rasterizedrrr<00>set_rasterizedJs

zArtist.set_rasterizedcCs|jS)z1Return filter function to be used for agg filter.)r8)rrrrrZszArtist.get_agg_filtercCs||_d|_dS)apSet the agg filter.
Parameters
----------
filter_func : callable
A filter function, which takes a (m, n, 3) float array and a dpi
value, and returns a (m, n, 3) array.
.. ACCEPTS: a filter function, which takes a (m, n, 3) float array
and a dpi value, and returns a (m, n, 3) array
TN)r8r)rZ filter_funcrrr<00>set_agg_filter^s zArtist.set_agg_filtercOs|<00><00>s dSd|_dS)aV
Draw the Artist using the given renderer.
This method will be overridden in the Artist subclasses. Typically,
it is implemented to not have any effect if the Artist is not visible
(`.Artist.get_visible` is *False*).
Parameters
----------
renderer : `.RendererBase` subclass.
NF)r<>r)rrrrrrrrms z Artist.drawcCs||_|<00><01>d|_dS)z<>
Set the alpha value used for blending - not supported on all backends.
Parameters
----------
alpha : float
TN)r0rnr)r<00>alpharrr<00> set_alpha}szArtist.set_alphacCs||_|<00><01>d|_dS)zf
Set the artist's visibility.
Parameters
----------
b : bool
TN)r.rnr)rr<>rrr<00> set_visible<6C>szArtist.set_visiblecCs|j|kr||_|<00><01>dS)zk
Set the artist's animation state.
Parameters
----------
b : bool
N)r/rn)rr<>rrr<00> set_animated<65>s
zArtist.set_animatedcCs
||_dS)a)
Set if artist is to be included in layout calculations,
E.g. :doc:`/tutorials/intermediate/constrainedlayout_guide`,
`.Figure.tight_layout()`, and
``fig.savefig(fname, bbox_inches='tight')``.
Parameters
----------
in_layout : bool
N)rE)rZ in_layoutrrr<00> set_in_layout<75>s zArtist.set_in_layoutc sTdd<02><00>tj<01>dd<04><02><00><00>fdd<06>|<01><02>D<00>}WdQRXt|<02>rP<72><01><04>d<08>_|S) zN
Update this artist's properties from the dictionary *props*.
cSsV|<01><00>}|dkrt|||<02>St|d|d<03>}t|<03>sJtd<04>t|<00>j|<01><02><01>||<02>SdS)a<>Sorting out how to update property (setter or setattr).
Parameters
----------
k : str
The name of property to update
v : obj
The value to assign to the property
Returns
-------
ret : obj or None
If using a `set_*` method return it's return, else None.
>r<00>set_Nz {!r} object has no property {!r})<08>lower<65>setattrrTr|r=r<>r<>ry)r<00>k<>vrhrrr<00>_update_property<74>s z'Artist.update.<locals>._update_propertyF)r:csg|]\}}<02><00>||<02><03>qSrr)<03>.0r<EFBFBD>r<>)r<>rrr<00>
<listcomp><3E>sz!Artist.update.<locals>.<listcomp>NT)rZ _setattr_cmrm<00>lenrnr)r<00>props<70>retr)r<>rr<00>update<74>s"z Artist.updatecCs|jS)z4Return the label used for this artist in the legend.)r4)rrrr<00> get_label<65>szArtist.get_labelcCs,|dk rt|<01>|_nd|_|<00><02>d|_dS)z<>
Set a label that will be displayed in the legend.
Parameters
----------
s : object
*s* will be converted to a string by calling `str`.
NT)<04>strr4rnr)r<00>srrr<00> set_label<65>s
 zArtist.set_labelcCs|jS)zReturn the artist's zorder.)<01>zorder)rrrr<00>
get_zorder<EFBFBD>szArtist.get_zordercCs(|dkr|jj}||_|<00><02>d|_dS)z<>
Set the zorder for the artist. Artists with lower zorder
values are drawn first.
Parameters
----------
level : float
NT)rxr<>rnr)r<00>levelrrr<00>
set_zorder<EFBFBD>s
zArtist.set_zordercCs|jS)a<>
``x`` and ``y`` sticky edge lists for autoscaling.
When performing autoscaling, if a data limit coincides with a value in
the corresponding sticky_edges list, then no margin will be added--the
view limit "sticks" to the edge. A typical use case is histograms,
where one usually expects no margin on the bottom edge (0) of the
histogram.
This attribute cannot be assigned to; however, the ``x`` and ``y``
lists can be modified in place as needed.
Examples
--------
>>> artist.sticky_edges.x[:] = (xmin, xmax)
>>> artist.sticky_edges.y[:] = (ymin, ymax)
)rD)rrrr<00> sticky_edges<65>szArtist.sticky_edgescCs<>|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j|_|j |_ |j
j dd<01>|j
j dd<01><|j
j dd<01>|j
j dd<01><|<00> <0A>d|_dS)z'Copy properties from *other* to *self*.NT)r,r-r.r0r1r3r2r4rBrCr<>rVrXrnr)r<00>otherrrr<00> update_fromszArtist.update_fromcCs t|<00><01><01>S)z8Return a dictionary of all the properties of the artist.)<02>ArtistInspector<6F>
properties)rrrrr<>$szArtist.propertiesc s@t<00>|tt<03><00>di<00><03>}tt|<01><06>d<02>fdd<04>d<05><03>}<02><00>|<02>S)z:A property batch setter. Pass *kwargs* to set properties.Z
_alias_mapTcs<00>j<00>|dd<01>|dfS)Nr)<02> _prop_order<65>get)rV)rrr<00><lambda>.<00>zArtist.set.<locals>.<lambda>)<02>reverse<73>key)rZnormalize_kwargsrTr<>r<00>sortedrmr<>)rrr<>r)rr<00>set(s 
z
Artist.setTcs<><00>dkrdd<03><00>n8t<00>t<01>r4t<02>t<03>r4<72>fdd<03><08>nt<04><00>rB<72><00>ntd<05><01>t<06>fdd<07>|<00><07>D<00>g<00>}|r|<7C>|<00>r||<03>|<00>|S)a
Find artist objects.
Recursively find all `.Artist` instances contained in the artist.
Parameters
----------
match
A filter criterion for the matches. This can be
- *None*: Return all objects contained in artist.
- A function with signature ``def match(artist: Artist) -> bool``.
The result will only contain artists for which the function
returns *True*.
- A class instance: e.g., `.Line2D`. The result will only contain
artists of this class or its subclasses (``isinstance`` check).
include_self : bool
Include *self* in the list to be checked for a match.
Returns
-------
artists : list of `.Artist`
NcSsdS)NTr)rVrrr<00> matchfuncLsz!Artist.findobj.<locals>.matchfunccs
t|<00><00>S)N)rs)rV)<01>matchrrr<>OszFmatch must be None, a matplotlib.artist.Artist subclass, or a callablecsg|]}|<01><00><00><01>qSr)<01>findobj)r<><00>c)r<>rrr<>Wsz"Artist.findobj.<locals>.<listcomp>) rsr<><00>
issubclassr#r|rZ<00>sumru<00>append)rr<>Z include_selfZartistsr)r<>r<>rr<>1s
 
zArtist.findobjcCsdS)a<>
Return the cursor data for a given event.
.. note::
This method is intended to be overridden by artist subclasses.
As an end-user of Matplotlib you will most likely not call this
method yourself.
Cursor data can be used by Artists to provide additional context
information for a given event. The default implementation just returns
*None*.
Subclasses can override the method and return arbitrary data. However,
when doing so, they must ensure that `.format_cursor_data` can convert
the data to a string representation.
The only current use case is displaying the z-value of an `.AxesImage`
in the status bar of a plot window, while moving the mouse.
Parameters
----------
event : `matplotlib.backend_bases.MouseEvent`
See Also
--------
format_cursor_data
Nr)r<00>eventrrr<00>get_cursor_data\szArtist.get_cursor_datac CsLy |dWnttfk
r*|g}YnXd<02>dd<04>|D<00><01>}d|dS)a<>
Return a string representation of *data*.
.. note::
This method is intended to be overridden by artist subclasses.
As an end-user of Matplotlib you will most likely not call this
method yourself.
The default implementation converts ints and floats and arrays of ints
and floats into a comma-separated string enclosed in square brackets.
See Also
--------
get_cursor_data
rz, css"|]}t|t<01>rd<00>|<01>VqdS)z{:0.3g}N)rsrr<>)r<><00>itemrrr<00> <genexpr><3E>sz,Artist.format_cursor_data.<locals>.<genexpr><3E>[<5B>])r}<00>
IndexError<EFBFBD>join)r<00>dataZdata_strrrr<00>format_cursor_data{s   zArtist.format_cursor_datacCs|jS)N)r9)rrrr<00> mouseover<65>szArtist.mouseovercCs:t|<01>}||_|j}|r6|r*|j<03>|<00>n |j<03>|<00>dS)N)<06>boolr9rrL<00>addrM)rr rSrrrr<><00>s)NNN)N)NT)Sry<00>
__module__<EFBFBD> __qualname__<5F>__doc__r<00>
deprecated<EFBFBD>propertyr$r<><00>dictr<74>rFrJrOrQrWrYr<00>setterrr\rfrgrjrlrnrorqrtrur{rr<>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<>rr<>rr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rrrrr#9s<>
%-       

#$ 

 


6 

    ' 
+ r#c@s<>eZdZdZdd<03>Zdd<05>Ze<06>d<06>Zdd<08>Z d d
<EFBFBD>Z
d d <0C>Z d d<0E>Z dd<10>Z dd<12>Zdd<14>Zd dd<18>Zd!dd<1B>Zdd<1D>Zdd<1F>ZdS)"r<>z<>
A helper class to inspect an `~matplotlib.artist.Artist` and return
information about its settable properties and their current values.
cCsXt|t<01>s,t<02>|<01>r,t|<01>}t|<01>r,|d}||_t|t<07>sDt|<01>}||_|<00> <09>|_
dS)a
Initialize the artist inspector with an `Artist` or an iterable of
`Artist`\s. If an iterable is used, we assume it is a homogeneous
sequence (all `Artists` are of the same type) and it is your
responsibility to make sure this is so.
rN) rsr#<00>np<6E>iterable<6C>listr<74><00>oorigr<67><00>o<> get_aliases<65>aliasd)rr<>rrrrF<00>s


zArtistInspector.__init__cs<><00>fdd<02>t<00>j<01>D<00>}i}xn|D]f}t<02>j|<03>}<04><00>|<04>s>q"t<04>d<03>|dd<05><00>t<07>|<04><01><02> d<06>}|<02>
|dd<04>t <0B><00><02> |dd<04><00>q"W|S)a

Get a dict mapping property fullnames to sets of aliases for each alias
in the :class:`~matplotlib.artist.ArtistInspector`.
e.g., for lines::
{'markerfacecolor': {'mfc'},
'linewidth' : {'lw'},
}
cs*g|]"}|<01>d<00>rtt<02>j|<01><02>r|<01>qS))r<><00>get_)<04>
startswithr|rTr<>)r<><00>name)rrrr<><00>s
z/ArtistInspector.get_aliases.<locals>.<listcomp>z`({}.*)`N<>r) <0A>dirr<72>rT<00>is_alias<61>re<72>searchr<68><00>inspect<63>getdoc<6F>group<75>
setdefaultr<EFBFBD>r<>)r<00>names<65>aliasesr<73>rhZpropnamer)rrr<><00>s 
 
(zArtistInspector.get_aliasesz6\n\s*(?:\.\.\s+)?ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))cCs<>d|}t|j|<02>s&td|j|f<00><01>t|j|<02>}t<04>|<03>}|dkrHdS|<04>d<05>rVdS|j<07>|<04>}|dk r~t <09>
dd|<05> d<08><01>S|j j d}t <09>d <09>|<06>|<04>}|r<>|<05> d<08>SdS)
a/
Get the legal arguments for the setter associated with *attr*.
This is done by querying the docstring of the setter for a line that
begins with "ACCEPTS:" or ".. ACCEPTS:", and then by looking for a
numpydoc-style documentation for the setter's first argument.
zset_%sz%s has no function %sN<73>unknownz
Alias for z
*<2A> rz(?m)^ *\*?{} : (.+))rKr<>r=rTr<>r<>r<><00>_get_valid_values_regexr<78>r<><00>subr<62><00>__code__<5F> co_varnamesr<73>)r<00>attrr<72>rhrr<><00>
param_namerrr<00>get_valid_values<65>s"   

  
z ArtistInspector.get_valid_valuescCs<>g}x<>t|j<01>D]<5D>}|<02>d<01>s qt|j|<02>}t|<03>s6qtt<06>|<03>j<08>}|dks|<00> |<03>rZq|jj
d|jj }x.|j<01> <0C>D] }||j krz|j
d|j }PqzW|<00>|<05>}|<01>|dd<05>|d|f<02>qW|S)z<>
Get the attribute strings and a full path to where the setter
is defined for all setters in an object.
r<><00><00>.r<>N)r<>r<>r<>rTr|r<>r<><00>getfullargspecrr<>r<>ry<00>mrorG<00> _replace_pathr<68>)rZsettersr<73>rh<00>nargs<67> source_class<73>clsrrr<00>_get_setters_and_targets<74>s$
 

"z(ArtistInspector._get_setters_and_targetscCs0ddd<02>}x |<02><00>D]\}}|<01>||<04>}qW|S)z<>
Changes the full path to the public API path that is used
in sphinx. This is needed for links to work.
ZAxes)z_base._AxesBasez
_axes.Axes)rm<00>replace)rrZ replace_dictr<74><00>valuerrrrs
zArtistInspector._replace_pathcCsdd<02>|<00><00>D<00>S)z<>
Get the attribute strings with setters for object. e.g., for a line,
return ``['markerfacecolor', 'linewidth', ....]``.
cSsg|] \}}|<01>qSrr)r<>r<><00>targetrrrr<>%sz/ArtistInspector.get_setters.<locals>.<listcomp>)r)rrrr<00> get_setters szArtistInspector.get_setterscCs t<00>|<01>}|dkrdS|<02>d<03>S)z@Return whether method object *o* is an alias for another method.NFz
Alias for )r<>r<>r<>)rr<>Zdsrrrr<>'s
zArtistInspector.is_aliascCs*d<01>dd<03>t|j<02>|g<00><02>D<00><01>}||S)a
Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME'.
e.g., for the line markerfacecolor property, which has an
alias, return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'.
r'css|]}d|VqdS)z or %sNr)r<>rVrrrr<>6sz/ArtistInspector.aliased_name.<locals>.<genexpr>)r<>r<>r<>r<>)rr<>rrrr<00> aliased_name.s"zArtistInspector.aliased_namecCs0d<01>dd<03>t|j<02>|g<00><02>D<00><01>}d|||fS)a3
Return 'PROPNAME or alias' if *s* has an alias, else return 'PROPNAME',
formatted for ReST.
e.g., for the line markerfacecolor property, which has an
alias, return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'.
r'css|]}d|VqdS)z or %sNr)r<>rVrrrr<>Bsz4ArtistInspector.aliased_name_rest.<locals>.<genexpr>z:meth:`%s <%s>`%s)r<>r<>r<>r<>)rr<>rrrrr<00>aliased_name_rest9s "z!ArtistInspector.aliased_name_restNr
c Cs<>|rd|}nd}|dk r2|<00>|<01>}d|||fS|<00><01>}|<05><02>g}x8|D]0\}}|<00>|<01>}|<00>|<01>}|<06>d|||f<00>qLW|S)a
If *prop* is *None*, return a list of strings of all settable
properties and their valid values.
If *prop* is not *None*, it is a valid property name and that
property will be returned as a string of property : valid
values.
rr'Nz%s%s: %s)r r<00>sortrr<>) rr<><00> leadingspace<63>pad<61>accepts<74>attrs<72>linesr<73>r<>rrr<00>pprint_settersEs 



zArtistInspector.pprint_settersr<73>c s<>|rd|<00>nd<02>|dk r2<72><03>|<01>}d<04>||fSt<01><03><02><00>}<04>fdd<06>|D<00>}<05>fdd<06>|D<00>}tdd <09>|D<00><01><01>td
d <09>|D<00><01><01><01>d d <0C>d d <0C>}d<02>d <00>dd|<06>d d<0F><04><00>d d<10><04><01>|f<07><00><01>fdd<06>t||<03>D<00>|df<02>S)a/
If *prop* is *None*, return a list of strings of all settable
properties and their valid values. Format the output for ReST
If *prop* is not *None*, it is a valid property name and that
property will be returned as a string of property : valid
values.
rr'Nz%s%s: %scsg|]\}}<02><00>||<02><02>qSr)r)r<>r<>r)rrrr<>tsz7ArtistInspector.pprint_setters_rest.<locals>.<listcomp>csg|]\}}<02><00>|<01><01>qSr)r )r<>r<>r)rrrr<>vscss|]}t|<01>VqdS)N)r<>)r<><00>nrrrr<>xsz6ArtistInspector.pprint_setters_rest.<locals>.<genexpr>css|]}t|<01>VqdS)N)r<>)r<>r<>rrrr<>ysz <20>=z
.. table::z :class: property-tableZProperty<74> Descriptioncs0g|](\}}<02>d|<01><00><00>d|<02><00><01><00>qS)z )<01>ljust)r<>r r<>)<03>col0_len<65>col1_lenrrrr<><00>s)r r<>r<00>maxr#<00>zip)rr<>rrrr<>Ztable_formatstrr)r$r%rrr<00>pprint_setters_restas0 

 
 z#ArtistInspector.pprint_setters_restc
s<>|j<00><00>fdd<02>t<01><00>D<00>}|<01><02>i}xr|D]j}t<03>|<03>}|<00>|<04>rHq.y(t<05><06><00>t<05>d<03>|<04>}WdQRXWntk
r<EFBFBD>w.Yq.X|||dd<04><q.W|S)z3Return a dictionary mapping property name -> value.cs(g|] }|<01>d<00>rtt<02>|<01><02>r|<01>qS)r<>)r<>r|rT)r<>r<>)r<>rrr<><00>sz.ArtistInspector.properties.<locals>.<listcomp><3E>ignoreNr<4E>) r<>r<>rrTr<><00>warnings<67>catch_warnings<67> simplefilter<65> Exception)rZgettersrIr<>rhr r)r<>rr<><00>s 




zArtistInspector.propertiescCs<>g}x<>t|<00><01><00><02><00>D]<5D>\}}t|dd<02>dkrPt|<03>dkrPt|dd<03><00>d}nt|<03>}|<04>dd<07>}t|<04>dkr<>|dd<08>d}|<00>|<02>}|<01>d ||f<00>qW|S)
z8Return the getters and actual values as list of strings.<2E>shaper<00>Nz...<2E>
r<00>2z %s = %s) r<>r<>rmrTr<>r<>rrr<>)rrr<>r r<>rrr<00>pprint_getters<72>s  
zArtistInspector.pprint_getters)Nr
)Nr<4E>)ryr<>r<>r<>rFr<>r<><00>compilerr rrrr<>rrrr(r<>r2rrrrr<><00>s $  

*r<>cCs>|dkr*t|<00>}|<02><01>}td<02>|<03><01>dSt|d|<00>}|<04>S)aI
Return the value of object's property. *property* is an optional string
for the property you want to return
Example usage::
getp(obj) # get all the object properties
getp(obj, 'linestyle') # get the linestyle property
*obj* is a :class:`Artist` instance, e.g.,
:class:`~matplotlib.lines.Line2D` or an instance of a
:class:`~matplotlib.axes.Axes` or :class:`matplotlib.text.Text`.
If the *property* is 'somename', this function returns
obj.get_somename()
:func:`getp` can be used to query all the gettable properties with
``getp(obj)``. Many properties have aliases for shorter typing, e.g.
'lw' is an alias for 'linewidth'. In the output, aliases and full
property names will be listed as:
property or alias = value
e.g.:
linewidth or lw = 2
Nr0r<>)r<>r2<00>printr<74>rT)<05>objr<6A><00>inspr<70>rhrrr<00>getp<74>sr7cst|t<01>r|g}ntt<03>|<00><01>}|s(dSt|d<00>}i}d<03>krN<72><01>d<03>|d<<00>s<>t|<01>dkr<>|r|t|j |dd<05>f|<05>ntd<06>
|<04> <09><00>f|<05>dSt|<01>dr<>t d<07><01>t dd <09>t |ddd<04>|d
dd<04><00>D<00><01><01><00>fd d <0C>|D<00><01>fd d <0C>|D<00>}tt<03>|<06><01>S)a
Set a property on an artist object.
matplotlib supports the use of :func:`setp` ("set property") and
:func:`getp` to set and get object properties, as well as to do
introspection on the object. For example, to set the linestyle of a
line to be dashed, you can do::
>>> line, = plot([1,2,3])
>>> setp(line, linestyle='--')
If you want to know the valid types of arguments, you can provide
the name of the property you want to set without a value::
>>> setp(line, 'linestyle')
linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
If you want to see all the properties that can be set, and their
possible values, you can do::
>>> setp(line)
... long output listing omitted
You may specify another output file to `setp` if `sys.stdout` is not
acceptable for some reason using the `file` keyword-only argument::
>>> with fopen('output.log') as f:
>>> setp(line, file=f)
:func:`setp` operates on a single instance or a iterable of
instances. If you are in query mode introspecting the possible
values, only the first instance in the sequence is used. When
actually setting values, all the instances will be set. e.g.,
suppose you have a list of two lines, the following will make both
lines thicker and red::
>>> x = arange(0,1.0,0.01)
>>> y1 = sin(2*pi*x)
>>> y2 = sin(4*pi*x)
>>> lines = plot(x, y1, x, y2)
>>> setp(lines, linewidth=2, color='r')
:func:`setp` works with the MATLAB style string/value pairs or
with python kwargs. For example, the following are equivalent::
>>> setp(lines, 'linewidth', 2, 'color', 'r') # MATLAB style
>>> setp(lines, linewidth=2, color='r') # python style
Nr<00>filer
)r<>r0z(The set args must be string, value pairscss|]\}}||fVqdS)Nr)r<>r<>r<>rrrr<>%szsetp.<locals>.<genexpr>rcsg|]}|<01><00><00><01>qSr)r<>)r<>r<>)<01>funcvalsrrr<>&szsetp.<locals>.<listcomp>csg|]}|jf<00><00><01>qSr)r<>)r<>r<>)rrrr<>&s)rsr#r<>r<00>flattenr<6E><00>popr<70>r4rr<>rZrr')r5rr<00>objsr6Z printArgsr<73>r)r9rr<00>setp<74>s&2
  ,$r=cCs>tjd}|r$d<02>t|<00>jdd<04><01>Sd<02>t|<00>jdd<04><01>SdS)a<>
Inspect an `~matplotlib.artist.Artist` class (using `.ArtistInspector`) and
return information about its settable properties and their current values.
Parameters
----------
artist : `~matplotlib.artist.Artist` or an iterable of `Artist`\s
Returns
-------
string
The settable properties of *artist*, as plain text if
:rc:`docstring.hardcopy` is False and as a rst table (intended for
use in Sphinx) if it is True.
zdocstring.hardcopyr0r<>)rr
N)<06>
matplotlibr r<>r<>r(r)rZhardcopyrrr<00>kwdoc*s 
 
 r?)r#)N)*<2A> collectionsrr<00> functoolsrr<><00>logging<6E>numbersrr<>r*Znumpyr<79>r>r'rrr r<>r
Z
transformsr r r rrr<00> getLoggerryrvrr!r"<00>objectr#r<>r7r<>r=r?Zinterpdr<64>rrrr<00><module>s@    

r
&Q