Files
intellecton/venv/lib/python3.12/site-packages/matplotlib/__pycache__/collections.cpython-312.pyc
T

1172 lines
121 KiB
Plaintext
Raw Normal View History

Ë
†Rj7xã ófdZddlZddlZddlZddlmZmZddlZddlZ ddl
Z ddl m
Z
mZmZmZmZmZmZmZmZmZmZddlmZmZe
j@ddgd d
gd d ggd
¢ddgdgdœ«GddejB««Z"Gdde"«Z#Gdde#«Z$Gdde#«Z%Gdde%«Z&Gdde#«Z'Gdde'«Z(Gd „d!e'«Z)Gd"„d#e"«Z*Gd$„d%e*«Z+Gd&„d'e#«Z,Gd(„d)e"«Z-Gd*„d+e"«Z.Gd,„d-e"«Z/Gd.„d/«Z0Gd0„d1e0e"«Z1Gd2„d3e0e%«Z2y)4ay
Classes for the efficient drawing of large collections of objects that
share most properties, e.g., a large number of line segments or
polygons.
The classes are not meant to be as flexible as their single element
counterparts (e.g., you may not be able to select all line styles) but
they are meant to be fast for common use cases (e.g., a large set of solid
line segments).
éN)ÚNumberÚRealé) Ú_apiÚ_pathÚartistÚcbookÚ colorizerÚcolorsÚ
_docstringÚhatchÚlinesÚpathÚ
transforms)Ú JoinStyleÚCapStyleÚ antialiasedsÚaaÚ
edgecolorsÚecÚ
facecolorsÚfc)Ú
linestylesÚdashesÚlsÚ
linewidthsÚlwÚ transOffset)Ú antialiasedÚ edgecolorÚ facecolorÚ linestyleÚ linewidthÚoffset_transformcó’eZdZdZej
d«ZdZejdddddddddddddddddœˆfd „
«Z
d
Z d Z d Z
d
ZdZdZd9dZdZej(d«ZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"d „Z#ejd!„«Z$ejd"„«Z%ejd#„«Z&ejd$„«Z'e(d%„«Z)d&„Z*d'„Z+d(„Z,d)„Z-d*„Z.d+„Z/d,„Z0d-„Z1d.„Z2d/„Z3d0„Z4d1„Z5d2„Z6ejnjpje6_d3„Z9d4„Z:d5„Z;d6„Z<d7„Z=d8„Z>ˆxZ?S):Ú
CollectionaÅ
Base class for Collections. Must be subclassed to be usable.
A Collection represents a sequence of `.Patch`\es that can be drawn
more efficiently together than individually. For example, when a single
path is being drawn repeatedly at different offsets, the renderer can
typically execute a ``draw_marker()`` call much more efficiently than a
series of repeated calls to ``draw_path()`` with the offsets put in
one-by-one.
Most properties of a collection can be configured per-element. Therefore,
Collections have "plural" versions of many of the properties of a `.Patch`
(e.g. `.Collection.get_paths` instead of `.Patch.get_path`). Exceptions are
the *zorder*, *hatch*, *pickradius*, *capstyle* and *joinstyle* properties,
which can only be set globally for the whole collection.
Besides these exceptions, all properties can be specified as single values
(applying to all elements) or sequences of values. The property of the
``i``\th element of the collection is::
prop[i % len(prop)]
Each Collection can optionally be used as its own `.ScalarMappable` by
passing the *norm* and *cmap* parameters to its constructor. If the
Collection's `.ScalarMappable` matrix ``_A`` has been set (via a call
to `.Collection.set_array`), then at draw time this internal scalar
mappable will be used to set the ``facecolors`` and ``edgecolors``,
ignoring those that were manually passed in.
©rér(FNÚsolidg@r)rrrrÚcapstyleÚ joinstylerÚoffsetsr$ÚnormÚcmapr
Ú
pickradiusr
ÚurlsÚzorderc ó¤t||j| |
| ««dg|_dg|_dg|_dg|_d|_d|_d|_ d|_
tjtjd«|_tjd|_|j#|«|j%|«|j'|«|j)|«|j+|«|j-|
«|j/|«|j1|«|j3|«|r|j5|«nd|_|r|j9|«nd|_|2t=j>|t@«}|jBdk(r |dddf}||_"| |_#d|_$|jK|«d|_&y)
Parameters
----------
edgecolors : :mpltype:`color` or list of colors, default: :rc:`patch.edgecolor`
Edge color for each patch making up the collection. The special
value 'face' can be passed to make the edgecolor match the
facecolor.
facecolors : :mpltype:`color` or list of colors, default: :rc:`patch.facecolor`
Face color for each patch making up the collection.
linewidths : float or list of floats, default: :rc:`patch.linewidth`
Line width for each patch making up the collection.
linestyles : str or tuple or list thereof, default: 'solid'
Valid strings are ['solid', 'dashed', 'dashdot', 'dotted', '-',
'--', '-.', ':']. Dash tuples should be of the form::
(offset, onoffseq),
where *onoffseq* is an even length tuple of on and off ink lengths
in points. For examples, see
:doc:`/gallery/lines_bars_and_markers/linestyles`.
capstyle : `.CapStyle`-like, default: 'butt'
Style to use for capping lines for all paths in the collection.
Allowed values are %(CapStyle)s.
joinstyle : `.JoinStyle`-like, default: 'round'
Style to use for joining lines for all paths in the collection.
Allowed values are %(JoinStyle)s.
antialiaseds : bool or list of bool, default: :rc:`patch.antialiased`
Whether each patch in the collection should be drawn with
antialiasing.
offsets : (float, float) or list thereof, default: (0, 0)
A vector by which to translate each patch after rendering (default
is no translation). The translation is performed in screen (pixel)
coordinates (i.e. after the Artist's transform is applied).
offset_transform : `~.Transform`, default: `.IdentityTransform`
A single transform which will be applied to each *offsets* vector
before it is used.
cmap, norm
Data normalization and colormapping parameters. See
`.ScalarMappable` for a detailed description.
hatch : str, optional
Hatching pattern to use in filled paths, if any. Valid strings are
['/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*']. See
:doc:`/gallery/shapes_and_collections/hatch_style_reference` for
the meaning of each hatch type.
pickradius : float, default: 5.0
If ``pickradius <= 0``, then `.Collection.contains` will return
``True`` whenever the test point is inside of one of the polygons
formed by the control points of a Path in the Collection. On the
other hand, if it is greater than 0, then we instead check if the
test point is contained in a stroke of width ``2*pickradius``
following any of the Paths in the Collection.
urls : list of str, default: None
A URL for each patch to link to once drawn. Currently only works
for the SVG backend. See :doc:`/gallery/misc/hyperlinks_sgskip` for
examples.
zorder : float, default: 1
The drawing order, shared by all Patches in the Collection. See
:doc:`/gallery/misc/zorder_demo` for all defaults and examples.
**kwargs
Remaining keyword arguments will be used to set properties as
``Collection.set_{key}(val)`` for each key-value pair in *kwargs*.
©rNrNz hatch.colorzhatch.linewidth©é)'ÚsuperÚ__init__Ú_get_colorizerÚ_us_linestylesÚ _linestylesÚ_us_lwÚ _linewidthsÚ _gapcolorÚ_face_is_mappedÚ_edge_is_mappedÚ_mapped_colorsÚmcolorsÚto_rgbaÚmplÚrcParamsÚ _hatch_colorÚ_hatch_linewidthÚ
set_facecolorÚ
set_edgecolorÚ
set_linewidthÚ
set_linestyleÚset_antialiasedÚset_pickradiusÚset_urlsÚ set_hatchÚ
set_zorderÚ set_capstyleÚ _capstyleÚ
set_joinstyleÚ
_joinstyleÚnpÚ
asanyarrayÚfloatÚshapeÚ_offsetsÚ_offset_transformÚ
_path_effectsÚ_internal_updateÚ_paths)Úselfrrrrr*r+rr,r$r-r.r
r/r
r0r1ÚkwargsÚ __class__s €úY/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/collections.pyr7zCollection.__init__Nø€ôf ј×,¨T°4¸Ó )˜kˆÔà%˜;ˆÔàŒ Ø˜3ˆÔàˆŒðÔØÔØÔÜ#ŸO™O¬C¯L©L¸Ñ,GÓÔÜ #§ ¡ Ð->Ñ ?ˆÔØ ×ј:Ô ×ј ×ј ×ј ×ј\Ô ×јJÔ
Ø Ø ˜Ôá Ø × Ñ ˜hÕ !ˆDŒNá Ø × Ñ ˜yÕ "ˆDŒOà Ð Ü—mm G¬UÓ3ˆGà}‰} Ò!  *àˆŒ
Ø!1ˆÔàÔØ ×јfÔˆ ócó|jS©r\©r]s r`Ú get_pathszCollection.get_pathsÔó Ø{‰{Ðracó ||_d|_y©NT)r\Ústale)r]Úpathss r`Ú set_pathszCollection.set_paths×s؈Œ ؈
racó|jSrc)Ú _transformsres r`Úget_transformszCollection.get_transformsÛóØ×ÑÐracóD|j€%tj«|_|jSt|jtj«s@t |jd«r*|jj
|j«|_|jS)z<Return the `.Transform` instance used by this artist offset.Ú_as_mpl_transform)rYrÚIdentityTransformÚ
isinstanceÚ TransformÚhasattrrrÚaxesres r`Úget_offset_transformzCollection.get_offset_transformÞsà × )Ü%/×%AÑ%AÓ%Cˆ
טT×3´Z×5IÑ5IÔ˜$×0Ð2EÔ×&×8¸¿¹Ó
Ô ×%racó||_y)z
Set the artist offset transform.
Parameters
----------
offset_transform : `.Transform`
N)rY)r]r$s r`Úset_offset_transformzCollection.set_offset_transformès ð"2ˆÕracó”|j«}|j«}t|tj«s/|j |«stj j«S|j«}t|«stj j«S|js|Dcgc]}|j|«Œ}}|j«}t|j|««r¦t|tj j"«r|j%tj&«}t)j*|j-«|z
||j/«|j1|«|j-«j3««S|j4~||z
j7|«}tj j9|«}|j:j=«s1tj j«}|j?|«|Stj j«Scc}wrc) Ú
get_transformrxrtrrsÚcontains_branchÚBboxÚnullrfÚlenÚ is_affineÚtransform_path_non_affineÚ get_offsetsÚanyÚcontains_branch_seperatelyrTÚmaÚ MaskedArrayÚfilledÚnanÚmpathÚget_path_collection_extentsÚ
get_affineroÚtransform_non_affineÚfrozenrXÚ transformÚmasked_invalidÚmaskÚallÚupdate_from_data_xy)r]Ú transDatarÚ
offset_trfrkÚpr,Úbboxs r`Ú get_datalimzCollection.get_datalimòð"×(ˆ Ø×0ˆ
ܘ:¤z×'CÑ'CÔ×-¨iÔ—??× Ó ˆÜ5Œzä—??× ×"ØEJÖY×8¸ÕKˆ ×$ˆä ˆy×3°IÓ
˜'¤2§5¡5×#4Ñ#4Ô!Ÿ.™.¬¯©Ó0ä××Ñ2°EØ××Ó×'×
 =‰=Ð " -×8¸ÓAˆ—e‘e×*¨7Ó3ˆ—<<×!—×-Ø×Ô Ü×%ùòILsÂ3IcóH|jtj««Src)r˜rrs)r]Úrenderers r`Úget_window_extentzCollection.get_window_extent7sð×Ѥ
× <Ñ <Ó >Ó?rac óä|j«}|j«}|j«}|j«}|j «rìg}|j«D]†}|j
}|dddf|dddf}}|j
|«}|j|«}|jtjtj||g«|j««Œˆ|j
|dddf«}|j|dddf«}tjj||g«}|js.|Dcgc]}|j!|«Œ}}|j#«}|js!|j%|«}|j#«}t'|tjj(«r|j+tj,«}||||fScc}w)Nrr)r|rxrfÚ
have_unitsÚverticesÚconvert_xunitsÚconvert_yunitsÚappendrŠÚPathrTÚ column_stackÚcodesr†rrrrtr‡rˆr‰) r]rr•r,rkrÚxsÚyss r`Ú_prepare_pointszCollection._prepare_points<ð×(ˆ Ø×0ˆ
Ø×ØÓ ˆà ?‰?Ô ØˆEØŸÓ
PØŸ=™=Ø!¢! Q $™¨²!°Q°$©BØ×Ó,Ø×Ó,Ø œUŸZ™Z¬¯©¸¸R¸Ó(AÀ4Ç:Á:Ó 
Pð ×$ WªQ°¨T¡]Ó3ˆBØ×$ WªQ°¨T¡]Ó3ˆ—e(¨"¨b¨Ó2ˆ×"à!&öð×8¸Õ(ˆ!×.ˆIØ× ×5°gÓ>ˆ#×0ˆ gœrŸu™u× —n‘n¤R§V¡VÓ,ˆGð˜* g¨uÐ4ùò(sÅ
G-cóÆ
|j«sy|j|jj|j ««|j «|j
«\}}}}|j«}|j|«|j|j««|jrQ|j|j«|j|j«|j|j «|j#«|j$|j#«Ž|j'«rddlm}||j'«|«}|j-«}|j/«} |j1«}
d} t3|«dk(rGt3|«dkr8t3| «dk(r)t3|
«dk(rt3|j4«dk(rt7d|j8D««råt3|j:«dk(rÍt3|j<«dk(rµ|j?«€¥t3|«rtAjB|d«|z} n|} |djE| «}
|
jF|jId¬«jJjFkr5|
jL|jId¬«jJjLkrd} |jNr|jQ|jN«|jRr|jU|jR«| rÛ|jWtY|
d««|j[|j4d«|j\|j8dŽ|j_|j:d«|ja|j<d«|jc||d je«tgjh|«|tY| d««n|jjˆ|jm«\}}|jo||je«||j-«||tqjrd«g|jj|j4||j:|j<d «
|jo||je«||j-«|||j/«|j1«|j4|j8|j:|j<d «
|ju«|jw|jj«d|_<y)
Nr)ÚPathEffectRendererFrc3ó*K|] }|dduŒ
y­w)r)Ú.0rs r`ú <genexpr>z"Collection.draw.<locals>.<genexpr>‡sèø€Ò= bBqE˜T”MÑ=ùsÚrootÚnoneÚscreen)=Ú get_visibleÚ
open_groupr_Ú__name__Úget_gidÚupdate_scalarmappabler§Únew_gcÚ _set_gc_clipÚset_snapÚget_snapÚ_hatchrNÚset_hatch_colorrEÚset_hatch_linewidthrFÚget_sketch_paramsÚset_sketch_paramsÚget_path_effectsÚmatplotlib.patheffectsr©roÚ
get_facecolorÚ
get_edgecolorr€r<rr:Ú
_antialiasedsÚ_urlsÚ get_hatchrÚAffine2DÚ get_extentsÚwidthÚ
get_figurer—ÚheightrSrRrQrPÚset_foregroundÚtuplerIÚ
set_dashesrKÚset_urlÚ draw_markersrŽr=Ú_get_inverse_paths_linestylesÚdraw_path_collectionrArBÚrestoreÚ close_grouprj)r]rr•r,rkÚgcr©ÚtransrrÚdo_single_path_optimizationÚcombined_transformÚextentsÚipathsÚ ilinestyless r`ÚdrawzCollection.draw`s@à×ÑÔ Ø×јDŸN™N×3°T·\±\³^Ô ×$à04×0DÑ0DÓ0FÑ-ˆ :˜à
_‰_Ó
ˆØ ×ј"ÔØ
D—M‘M“OÔ ;Š;Ø L‰L˜ŸÔ × Ñ ˜t× × " 4×#8Ñ#8Ô × ˆB× Ñ  $×"8Ñ"8Ó":Ñ × Ñ Ô )¨$×*?Ñ*?Ó*AÀ8ÓLˆ×%ˆØ×)ˆ
Ø×)ˆ
Ø&+Ð J˜! 
¨a£ÜJ“ 1Ó¨Z«¸AÓ)=ÜÓÑ=¨D×,<Ñ,<ÔD×'¨1Ò,´°T·Z±Z³ÀAÒ1EØÓ Ð5ŒzÜ%/×%8Ñ%8¸¸Ó%BÀYÑ%NÑ"à%.ИAh×*Ð+=Ó>ˆ
 §¡°T Ó :× ?Ñ ?× EÑ EÒŸ¨¯©¸d¨Ó)C×)HÑ)H×)OÑ)OÒOØ.2Ð ?Š?Ø × Ñ ˜TŸ_™_Ô >Š>Ø O‰O˜DŸN™NÔ × Ñ œe J¨q¡MÓ × Ñ ˜T×-¨aÑ ˆBM‰M˜4×+¨AÑ × Ñ ˜t×1°!Ñ J‰Jt—zz ! × E˜!‘HÐ
˜7Ó# Z´°zÀ!±}Ó1Eö
Gð~‰~Ð)à&*×&HÑ&HÓ&JÑ#˜ Ø×˜ ×*¨FØ×)¨7°JÜ—__ -¨t¯~©~Ø×$ ×¯
©
Øô
ð
× Iר×% 
Ø×$ d×&8Ñ&8Ó&:Ø× Ñ  $×"2Ñ"2Ø×" D§J¡JØô

ð
Œ Ø×јTŸ^™^׈
racóNt|t«std|«||_y)
Set the pick radius used for containment tests.
Parameters
----------
pickradius : float
Pick radius, in points.
z-pickradius must be a real-valued number, not N)rtrÚ
ValueErrorÚ _pickradius)r]r/s r`rLzCollection.set_pickradiusºs/ô˜*¤dÔØ
¸Pð
Pà%ˆÕracó|jSrc)res r`Úget_pickradiuszCollection.get_pickradiusÈrprac ó(|j|«s|j«sdifSt|jt«r#|jdurt |j«n |j }|jr|jj«|j«\}}}}tj|j|j||j«||j«|||dk« }t!|«dkDt#|¬«fS)
Test whether the mouse event occurred in the collection.
Returns ``bool, dict(ind=itemlist)``, where every item in itemlist
contains the event.
FTr)Úind)Ú_different_canvasr²rtÚ_pickerrrVrwÚ_unstale_viewLimr§rÚpoint_in_path_collectionÚyrŽror€Údict)r]Ú
mouseeventr/rr•r,rks r`ÚcontainszCollection.containsËð × ! *Ô -°T×5EÑ5EÔ5Gؘ" ô˜$Ÿ,™,¬Ô|‰| 
$—,‘,Ô ð× ð
9Š9Ø I‰I× (Ø04×0DÑ0DÓ0FÑ-ˆ :˜ô × L‰L˜*Ÿ,™,¨
Ø × Ñ Ó   t×':Ñ':Ó'<Ø Z ¨q¡ó2ˆô3x˜!‰|œT cœ]Ð*racó*||ndg|_d|_y)
Parameters
----------
urls : list of str or None
Notes
-----
URLs are currently only implemented by the SVG backend. They are
ignored by all other backends.
NT)rj)r]r0s r`rMzCollection.set_urlsçsð-T°D°6ˆŒ
؈
racó|jS)
Return a list of URLs, one for each element of the collection.
The list contains *None* for elements without a URL. See
:doc:`/gallery/misc/hyperlinks_sgskip` for an example.
)res r`Úget_urlszCollection.get_urlsõsðz‰zÐracóJtj|«||_d|_y)a+
Set the hatching pattern
*hatch* can be one of::
/ - diagonal hatching
\ - back diagonal
| - vertical
- - horizontal
+ - crossed
x - crossed diagonal
o - small circle
O - large circle
. - dots
* - stars
Letters can be combined, in which case all the specified
hatchings are done. If same letter repeats, it increases the
density of hatching of that pattern.
Unlike other properties such as linewidth and colors, hatching
can only be specified for the collection as a whole, not separately
for each member.
Parameters
----------
hatch : {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
TN)ÚmhatchÚ_validate_hatch_patternr»rj)r]r
s r`rNzCollection.set_hatchþs ô< ×& ˆŒ ؈
racó|jS)z$Return the current hatching pattern.)res r`zCollection.get_hatch s à{‰{Ðracó||_y)zSet the hatch linewidth.N©rF©r]rs r`zCollection.set_hatch_linewidth$s
à "ˆÕracó|jS)zReturn the hatch linewidth.rõres r`Úget_hatch_linewidthzCollection.get_hatch_linewidth(sà×$rac
óÞtj|«}|jdk(r |dddf}t|tjj
«rtjj ntj }|tj|j|dddf«t«tj|j|dddf«t«f«|_
d|_ y)zˆ
Set the offsets for the collection.
Parameters
----------
offsets : (N, 2) or (2,) array-like
r4NrrT) rTrUrWrtr†r‡rVr rXrj)r]r,Úcstacks r`Ú set_offsetszCollection.set_offsets,ô—-‘- ÓØ =‰=˜DÒ Ø˜d¢A˜&ˆGÜ(2°7¼B¿E¹E×<MÑ<MÔ(N”"—%%×ð áÜ
]‰]˜4×.¨w²q¸!°t©}Ó=¼uÓ
]‰]˜4×.¨w²q¸!°t©}Ó=¼uÓ

GóHˆŒ
ðˆ
racó\|jtjd«S|jS)z&Return the offsets for the collection.©rr5)rXrTÚzerosres r`zCollection.get_offsets>s%ð$(§=¡=Ð#8Œrx‰x˜ÓÐK¸d¿m¹mÐKracó(tjdS)Nzpatch.linewidth©rCrDres r`Ú_get_default_linewidthz!Collection._get_default_linewidthCóä|‰|Ð.racóÐ||j«}tj|«|_|j |j|j
«\|_|_d|_y)
Set the linewidth(s) for the collection. *lw* can be a scalar
or a sequence; if it is a sequence the patches will cycle
through the sequence
Parameters
----------
lw : float or list of floats
NT) rrTÚ
atleast_1dr;Ú _bcast_lwlsr9r<r:rjs r`rIzCollection.set_linewidthGsZð ˆ×.ˆ—mm 'ˆŒ ð.2×-=Ñ-=Ø K‰K˜×..ÑÔ˜$Ôˆ
racóžtj|«|_|j|j|j«\|_|_y)a­
Set the linestyle(s) for the collection.
=========================== =================
linestyle description
=========================== =================
``'-'`` or ``'solid'`` solid line
``'--'`` or ``'dashed'`` dashed line
``'-.'`` or ``'dashdot'`` dash-dotted line
``':'`` or ``'dotted'`` dotted line
=========================== =================
Alternatively a dash tuple of the following form can be provided::
(offset, onoffseq),
where ``onoffseq`` is an even length tuple of on and off ink in points.
Parameters
----------
ls : str or tuple or list thereof
Valid values for individual linestyles include {'-', '--', '-.',
':', '', (offset, on-off-seq)}. See `.Line2D.set_linestyle` for a
complete description.
N)ÚmlinesÚ_get_dash_patternsr9rr;r<r:)r]rs r`rJzCollection.set_linestyle[sCô6%×7¸ÓÔð.2×-=Ñ-=Ø K‰K˜×..Ñ*ˆÔ˜*racó$t|«|_y)z 
Set the `.CapStyle` for the collection (for all its elements).
Parameters
----------
cs : `.CapStyle` or %(CapStyle)s
N)rrQ)r]Úcss r`rPzCollection.set_capstyle|sô" "ˆracóJ|jr|jjSdS)z
Return the cap style for the collection (for all its elements).
Returns
-------
%(CapStyle)s or None
N)rQÚnameres r`Ú get_capstylezCollection.get_capstyle‡sð'+§n¢nˆt~‰~×>¸>racó$t|«|_y)
Set the `.JoinStyle` for the collection (for all its elements).
Parameters
----------
js : `.JoinStyle` or %(JoinStyle)s
N)rrS)r]Újss r`rRzCollection.set_joinstylesô$ B-ˆracóJ|jr|jjSdS)z
Return the join style for the collection (for all its elements).
Returns
-------
%(JoinStyle)s or None
N)rSr res r`Ú
get_joinstylezCollection.get_joinstylesð(,§¢ˆt×@¸@rac
ó€tjdr||fSt|«t|«k7rNt|«}t|«}tj||«}t |«||zz}t |«||zz}t
||«Dcgc]\\}}}tj|||«Œ!}}}}||fScc}}}w)
Internal helper function to broadcast + scale ls/lw
In the collection drawing code, the linewidth and linestyle are cycled
through as circular buffers (via ``v[i % len(v)]``). Thus, if we are
going to scale the dash pattern at set time (not draw time) we need to
do the broadcasting now and expand both lists to be the same length.
Parameters
----------
linewidths : list
line widths of collection
dashes : list
dash specification (offset, (dash pattern tuple))
Returns
-------
linewidths, dashes : list
Will be the same length, dashes are scaled by paired linewidth
z_internal.classic_mode) rCrDr€ÚmathÚgcdÚlistÚziprÚ
_scale_dashes)rrÚl_dashesÚl_lwrÚdrs r`rzCollection._bcast_lwls¨ô, <‰<Ð ˜ ˆv‹;œ#˜j›/Ò ˜6“{ˆHÜz“?ˆDÜ—((˜8 *ˆ˜&“\ T¨S¡[Ñ1ˆ˜)¨X¸©_Ñ=ˆJô%(¨°
Ó$;÷ fq˜!˜×& q¨!¨RÕ=ˆò˜6Ð!ùô=sÂ
$B9có|jS)zs
Get the antialiasing state for rendering.
Returns
-------
array of bools
)res r`Úget_antialiasedzCollection.get_antialiasedÎsð×!racóš||j«}tjtj|t««|_d|_y)z…
Set the antialiasing state for rendering.
Parameters
----------
aa : bool or list of bools
NT)Ú_get_default_antialiasedrTrÚasarrayÚboolrÄrj)r]rs r`rKzCollection.set_antialiasedØs:ð ˆ:Ø×0ˆBÜŸ]™]¬2¯:©:°b¼$Ó+?ÓÔØˆ
racó(tjdS)Nzpatch.antialiasedrres r`rz#Collection._get_default_antialiasedåsä|‰|Ð0racóH|j|«|j|«y)a1
Set both the edgecolor and the facecolor.
Parameters
----------
c : :mpltype:`color` or list of RGBA tuples
See Also
--------
Collection.set_facecolor, Collection.set_edgecolor
For setting the edge or face color individually.
N)rGrH©r]Úcs r`Ú set_colorzCollection.set_colorés ð
×ј1ÔØ ×ј1Õracó(tjdS)Nzpatch.facecolorrres r`Ú_get_default_facecolorz!Collection._get_default_facecolorùrracó€||j«}tj||j«|_d|_yri)r(rAÚ
to_rgba_arrayÚ_alphaÚ _facecolorsrjr$s r`Ú_set_facecolorzCollection._set_facecolorýs5Ø ˆ×-ˆAä"×°D·K±KÓÔØˆ
racó˜t|t«r"|j«dvr|j«}||_|j |«y)an
Set the facecolor(s) of the collection. *c* can be a color (all patches
have same color), or a sequence of colors; if it is a sequence the
patches will cycle through the sequence.
If *c* is 'none', the patch will not be filled.
Parameters
----------
c : :mpltype:`color` or list of :mpltype:`color`
©ÚfaceN)rtÚstrÚlowerÚ_original_facecolorr-r$s r`rGzCollection.set_facecolors=ô Ô  !§'¡'£)Ð/?Ñ"?Ø“ ˆAØ#$ˆÔ Ø ×јAÕracó|jSrc)r,res r`zCollection.get_facecolorrpracóztj|jd«r|j«S|jS)Nr0)r Ú
_str_equalÚ _edgecolorsrÂres r`zCollection.get_edgecolors3Ü × Ñ ˜D×,¨fÔ × × #racó(tjdS)Nzpatch.edgecolorrres r`Ú_get_default_edgecolorz!Collection._get_default_edgecolorrracó¾d}|€Ttjds,|js tj|j
d«r|j
«}nd}d}tj|d«rd|_d|_ ytj||j«|_|r2t|j«rt|jd«|_d|_ y)NTzpatch.force_edgecolorr°Fr0r)rCrDÚ
_edge_defaultr r6r3r9Ú_str_lower_equalr7rjrAr*r+r€rE)r]r%s r`Ú_set_edgecolorzCollection._set_edgecolor"ØˆØ ˆ9Ü Ð×××(@Ñ(@À&Ô×1àØ"'Ü × ! !  %ˆDÔ ØˆDŒJØ Ü°D·K±KÓ@ˆÔÙ œs 4×#3Ñ#3Ô4Ü % d×&6Ñ&6°qÑ&9Ó :ˆ ؈
racó˜t|t«r"|j«dvr|j«}||_|j |«y)a'
Set the edgecolor(s) of the collection.
Parameters
----------
c : :mpltype:`color` or list of :mpltype:`color` or 'face'
The collection edgecolor(s). If a sequence, the patches cycle
through it. If 'face', match the facecolor.
r/N)rtr1r2Ú_original_edgecolorr=r$s r`rHzCollection.set_edgecolor5s=ô Ô  !§'¡'£)Ð/?Ñ"?Ø“ ˆAØ#$ˆÔ Ø ×јAÕracó°tjj||«|j|j«|j |j «y)a„
Set the transparency of the collection.
Parameters
----------
alpha : float or array of float or None
If not None, *alpha* values must be between 0 and 1, inclusive.
If an array is provided, its length must match the number of
elements in the collection. Masked values and nans are not
supported.
N)rÚArtistÚ_set_alpha_for_arrayr-r3r=r?)r]Úalphas r`Ú set_alphazCollection.set_alphaGs@ô 
×*¨4°Ô ×јD× ×јD×5racó|jSrc)r<res r`Ú
get_linewidthzCollection.get_linewidthYrpracó|jSrc)r:res r`Ú
get_linestylezCollection.get_linestyle\rpracóÂ|j}|j}d|_d|_|jbtj|j
d«s/d|_tj|j d«rd|_n|j d|_|jxs |j}|duxs&|duxs |j|k7xs|j|k7}|xs|S)aF
Determine whether edges and/or faces are color-mapped.
This is a helper for update_scalarmappable.
It sets Boolean flags '_edge_is_mapped' and '_face_is_mapped'.
Returns
-------
mapping_change : bool
True if either flag is True, or if a flag has changed.
FNr°Tr0)r?r>Ú_Ar r6r3r?)r]Úedge0Úface0ÚmappedÚchangeds r`Ú_set_mappable_flagszCollection._set_mappable_flags_ðר×àÔØÔØ 7‰7Ð Ü×# D×$<Ñ$<¸EØ'+Ô×# D×$<Ñ$<¸EØ+/×3Ø+/××)=Ñ)=ˆØ˜D4 E¨T ×*¨eÑ×*¨eÑ ðÒ ˜Ð racór|j«sy|j|jjdkDrt|t«s t d«t
j|j«r|jj|jjk7r:t d|jjd|jjd«|jj|jj«|_|j|j|j«|_
|jr|j|_n|j!|j"«|j$r|j|_d|_y|j)|j*«d|_y)
Update colors from the scalar mappable array, if any.
Assign colors to edges and faces based on the array and/or
colors that were directly set, as appropriate.
Nrz&Collections can only map rank 1 arrayszData array shape, z) is incompatible with alpha array shape, z†. This can occur with the deprecated behavior of the "flat" shading option, in which a row and/or column of the data array is dropped.T)rOrJÚndimrtÚ _MeshDatarÞrTÚiterabler+ÚsizerWÚreshaperBr@r>r,r-r3r?r7r=r?rjres r`z Collection.update_scalarmappablesKð× à 7‰7Ñ àw‰w|‰|˜aÒ¬
°4¼Ô(CÜ Ð!IÓ{‰{˜4Ÿ;™;Ô—;;×# t§w¡w§|¡|Ò,¨T¯W©W¯]©]¨Oð<CàŸ;™;×.,ð#Ÿk™k×1°$·'±'·-±-Ó@ Ø"&§,¡,¨t¯w©w¸¿ ¹ Ó"DˆDÔ à × Ò Ø2ˆDÕ à × Ñ  × 8Ñ 8Ô × Ò Ø2ˆDÔ ðˆ
ð
× Ñ  × 8Ñ 8Ô ˆ
racóDtj|jd« S)zReturn whether face is colored.r°)r r<r3res r`Úget_fillzCollection.get_fill§sä×)¨$×*BÑ*BÀFÓKracórtjj||«|j|_|j|_|j
|_|j |_|j|_|j|_|j|_ |j|_
|j|_ |j|_ |j|_
|j|_|j|_|j |_|j"|_|j$|_d|_y)z#Copy properties from other to self.TN)rrAÚ update_fromrÄr@r?r?r7r>r3r,r<r:r9rJr-r.rj)r]Úothers r`rYzCollection.update_from«ô 
×! Ô"×ÔØ#×ÔØ4ˆÔØ#(×#<Ñ#<ˆÔ Ø ×ÔØ4ˆÔØ#(×#<Ñ#<ˆÔ Ø ×ÔØ ×ÔØ ×ÔØÔØ ×ÔØ—l‘lˆŒ ð—(‘(ˆŒØ—J‘JˆŒ Ø—J‘JˆŒ ؈
rarc)@r´Ú
__module__Ú __qualname__Ú__doc__rTÚemptyrnr;r Úinterpdr7rfrlrorxrzr˜rrÚallow_rasterizationrÜrLrMrNrrIrJrPr
rRrÚ staticmethodrrrKrr&r(r-rGr9r=rHrDrArBrFrHrOrWrYÚ
__classcell__©r_s@r`r&r&ø„ñðF"—((˜%€Kð€Mà×Ñà Ø Ø ØØØØ"&ØØØØØØØõ!CóðCòJòò òC&óJ@ò
"5ðH ×ÑñWó ðWòr  ò+ò8 òò òDòò$Lò
ò(.ðB×Ññð×Ññð×Ññð×ÑñAóðAðñ#ð#"òJ òò òò" ò ò&ò$Ÿ
×B€IÔò ò ò !òD$òLLörar&cóReZdZdZdZdZddZejˆfd«Z ˆxZ
S)Ú_CollectionWithSizeszA
Base class for collections that have an array of sizes.
çð?có|jS)
Return the sizes ('areas') of the elements in the collection.
Returns
-------
array
The 'area' of each element.
)Ú_sizesres r`Ú get_sizesz_CollectionWithSizes.get_sizesÊsð{‰{Ðracóþ|€<tjg«|_tjd«|_d |_
ytj
|«|_tj t|j«ddf«|_tj|j«|zdz |jz}||jddddf<||jddddf<d|jddddf<d |_
y)
aI
Set the sizes of each member of the collection.
Parameters
----------
sizes : `numpy.ndarray` or None
The size to set for each element of the collection. The
value is the 'area' of the element.
dpi : float, default: 72
The dpi of the canvas.
Nr'r(çR@rrrfr5T) rTÚarrayrhr^rnr r€ÚsqrtÚ_factorrj)r]ÚsizesÚdpiÚscales r`Ú set_sizesz_CollectionWithSizes.set_sizesÕ𠈟(™( 2›,ˆDŒKÜ!Ÿx™x¨ Ó2ˆDÔ ðˆ
ô
Ÿ*™* UÓ+ˆDŒKÜ!Ÿx™x¬¨T¯[©[Ó)9¸1¸aÐ(@ÓAˆDÔ Ü—G‘G˜DŸK™KÓ(¨3ÑÑ¿ ¹ ÑDˆEØ(-ˆD× Ñ šQ  1˜WÑ %Ø(-ˆD× Ñ šQ  1˜WÑ %Ø(+ˆD× Ñ šQ  1˜WÑ ˆ
racó|j|j|jd¬«j«t||«y©NTr®)rrrhrpr6©r]r_s €r`z_CollectionWithSizes.drawís2ø€à t—{{ D§O¡O¸ OÓ$>×$BÑ$BÔ
 ra)rk) r´r[r\r]rnrirrrr`rbrcs@r`rereÄs3ø„ñð€Gò óð0 ×Ñóó ôrarecó<eZdZdZd ˆfd„ ZdZddddfdZˆxZS)
ÚPathCollectionzO
A collection of `~.path.Path`\s, as created by e.g. `~.Axes.scatter`.
Nc óvt|di|¤Ž|j|«|j|«d|_y)a
Parameters
----------
paths : list of `.path.Path`
The paths that will make up the `.Collection`.
sizes : array-like
The factor by which to scale each drawn `~.path.Path`. One unit
squared in the Path's data space is scaled to be ``sizes**2``
points when rendered.
**kwargs
Forwarded to `.Collection`.
TNr«)r6r7rlrrrj)r]rkror^r_s €r`r7zPathCollection.__init__øs4ø€ô ÑÑ"˜ Ø Øˆ
racó|jSrcrdres r`rfzPathCollection.get_paths rgrar Úautocó|Src)s r`ú<lambda>zPathCollection.<lambda>s°rac óÖg}g}|j«du}|€"tjjdd¬«}n/t |t
«rtjj
|«}|j«|dk(rb|stjd«||fStj|j««} |jdtjd«}
nJ|d k(r6tj|j««} |jd
d «} ntd |d
«|| «} |j j#| j%«| j'««|j j)| j%«| j'««|dk(rd}t+| «|krd}| | }
||
«}n˜|dk(r|j«}n|d k(r|j«}t |tjj,«r|}ngtj.|«r tjj1|«}n2t3|«}tjj5||dz
gd¢¬«}|j7|«j%«||«j'««}|||«j%«k\|||«j'«kz}||}tj8|j%«|j'«d«}||«}tj:|«}tj<|||||«}
|j?«d|jA«dœ|¥}tC|
|«D\}}|dk(r!|jE|jG|««} n1|d k(r,tjH|«}
tjJ|
d«rŒ]tMjNdgdgfd 
|jQ«ddœ|¤Ž}|jS|«tU|d«r|jW|«||«}|jS|«ŒÔ||fS)a
Create legend handles and labels for a PathCollection.
Each legend handle is a `.Line2D` representing the Path that was drawn,
and each label is a string that represents the Path.
This is useful for obtaining a legend for a `~.Axes.scatter` plot;
e.g.::
scatter = plt.scatter([1, 2, 3], [4, 5, 6], c=[7, 2, 3], num=None)
plt.legend(*scatter.legend_elements())
creates three legend elements, one for each color with the numerical
values passed to *c* as the labels.
Also see the :ref:`automatedlegendcreation` example.
Parameters
----------
prop : {"colors", "sizes"}, default: "colors"
If "colors", the legend handles will show the different colors of
the collection. If "sizes", the legend will show the different
sizes. To set both, use *kwargs* to directly edit the `.Line2D`
properties.
num : int, None, "auto" (default), array-like, or `~.ticker.Locator`
Target number of elements to create.
If None, use all unique elements of the mappable array. If an
integer, target to use *num* elements in the normed range.
If *"auto"*, try to determine which option better suits the nature
of the data.
The number of created elements may slightly deviate from *num* due
to a `~.ticker.Locator` being used to find useful locations.
If a list or array, use exactly those elements for the legend.
Finally, a `~.ticker.Locator` can be provided.
fmt : str, `~matplotlib.ticker.Formatter`, or None (default)
The format or formatter to use for the labels. If a string must be
a valid input for a `.StrMethodFormatter`. If None (the default),
use a `.ScalarFormatter`.
func : function, default: ``lambda x: x``
Function to calculate the labels. Often the size (or color)
argument to `~.Axes.scatter` will have been pre-processed by the
user using a function ``s = f(x)`` to make the markers visible;
e.g. ``size = np.log10(x)``. Providing the inverse of this
function here allows that pre-processing to be inverted, so that
the legend labels have the correct values; e.g. ``func = lambda
x: 10**x``.
**kwargs
Allowed keyword arguments are *color* and *size*. E.g. it may be
useful to set the color of the markers if *prop="sizes"* is used;
similarly to set the size of the markers if *prop="colors"* is
used. Any further parameters are passed onto the `.Line2D`
instance. This may be useful to e.g. specify a different
*markeredgecolor* or *alpha* for the legend handles.
Returns
-------
handles : list of `.Line2D`
Visual representation of each element of the legend.
labels : list of str
The string labels for elements of the legend.
NFT)Ú useOffsetÚ useMathTextr zfCollection without array used. Make sure to specify the values to be colormapped via the `c` argument.rTzlines.markersizeroÚcolorÚkz?Valid values for `prop` are 'colors' or 'sizes'. You supplied 'z
' instead.rzé r)rr5g@r(éééé
)ÚnbinsÚ min_n_ticksÚstepsér)ÚmarkeredgewidthrCgÚ)rr€ÚmsÚmarkerÚset_locs),Ú get_arrayrCÚtickerÚScalarFormatterrtr1ÚStrMethodFormatterÚcreate_dummy_axisÚwarningsÚwarnrTÚuniqueÚpoprDriÚaxisÚset_view_intervalÚminÚmaxÚset_data_intervalr€ÚLocatorrSÚ FixedLocatorÚintÚ MaxNLocatorÚ tick_valuesÚlinspaceÚargsortÚinterpÚget_linewidthsÚ get_alpharr.r-rmÚiscloserÚLine2Drfrvr)r]ÚpropÚnumÚfmtÚfuncr^ÚhandlesÚlabelsÚhasarrayÚurTr€ÚfuÚvaluesÚ label_valuesÚarrÚlocÚcondÚyarrÚxarrÚixÚkwÚvalÚlabÚls r`Úlegend_elementszPathCollection.legend_elementsð~ˆØˆØ—>#¨4Ð/ˆØ ˆ—*‘*×,°uÈ$ÐO‰CÜ
˜œSÔ
—*‘*×Ó4ˆCØ ×ÑÔà  ÙÜ
ð Ð ˜$Ÿ.™.Ó+ˆAØ—::˜f¤c§l¡lÐ3EÑ&FÓG‰DØ
WŠ_Ü— ‘ ˜$Ÿ.™.Ó+ˆAØ—J‘J˜w¨Ó,‰Eäð7Ø7;°f¸JðHóIð
Iñ!WˆØ ×" 2§6¡6£8¨R¯V©V«XÔ ×" 2§6¡6£8¨R¯V©V«XÔ &Š=؈1‹v˜Š}ØØ ˆ;؈FÙ ›<ŠLàØ—n‘nÓ&‘ؘؗn&ܘ#œsŸz™z×ܘSÔ—j‘j×-¨cÓ2‘ä˜#“hÜ—j‘j×,°3ÀCÈÁEÚ3NðPàŸ?™?©4°«9¯=©=«?¹DÀ»I¿M¹M»OÓLˆLØ!¡T¨#£Y§]¡]£_Ñ!¡T¨#£Y§]¡]£_Ñ6ˆÑ-ˆ—;;˜sŸw™wy¨#¯'©'«)°SÓ9ˆ˜“:ˆDܘDÓ!ˆBÜ—YY˜|¨T°"©X°t¸B±xÓ@ˆFà!%×!4Ñ!4Ó!6°qÑ!9Ø—~àðˆô˜F LÓ
‰HˆCØØŸ ™  $§)¡)¨C£.Ó1‘ؘܗw‘w˜s“|Ü—:‘:˜d CÔÜ
˜q˜c A @¨2°U¸tØ%)§^¡^Ó%5°aÑ%8ñ@Ø<>ñ@ˆ N‰N˜ Üs˜JÔ ˜\ÔC“ˆAØ M‰M˜!Õ ð
ð˜ˆÐrarc)r´r[r\r]r7rfrbrcs@r`rwrwós$ø„ñõò&ð$,°Ø ¡{÷Jrarwcó8eZdZdddœˆfd ZddZeZdZˆxZS)ÚPolyCollectionT)Úclosedc óxt|di|¤Ž|j|«|j||«d|_y)aA
Parameters
----------
verts : list of array-like
The sequence of polygons [*verts0*, *verts1*, ...] where each
element *verts_i* defines the vertices of polygon *i* as a 2D
array-like of shape (M, 2).
sizes : array-like, default: None
Squared scaling factors for the polygons. The coordinates of each
polygon *verts_i* are multiplied by the square-root of the
corresponding entry in *sizes* (i.e., *sizes* specify the scaling
of areas). The scaling is applied before the Artist master
transform.
closed : bool, default: True
Whether the polygon should be closed by adding a CLOSEPOLY
connection at the end.
**kwargs
Forwarded to `.Collection`.
TNr«)r6r7rrÚ set_vertsrj)r]Úvertsror^r_s €r`r7zPolyCollection.__init__s6ø€ô( ÑÑ"˜ Ø u˜fÔˆ
racóJd|_t|tjj«r2|j t «jtj«}|s)|Dcgc]}tj|«Œc}|_ yt|tj«r÷t|j«dk(rßtj||ddddffd¬«}tj |jdtjj"¬«}tjj$|ddtjj&|d<tjj(|d<|Dcgc]}tj||«Œc}|_ yg|_ |D]t}t|«r9|jj+tjj-|««ŒG|jj+tj|««Œvycc}wcc}w) aÈ
Set the vertices of the polygons.
Parameters
----------
verts : list of array-like
The sequence of polygons [*verts0*, *verts1*, ...] where each
element *verts_i* defines the vertices of polygon *i* as a 2D
array-like of shape (M, 2).
closed : bool, default: True
Whether the polygon should be closed by adding a CLOSEPOLY
connection at the end.
TNr(r©r™©Údtyperéÿÿÿÿ)rjrtrTr†r‡ÚastyperVrˆr‰r\Úndarrayr€rWÚ concatenater^Ú code_typeÚLINETOÚMOVETOÚ CLOSEPOLYr¡Ú_create_closed)r]ÚxyÚ verts_padr¤s r`zPolyCollection.set_verts¶s€ðˆŒ
Ü eœRŸU™U× —LÓ'×.¬r¯v©vÓ6ˆØ49Ö:¨bœ5Ÿ:™: b:ˆDŒKØ ô eœRŸZ™ZÔ (¬S°·±Ó-=ÀÒ-BÜŸ¨¨u²Q¸¸¸°U©|Ð'<À1ÔEˆ—HH˜YŸ_™_¨QÑ/´u·z±z×7KÑ7KÔLˆEÜ—z‘z×(ˆE‘!ˆHÜ—z‘z×(ˆE!‰HÜŸ
×,ˆE"‰IØ;DÖE°Rœ5Ÿ:™: b¨%ÕEˆDŒKØ àˆŒ Øò 3ˆBÜ2ŒwØ ×"¤5§:¡:×#<Ñ#<¸RÓ#@Õ ×"¤5§:¡:¨b£>Õ 3ùò!;ùòFs Á$HÅ4H cót|«t|«k7r td«t||«Dcgc];\}}t|«rtj||«ntj|«Œ=c}}|_d|_ycc}}w)z$Initialize vertices with path codes.zB'codes' must be a 1D list or array with the same length of 'verts'TN)r€rr\rj)r]Úcdss r`Úset_verts_and_codesz"PolyCollection.set_verts_and_codesâswä ˆu‹:œ˜U›Ò ð@ð
@ô'*¨%°Ó&7÷"˜2˜/2°"¬g”u—zz " *¼5¿:¹:Àb»>Ñ9ˆŒ àˆ
ùó9s²ABrc)T)r´r[r\r7rlrbrcs@r`s!ø„ð°Döó2(3ðT€Iöracó¦eZdZdZddddœˆfd
Zed«Zed«Zddœd „Z d
Z
d Z d Z ed
«Z
dZed«Zed«ZdZˆxZS)ÚFillBetweenPolyCollectionzK
`.PolyCollection` that fills the area between two x- or y-curves.
NF)ÚwhereÚ interpolateÚstepc óx||_||_||_|j||||«} t
|| fi|¤Žy)aY
Parameters
----------
t_direction : {{'x', 'y'}}
The axes on which the variable lies.
- 'x': the curves are ``(t, f1)`` and ``(t, f2)``.
- 'y': the curves are ``(f1, t)`` and ``(f2, t)``.
t : array-like
The ``t_direction`` coordinates of the nodes defining the curves.
f1 : array-like or float
The other coordinates of the nodes defining the first curve.
f2 : array-like or float
The other coordinates of the nodes defining the second curve.
where : array-like of bool, optional
Define *where* to exclude some {dir} regions from being filled.
The filled regions are defined by the coordinates ``t[where]``.
More precisely, fill between ``t[i]`` and ``t[i+1]`` if
``where[i] and where[i+1]``. Note that this definition implies
that an isolated *True* value between two *False* values in *where*
will not result in filling. Both sides of the *True* position
remain unfilled due to the adjacent *False* values.
interpolate : bool, default: False
This option is only relevant if *where* is used and the two curves
are crossing each other.
Semantically, *where* is often used for *f1* > *f2* or
similar. By default, the nodes of the polygon defining the filled
region will only be placed at the positions in the *t* array.
Such a polygon cannot describe the above semantics close to the
intersection. The t-sections containing the intersection are
simply clipped.
Setting *interpolate* to *True* will calculate the actual
intersection point and extend the filled region up to this point.
step : {{'pre', 'post', 'mid'}}, optional
Define *step* if the filling should be a step function,
i.e. constant in between *t*. The value determines where the
step will occur:
- 'pre': The f value is continued constantly to the left from
every *t* position, i.e. the interval ``(t[i-1], t[i]]`` has the
value ``f[i]``.
- 'post': The y value is continued constantly to the right from
every *x* position, i.e. the interval ``[t[i], t[i+1])`` has the
value ``f[i]``.
- 'mid': Steps occur half-way between the *t* positions.
**kwargs
Forwarded to `.PolyCollection`.
See Also
--------
.Axes.fill_between, .Axes.fill_betweenx
N)Ú t_directionÚ _interpolateÚ_stepÚ _make_vertsr6r7) r]Úf1Úf2rÛr^r_s €r`r7z"FillBetweenPolyCollection.__init__ðsEø€ð@'ˆÔØ'ˆÔ؈Œ
Ø× Ñ   B¨¨EÓÜ
јÑ) )racó:|dk(ry|dk(ryd|}t|«)z/The direction that is other than `t_direction`.rèz$t_direction must be 'x' or 'y', got ))Úmsgs r`Ú
_f_dir_from_tz'FillBetweenPolyCollection._f_dir_from_t6s0ð ˜ ØØ
˜
Øà¸ÐHˆCܘS“/Ð !racó8|j|j«S)z4The direction that is other than `self.t_direction`.)res r`Ú _f_directionz&FillBetweenPolyCollection._f_directionAsð×! $×"2Ñ"2Ó3ra)có¼|jj|j|j|||«\}}}|j ||||«}|j |«y)a-
Set new values for the two bounding curves.
Parameters
----------
t : array-like
The ``self.t_direction`` coordinates of the nodes defining the curves.
f1 : array-like or float
The other coordinates of the nodes defining the first curve.
f2 : array-like or float
The other coordinates of the nodes defining the second curve.
where : array-like of bool, optional
Define *where* to exclude some {dir} regions from being filled.
The filled regions are defined by the coordinates ``t[where]``.
More precisely, fill between ``t[i]`` and ``t[i+1]`` if
``where[i] and where[i+1]``. Note that this definition implies
that an isolated *True* value between two *False* values in *where*
will not result in filling. Both sides of the *True* position
remain unfilled due to the adjacent *False* values.
See Also
--------
.PolyCollection.set_verts, .Line2D.set_data
N)rwÚ_fill_between_process_unitsrß)r]s r`Úset_dataz"FillBetweenPolyCollection.set_dataFsYð8—I‘I× × Ñ ˜d×°B¸ó<‰ ˆˆ2ˆrð× Ñ   B¨¨EÓØ racó tjj«}|j|j «|z
j t
j|j|jjgg«««|S)z7Calculate the data limits and return them as a `.Bbox`.)
rr~rr“r|rrTÚ_bboxÚminpos)r]r”Údatalims r`r˜z%FillBetweenPolyCollection.get_datalimhseä—//×(ˆØ×# T×%7Ñ%7Ó%9¸IÑ%E×$PÑ$PÜ N‰N˜DŸJ™J¨¯©×):Ñ):Ð(;Ð %?ô @àˆracó‚|j|j|j|||«|j||||«}t j
t j |«||d¬«\}}}tjj«|_
|jj|jt j||fDcgc]!}t j||||fd¬«Œ#c}«««tj |«Dcgc]\}}|j#|||||«Œc}}Scc}wcc}}w)zH
Make verts that can be forwarded to `.PolyCollection`.
T)ÚsubokrË)Ú_validate_shapesrßÚ_get_data_maskrTÚbroadcast_arraysrrr~rr“Ú_fix_pts_xy_orderrÎÚstackr Úcontiguous_regionsÚ_make_verts_for_region)r]Úidx0Úidx1s r`z%FillBetweenPolyCollection._make_vertsos ð
×јd××0AÑ0AÀ1ÀbÈ"Ô×# A r¨2¨uÓ5ˆÜׯ
©
°aÓ(8¸"¸ÔM‰ ˆˆ2ˆ—_‘_׌
Ø
×& t×'=Ñ'=¼b¿n¹nØ>@À"¸NGØ89ŒBH‰Ha˜h  ÐÖ NGó?Hó(Iô Jô
$×6°uÓ
á
× ¨2¨r°4¸Õ 
ð
ùòNGùó
s Ã&D6ÄD;c
ó†|d}nptj|t¬«}|j|jk7r<dj |j|j
|j«}t
|«|tjtjttjj|||g««zS)
Return a bool array, with True at all points that should eventually be rendered.
The array is True at a point if none of the data inputs
*t*, *f1*, *f2* is masked and if the input *where* is true at that point.
TrÉz-where size ({}) does not match {!r} size ({}))
rTr r!rTÚformatrßÚ functoolsÚreduceÚ
logical_orÚmapr†Ú getmaskarray)r]s r`z(FillBetweenPolyCollection._get_data_masks ð ˆ=؉Eä—J‘J˜u¬DÔ1ˆEØz‰z˜QŸV™VÒ—JJ × 0Ñ 0°!·&±&ó:ä  “oМ × M‰Mœ3œrŸu™u×1°A°r¸2°;ÓAðAñAð Aracópdt|||fd«D«}t||||g«D\}}|jdkDrt|d«|jdkDsŒ3|jdkDsŒC|j|jk7sŒ]dj ||j||j«}t|«y)zFValidate that t, f1 and f2 are 1-dimensional and have the same length.c3ó,K|] \}}||zŒy­wrc)rÚss r`r­z=FillBetweenPolyCollection._validate_shapes.<locals>.<genexpr>sèø€ÒN™4˜1˜aQ•ÑNùs)Ú2rz is not 1-dimensionalz4{!r} has size {}, but {!r} has an unequal size of {}N)rrQrTrÿ) Út_dirÚf_dirrãÚnamesr rls r`z*FillBetweenPolyCollection._validate_shapes“ñO¤3¨¨u°eÐ'<¸nÓ#MÔNˆÜ˜u q¨"¨b  &‰KˆDz‰z˜AŠ~Ü  D 8Ð+@Ð!AÓv‰v˜‹z˜eŸj™j¨1›n°·±¸5¿:¹:Ó1Eؘ1Ÿ6™6 4¨¯©ó5ä  “oÐ
 &rac ó2|||}|||}|||}|j.tjd|jz} | |||«\}}}|jr)|j ||||«}
|j ||||«} n|d|df}
|d|df} t j t j|
g«t j||fd¬«t j| g«t j||fd¬«dddf«} |j| «S)z
Make ``verts`` for a contiguous region between ``idx0`` and ``idx1``, taking
into account ``step`` and ``interpolate``.
Nzsteps-r)
r ÚSTEP_LOOKUP_MAPràÚ_get_interpolating_pointsrTr )
r]Út_sliceÚf1_sliceÚf2_sliceÚ step_funcÚstartÚendÚptss
r`z0FillBetweenPolyCollection._make_verts_for_regionŸs)ð
Ød˜4Ød˜4Ø :‰:Ð ×-¨h¸¿¹Ñ.CÑDˆIÙ*3°G¸XÀxÓ*PÑ 'ˆGX˜ × Ò Ø×2°1°b¸"¸Cˆ×°B¸¸DÓA‰Cð˜A‘J ¨¡ Ð+ˆEؘ"‘+˜x¨™|Ð+ˆn‰nÜ J‰J˜ Ü H‰Hg˜xÐ(¨rÔ J‰J˜ Ü H‰Hg˜xÐ(¨rÔ 2±4°R°4Ñ ð ×% *racó‚t|dz
d«}|||dz}|||dz|||dzz
}|||dz}t|«dk(rXtjj |d«r
||||fStjj |d«r
||||fS|j d||«} |j | ||«}
| |
fS)zCalculate interpolating points.rrr5)r€rTr†Ú is_maskedÚ_get_diff_root) ÚclsrãÚidxÚim1Út_valuesÚ diff_valuesÚ f1_valuesÚ diff_root_tÚ diff_root_fs r`rz3FillBetweenPolyCollection._get_interpolating_points¼ô#˜‘'˜1oˆØS˜˜Q™Ø˜˜™Um b¨¨S°©U mÑ Øs˜3˜q™5Mˆ ä ˆ{Ó ˜qÒ Üu‰u˜{¨1™~Ô˜v˜r #™wР¨Q¡Ô˜‘v˜r #™wÐרK¸Ó Ø×°hÀ ÓJˆ ؘ'racó\|j«}tj|||||«S)zCalculate diff root.)rT)ÚxpÚfpÚorders r`rz(FillBetweenPolyCollection._get_diff_rootÎs*ð
ˆÜy‰y˜˜B˜u™I r¨%¡yÓ1racó<|jdk(r |dddddfS|S)
Fix pts calculation results with `self.t_direction`.
In the workflow, it is assumed that `self.t_direction` is 'x'. If this
is not true, we need to exchange the coordinates.
NrË))r]rs r`z+FillBetweenPolyCollection._fix_pts_xy_orderÔs(ð $×/°3Ò6ˆs’1d˜d7‰|Ð?¸?ra)r´r[r\r]r7raÚpropertyrêr˜Ú classmethodrrrbrcs@r`ìø„ñð
 E°öD*ðLñðñð,0ô òDò
ò$Að$ñ ð +ð:ñð(ð"ñð
@racó¤eZdZdZej
j ZejdzZ
dddœˆfd
Z dZ dZ
ejd „«ZˆxZS)
ÚRegularPolyCollectionz)A collection of n-sided regular polygons.çà¿r)r)Úrotationroc óÖt|di|¤Ž|j|«||_|j |«g|_||_|jtj««y)
Parameters
----------
numsides : int
The number of sides of the polygon.
rotation : float
The rotation of the polygon in radians.
sizes : tuple of float
The area of the circle circumscribing the polygon in points^2.
**kwargs
Forwarded to `.Collection`.
Examples
--------
See :doc:`/gallery/event_handling/lasso_demo` for a complete example::
offsets = np.random.rand(20, 2)
facecolors = [cm.jet(x) for x in np.random.rand(20)]
collection = RegularPolyCollection(
numsides=5, # a pentagon
rotation=0, sizes=(50,),
facecolors=facecolors,
edgecolors=("black",),
linewidths=(1,),
offsets=offsets,
offset_transform=ax.transData,
)
Nr«)
r6r7rrÚ _numsidesÚ_path_generatorr\Ú _rotationÚ
set_transformrrs)r]Únumsidesr,ror^r_s €r`r7zRegularPolyCollection.__init__äs\ø€ôF ÑÑ"˜ ØŒØ×+¨HÓŒ ØŒØ ×Ñœ:×:racó|jSrc)r.res r`Ú get_numsidesz"RegularPolyCollection.get_numsidesó Ø~‰~Ðracó|jSrc)r0res r`Ú get_rotationz"RegularPolyCollection.get_rotationr5racóZ|j|j|jd¬«j«|jDcgc]?}t j |«j|j «j«ŒAc}|_tj||«ycc}wrt) rrrhrprnrÚrotater0Ú
get_matrixr&)r]s r`zRegularPolyCollection.drawsà t—{{ D§O¡O¸ OÓ$>×$BÑ$BÔ×
àô
× Ñ  Ó "× )¨4¯>©>¨/Ó :× 
ˆÔô ˜˜hÕ'ùò

sÁAB()r´r[r\r]Úunit_regular_polygonr/rTÚpirnr7r4r7rr`rbrcs@r`r*r*ÞsTø„Ù—j‘j×5€OØe‰e˜‰o€Gð
Øö (;òTòð ×Ññ ô(rar*có<eZdZdZej
j Zy)ÚStarPolygonCollectionz:Draw a collection of regular stars with *numsides* points.N)r´r[r\r]Úunit_regular_starr/rar`r>r> sÙ—jj×2Orar>có<eZdZdZej
j Zy)ÚAsteriskPolygonCollectionz>Draw a collection of regular asterisks with *numsides* points.N)r´r[r\r]Úunit_regular_asteriskr/rar`rArA%sÙ—jj×6OrarAcóŽeZdZdZdZddœˆfd
ZdZeZeZdZ dZ
d „Z d
Z d Z
ˆfd Zd
ZeZdZeZdZdZdZdZˆxZS)ÚLineCollectiona­
Represents a sequence of `.Line2D`\s that should be drawn together.
This class extends `.Collection` to represent a sequence of
`.Line2D`\s instead of just a sequence of `.Patch`\s.
Just as in `.Collection`, each property of a *LineCollection* may be either
a single value or a list of values. This list is then used cyclically for
each element of the LineCollection, so the property of the ``i``\th element
of the collection is::
prop[i % len(prop)]
The properties of each member of a *LineCollection* default to their values
in :rc:`lines.*` instead of :rc:`patch.*`, and the property *colors* is
added in place of *edgecolors*.
Tr5)r1c ón|jdd«t|dd|i|¤Ž|j|«y)
Parameters
----------
segments : list of (N, 2) array-like
A sequence ``[line0, line1, ...]`` where each line is a (N, 2)-shape
array-like containing points::
line0 = [(x0, y0), (x1, y1), ...]
Each line can contain a different number of points.
linewidths : float or list of float, default: :rc:`lines.linewidth`
The width of each line in points.
colors : :mpltype:`color` or list of color, default: :rc:`lines.color`
A sequence of RGBA tuples (e.g., arbitrary color strings, etc, not
allowed).
antialiaseds : bool or list of bool, default: :rc:`lines.antialiased`
Whether to use antialiasing for each line.
zorder : float, default: 2
zorder of the lines once drawn.
facecolors : :mpltype:`color` or list of :mpltype:`color`, default: 'none'
When setting *facecolors*, each line is interpreted as a boundary
for an area, implicitly closing the path from the last point to the
first point. The enclosed area is filled with *facecolor*.
In order to manually specify what should count as the "interior" of
each line, please use `.PathCollection` instead, where the
"interior" can be specified by appropriate usage of
`~.path.Path.CLOSEPOLY`.
**kwargs
Forwarded to `.Collection`.
rr1Nr«)Ú
setdefaultr6r7Ú set_segments)r]Úsegmentsr1r^r_s €r`r7zLineCollection.__init__>sCø€ðL ×ј,¨Ô
Ññ Øð àò ð
×ј#rac ó|y|Dcgc]h}t|tjj«rt j
|«n,t j
tj |t««Œjc}|_d|_ ycc}wri)
rtrTr†r‡r rVr\rj)r]rHÚsegs r`rGzLineCollection.set_segmentsjslØ Ð Ø ð#+öô+5°S¼"¿%¹%×:KÑ:KÔ*L”u—zz #”Ü!ŸJ™J¤r§z¡z°#´uÓ'=Ó,ˆŒ ðˆ
ùò,sˆA-BcóÌg}|jD]L}|jd¬«Dcgc]\}}|Œ }}}tj|«}|j |«ŒN|Scc}}w)
Returns
-------
list
List of segments in the LineCollection. Each list item contains an
array of vertices.
F)Úsimplify)r\Ú
iter_segmentsrTr )r]rHrÚvertexÚ_ržs r`Ú get_segmentszLineCollection.get_segmentsvsuðˆà—K‘Kò
&ˆ×%¨uÐ
áF˜AòðˆHñô—z‘z (Ó+ˆHØ O‰O˜ 
ˆùós§ A có(tjdS)Nzlines.linewidthrres r`rz%LineCollection._get_default_linewidthŽsÜ|‰|Ð.racó(tjdS)Nzlines.antialiasedrres r`rz'LineCollection._get_default_antialiasedsÜ|‰|Ð0racó(tjdS)Nz lines.colorrres r`r9z%LineCollection._get_default_edgecolor”sÜ|‰|˜*racóy)Nr°res r`r(z%LineCollection._get_default_facecolor—sØracótt||«|j|j|j«yyrc)r6rDr=Ú set_gapcolorÚ_original_gapcolor)r]rCr_s €r`rDzLineCollection.set_alphašs3ø€ä
ј Ø >‰>Ð × Ñ ˜d×  &racó&|j|«y)aH
Set the edgecolor(s) of the LineCollection.
Parameters
----------
c : :mpltype:`color` or list of :mpltype:`color`
Single color (all lines have same color), or a
sequence of RGBA tuples; if it is a sequence the lines will
cycle through the sequence.
N)rHr$s r`r&zLineCollection.set_color sð
×ј1Õracó|jSrc)r7res r`Ú get_colorzLineCollection.get_color¯rpracó4||_|j|«y)a1
Set a color to fill the gaps in the dashed line style.
.. note::
Striped lines are created by drawing two interleaved dashed lines.
There can be overlaps between those two, which may result in
artifacts when using transparency.
This functionality is experimental and may change.
Parameters
----------
gapcolor : :mpltype:`color` or list of :mpltype:`color` or None
The color with which to fill the gaps. If None, the gaps are
unfilled.
N)rWÚ
_set_gapcolor©r]Úgapcolors r`rVzLineCollection.set_gapcolor´sð$#+ˆÔØ ×ј8Õ$racód| tj||j«}||_d|_yri)rAr*r+r=rjr]s r`r\zLineCollection._set_gapcolorÉs,Ø Ð Ü×,¨X°t·{±{ÓCˆH،؈
racó|jSrc)r=res r`Ú get_gapcolorzLineCollection.get_gapcolorÏr5rac
óHt|jtj|j««Dcgc]W\}}|dk(r9t j tjdtj««|fn|tj|ŽfŒY}}}t|ŽScc}}w)a%
Returns the path and pattern for the gaps in the non-solid lines.
This path and pattern is the inverse of the path and pattern used to
construct the non-solid lines. For solid lines, we set the inverse path
to nans to prevent drawing an inverse line.
r3) rr\Ú itertoolsÚcycler:rTÚfullr‰rÚ_get_inverse_dash_pattern)r]rrÚ
path_patternss r`z,LineCollection._get_inverse_paths_linestylesÒs•ô
 œYŸ_™_¨T×-=Ñ-=Ó AñôZ‰ZœŸ ¬¯©Ó
0°"Ñ
”6×3°RÐ 
Aˆ
ñAô"ùóAs·AB)r´r[r\r]r;r7rGrlrPrrr9r(rDr&Ú
set_colorsrZÚ
get_colorsrVr\rarbrcs@r`rDrD*suø„ñð"€Mðö*$òXð€IØ€Iòò0ô ð€Jò ð€Jò%ò*ò ö#rarDcóžeZdZdZdZ ddddddddœˆfd Zd „Zd
Zd ZexZ Z
d Z d
Z dZ
dZdZdZdZdZˆfdZˆfdZdZˆxZS)ÚEventCollectionzÐ
A collection of locations along a single axis at which an "event" occurred.
The events are given by a 1-dimensional array. They do not have an
amplitude and are displayed as parallel lines.
TrrNr))Ú
lineoffsetÚ
linelengthr#r€r"rc óžt
|gf||||dœ| ¤Žd|_||_||_|j |«|j
|«y)aY
Parameters
----------
positions : 1D array-like
Each value is an event.
orientation : {'horizontal', 'vertical'}, default: 'horizontal'
The sequence of events is plotted along this direction.
The marker lines of the single events are along the orthogonal
direction.
lineoffset : float, default: 0
The offset of the center of the markers from the origin, in the
direction orthogonal to *orientation*.
linelength : float, default: 1
The total height of the marker (i.e. the marker stretches from
``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
linewidth : float or list thereof, default: :rc:`lines.linewidth`
The line width of the event lines, in points.
color : :mpltype:`color` or list of :mpltype:`color`, default: :rc:`lines.color`
The color of the event lines.
linestyle : str or tuple or list thereof, default: 'solid'
Valid strings are ['solid', 'dashed', 'dashdot', 'dotted',
'-', '--', '-.', ':']. Dash tuples should be of the form::
(offset, onoffseq),
where *onoffseq* is an even length tuple of on and off ink
in points.
antialiased : bool or list thereof, default: :rc:`lines.antialiased`
Whether to use antialiasing for drawing the lines.
**kwargs
Forwarded to `.LineCollection`.
Examples
--------
.. plot:: gallery/lines_bars_and_markers/eventcollection_demo.py
)rrr rTN)r6r7Ú_is_horizontalÚ _linelengthÚ _lineoffsetÚset_orientationÚ
set_positions) r]Ú positionsÚ orientationrlrmr#r€r"rr^r_s €r`r7zEventCollection.__init__îsdø€ô` јð #Ø$-¸)Ø %°KñÔØÔØÔØ ×ј[Ô ×ј9Õ%racóz|j«rdnd}|j«Dcgc] }|d|fŒ c}Scc}w)zX
Return an array containing the floating-point values of the positions.
rr)Ú
is_horizontalrP)r]ÚposÚsegments r`Ú
get_positionszEventCollection.get_positions(s;ð×'‰a¨QˆØ/3×/@Ñ/@Ó/BÖC G˜˜ÒCùÒCs§8có¶|g}tj|«dk7r td«|j«}|j «}|j «rdnd}tj t|«ddf«}tj|«dddf|dddd|f<||dz z|dddd|z
f<||dz z
|dddd|z
f<|j|«y)z Set the positions of the events.Nrz!positions must be one-dimensionalrr5)
rTrQÚget_lineoffsetÚget_linelengthrwr^r€ÚsortrG)r]rtrlrmÚpos_idxrHs r`rszEventCollection.set_positions/à Р؈IÜ
7‰7  Ò Ð ×
Ø×*ˆ
Ø×+‘!°ˆÜ—8‘8œS ›^¨Q°Ð3ˆÜ"$§'¡'¨)Ó"4²Q¸°WÑ"=ˆAwÑØ&0°:À±>Ñ&AˆAq˜7#Ø&0°:À±>Ñ&AˆAq˜7 ×ј#racóÔ|t|d«rt|«dk(ry|j«}tj|tj
|«g«}|j
|«y)z2Add one or more events at the specified positions.Nr€r)rvr€rzrTÚhstackrUrs)r]Úpositionrts r`Ú
add_positionszEventCollection.add_positions>sXà Ð ¤¨°%Ô 8Ü # H£
°Ò 2Ø Ø×(ˆ Ü—II˜y¬"¯-©-¸Ó*AÐCˆ Ø ×ј%racó|jS)z=True if the eventcollection is horizontal, False if vertical.)rores r`rwzEventCollection.is_horizontalHsà×"racó*|j«rdSdS)zX
Return the orientation of the event line ('horizontal' or 'vertical').
Ú
horizontalÚvertical)rwres r`Úget_orientationzEventCollection.get_orientationLsð $×3ˆC¸ÐCracóÖ|j«}t|«D]\}}tj|«||<Œ|j |«|j « |_d|_y)zv
Switch the orientation of the event line, either from vertical to
horizontal or vice versus.
TN)rPÚ enumeraterTÚfliplrrGrwrorj)r]rHÚirys r`Úswitch_orientationz"EventCollection.switch_orientationRseð
×&ˆÜ#  -‰JˆAˆŸ)™) ,ˆHQŠKð ×ј#Ø"&×"4Ñ"4Ó"6Ð6ˆÔ؈
racó€tjdddœ|¬«}||j«k(ry|j«y)z
Set the orientation of the event line.
Parameters
----------
orientation : {'horizontal', 'vertical'}
TF)r†r‡)ruN)rÚ
check_getitemrwr)r]rurws r`rrzEventCollection.set_orientation^sAôרUÑ 
ð ˜D× Ø ×ÑÕ!racó|jS)z7Return the length of the lines used to mark each event.)rpres r`r}zEventCollection.get_linelengthmóà×ÑÐracó||j«k(ry|j«}|j«}|j«rdnd}|D]}||dz z|d|f<||dz z
|d|f<Œ|j |«||_y)z4Set the length of the lines used to mark each event.Nrrç@)r}r|rPrwrGrp)r]rmrlrHrxrys r`Úset_linelengthzEventCollection.set_linelengthqó—à ˜× Ø×
Ø×&ˆØ×'‰a¨QˆØò ;ˆ(¨:¸©?Ñ:ˆGAsF‰OØ(¨:¸©?Ñ:ˆGAsFŠOð
×ј(ÔÕracó|jS)z7Return the offset of the lines used to mark each event.)rqres r`r|zEventCollection.get_lineoffset~rracó||j«k(ry|j«}|j«}|j«rdnd}|D]}||dz z|d|f<||dz z
|d|f<Œ|j |«||_y)z4Set the offset of the lines used to mark each event.Nrrr“)r|r}rPrwrGrq)r]rlrmrHrxrys r`Úset_lineoffsetzEventCollection.set_lineoffsetr•racó&t|«dS)z3Get the width of the lines used to mark each event.r©r6rF©r]r_s €r`rFzEventCollection.get_linewidthsø€ä‰wÑ& )racó t|«Srcrs €r`zEventCollection.get_linewidths“sø€Ü‰wÑ&racó(|j«dS)z6Return the color of the lines used to mark each event.r)rires r`rZzEventCollection.get_colorsàÓ  Ñ#ra)r†)r´r[r\r]r;r7rzrsÚextend_positionsÚappend_positionsrwrˆrrrr}r”r|r˜rFrZrbrcs@r`rkrkäs‰ø„ñð€Mð8ØØØØ8&òtDò
+8ÐÐDò
ò
 ò  ò $rarkcó@eZdZdZej
dzZˆfdZˆxZS)ÚCircleCollectionz-A collection of circles, drawn using splines.r+c óÔt|di|¤Ž|j|«|jt j
««t jj«g|_ y)
Parameters
----------
sizes : float or array-like
The area of each circle in points^2.
**kwargs
Forwarded to `.Collection`.
Nr«)
r6r7rrr1rrsÚ unit_circler\)r]ror^r_s €r`r7zCircleCollection.__init__ sOø€ô ÑÑ"˜ Ø ×Ñœ:×—z‘z×0ˆ ra) r´r[r\r]rTr<rnr7rbrcs@r`sø„Ùe‰e˜‰o€G÷  1racózeZdZdZddœˆfd
ZdZdZdZdZd „Z d
Z
d Z e jˆfd «ZˆxZS)
ÚEllipseCollectionz.A collection of ellipses, drawn using splines.Úpoints)Úunitsc óZt|di|¤Ž|j|«|j|«|j |«||_|j
tj««tjd«|_ tjj«g|_y)
Parameters
----------
widths : array-like
The lengths of the first axes (e.g., major axis lengths).
heights : array-like
The lengths of second axes.
angles : array-like
The angles of the first axes, degrees CCW from the x-axis.
units : {'points', 'inches', 'dots', 'width', 'height', 'x', 'y', 'xy'}
The units in which majors and minors are given; 'width' and
'height' refer to the dimensions of the axes, while 'x' and 'y'
refer to the *offsets* data units. 'xy' differs from all others in
that the angle as plotted varies with the aspect ratio, and equals
the specified angle only when the aspect ratio is unity. Hence
it behaves the same as the `~.patches.Ellipse` with
``axes.transData`` as its transform.
**kwargs
Forwarded to `Collection`.
r'Nr«)r6r7Ú
set_widthsÚ set_heightsÚ
set_anglesÚ_unitsr1rrsrTr^rnr\)r]ÚwidthsÚheightsÚanglesr§r^r_s €r`r7zEllipseCollection.__init__²sø€ô* ÑÑ"˜ ˜ÔØ ×Ñ˜Ô ˜Ô؈Œ Ø ×Ñœ:ן8™8 IÓÔÜ—z‘z×0ˆ racó¦|j}|jd¬«}|jdk(rd}n+|jdk(r.|jj|j
jz }nî|jdk(r.|jj |j
j z }n±|jdk(r
|j}n•|jdk(r|jd z }nv|jd
k(r|jj}nP|jd k(r|jj }n*|jd k(rd
}ntd|j«tjt|j«ddf«|_
|j|z}|j|z}tj|j «}tj"|j «}||z|jddddf<|| z|jddddf<||z|jddddf<||z|jddddf<d
|jddddf<t$j&}|jdk(rY|j(j+«j-«j/«} d| ddddf<|j1|| ««yy)z0Calculate transforms immediately before drawing.Fr®rÚinchesr¦rkÚdotsrfzUnrecognized units: r(Nrr5)rwr—ÚviewLimrËrprTr€Ú_widthsrnÚ_heightsÚsinÚ_anglesÚcosrr”r:Úcopyr1)
r]ÚaxÚfigÚscr­Ú sin_angleÚ cos_angleÚ_affineÚms
r`Ú_set_transformsz!EllipseCollection._set_transformsÐsPðY‰YˆØo‰o 5ˆoÓà ;‰;˜$Ò ØŠBØ
[‰[˜
Ø §¡×!1Ñ!1Ñ1‰BØ
[‰[˜
Ø "§*¡*×"3Ñ"3Ñ3‰BØ
[‰[˜
‰BØ
[‰[˜
˜4‰BØ
[‰[˜
‰BØ
[‰[˜
‰BØ
[‰[˜
‰BäÐ3°D·K±K°?Ð Ÿ8™8¤S¨¯©Ó%6¸¸1Ð$=ÓÔØ Ñ"ˆØ—-- $ˆÜ—FF˜4Ÿ<™<Ó(ˆ Ü—FF˜4Ÿ<™<Ó(ˆ Ø$*¨YÑ$6ˆ×Ñš˜A˜q˜Ñ!Ø$+¨y¨jÑ$8ˆ×Ñš˜A˜q˜Ñ!Ø$*¨YÑ$6ˆ×Ñš˜A˜q˜Ñ!Ø$+¨iÑ$7ˆ×Ñš˜A˜q˜Ñ!Ø$'ˆ×Ñš˜A˜q˜Ñר ;‰;˜$Ò Ø ×)×6×=ˆˆAˆbˆqˆb!"ˆf‰IØ × Ñ ™w q  racóhdtj|«j«z|_d|_y)z5Set the lengths of the first axes (e.g., major axis).çà?TN)rTr Úravelr´rj)r]r­s r`zEllipseCollection.set_widthsús'àœRŸZ™Z¨ÓŒ ؈
racóhdtj|«j«z|_d|_y)ú2Set the lengths of second axes (e.g., minor axes).rÃTN)rTr rj)r]s r`zEllipseCollection.set_heightsÿs'àœbŸj™j¨ÓŒ
؈
racóbtj|«j«|_d|_y)z>Set the angles of the first axes, degrees CCW from the x-axis.TN)rTÚdeg2radrÄrj)r]s r`zEllipseCollection.set_angless"ä—zz 1ˆŒ ؈
racó |jdzS)z5Get the lengths of the first axes (e.g., major axis).r5)r´res r`Ú
get_widthszEllipseCollection.get_widths sà|‰|˜Ðracó |jdzS)r5)res r`Ú get_heightszEllipseCollection.get_heights
sà}‰}˜ Ð racó@tj|j«S)z>Get the angles of the first axes, degrees CCW from the x-axis.)rTÚrad2degr·res r`Ú
get_angleszEllipseCollection.get_anglessäz‰z˜$Ÿ,™,Ó'racóD|j«t| |«yrc)r6rus €r`zEllipseCollection.drawsø€à ×ÑÔÜ
 ra)r´r[r\r]r7rr`rbrcs@r`¯sLø„Ù8à9Aö1ò<(+òTò
ò
ò
 ò ×Ñóó ôracó.eZdZdZddœˆfd
ZdZˆxZS)ÚPatchCollectionzá
A generic collection of patches.
PatchCollection draws faster than a large number of equivalent individual
Patches. It also makes it easier to assign a colormap to a heterogeneous
collection of patches.
F)Úmatch_originalc ó¼|r d}|Dcgc]
}||«Œ c}|d<|Dcgc]}|j«Œc}|d<|Dcgc]}|j«Œc}|d<|Dcgc]}|j«Œc}|d<|Dcgc]}|j«Œc}|d<t |di|¤Ž|j
|«ycc}wcc}wcc}wcc}wcc}w) a?
Parameters
----------
patches : list of `.Patch`
A sequence of Patch objects. This list may include
a heterogeneous assortment of different patch types.
match_original : bool, default: False
If True, use the colors and linewidths of the original
patches. If False, new colors may be assigned by
providing the standard collection arguments, facecolor,
edgecolor, linewidths, norm or cmap.
**kwargs
All other parameters are forwarded to `.Collection`.
If any of *edgecolors*, *facecolors*, *linewidths*, *antialiaseds*
are None, they default to their `.rcParams` patch setting, in
sequence form.
Notes
-----
The use of `~matplotlib.cm.ScalarMappable` functionality is optional.
If the `~matplotlib.cm.ScalarMappable` matrix ``_A`` has been set (via
a call to `~.ScalarMappable.set_array`), at draw time a call to scalar
mappable will be made to set the face colors.
cóJ|j«r|j«Sgd¢S)N)rrrr)rW)Úpatchs r`Údetermine_facecolorz5PatchCollection.__init__.<locals>.determine_facecolorBs!Ø—> ×#rarrrrrNr«)rFrHrr6r7rl)r]ÚpatchesrÓr^r×rr_s €r`r7zPatchCollection.__init__$ø€ñ: ò
ELÖ#L¸qÑ$7¸Õ$:Ò#LˆF Ø?FÖ#G¸! A§O¡OÕ$5Ò#GˆF Ø?FÖ#G¸! A§O¡OÕ$5Ò#GˆF Ø?FÖ#G¸! A§O¡OÕ$5Ò#GˆF ØCJÖ%K¸a a×&7Ñ&7Õ&9Ò%KˆF 
ÑÑ"˜ ùò$MùÚ#GùÚ#GùÚ#GùÚ%KsC¤C
ÁCÁ&CÂCcó|Dcgc]/}|j«j|j««Œ1}}||_ycc}wrc)r|Útransform_pathÚget_pathr\)r]rrks r`rlzPatchCollection.set_pathsQsCàðÓ1°!·*±*³,Õðˆ ùò#s…4A)r´r[r\r]r7rlrbrcs@r`sø„ñð38ö+ öZracóbeZdZdZˆfdZdZdZed«Ze jd«Z ˆxZ S)ÚTriMeshz™
Class for the efficient drawing of a triangular mesh using Gouraud shading.
A triangular mesh is a `~matplotlib.tri.Triangulation` object.
c óRt|di|¤Ž||_d|_tj
j
«|_tj|jjdd«|jjdd«f«}|jj|«y)gouraudrËr)r6r7Ú_triangulationÚ_shadingrr~ÚunitrïrTrrUr“)r]Ú
triangulationr^r_s €r`r7zTriMesh.__init__]s„ø€Ü
ÑÑ"˜+ˆÔØ!ˆŒ
ä—_‘_׌
ôY‰Y˜
Ÿ×°AÓ×°AÓà
×& *racóR|j|j«|jSrc©r\rlres r`rfzTriMesh.get_pathsjó Ø ;‰;Ð Ø N‰NÔ Ø{‰{ÐracóD|j|j«|_yrc)Úconvert_mesh_to_pathsràr\res r`rlzTriMesh.set_pathsosØ××1DÑ1DÓEˆ racóØ|j«}tj|j||j|fd¬«}|Dcgc]}t j |«Œc}Scc}w)
Convert a given mesh into a sequence of `.Path` objects.
This function is primarily of use to implementers of backends that do
not directly support meshes.
)Úget_masked_trianglesrT)ÚtriÚ trianglesrÆs r`zTriMesh.convert_mesh_to_pathsrsUð×.ˆ ܘ#Ÿ%™%  Ñ*¨C¯E©E°)Ñ,<Ð=ÀBÔGˆØ',Ö- !”
˜1•
Ò-ùÒ-sÁA'cóÀ|j«sy|j|jj|j «¬«|j «}|j }|j«}tj|j||j|fd¬«}|j«|j|}|j«}|j|«|j!|j#«d«|j%||||j'««|j)«|j+|jj«y)N)ÚgidrËr)r_r´r|rTr,r¸rIrFÚdraw_gouraud_trianglesrŽ)r]rr s r`z TriMesh.draw~sà×ÑÔ Ø×јDŸN™N׿¹»ÐÔ×(ˆ ðר×.ˆ ä˜#Ÿ%™%  Ñ*¨C¯E©E°)Ñ,<Ð=ÀBÔGˆà ××! ,ˆà
_‰_Ó
ˆØ ×ј"ÔØ
×ј×-¨aÑרE°6¸9×;KÑ;KÓ;MÔ
Œ Ø×јTŸ^™^×5ra)
r´r[r\r]r7rfrlrarr`rbrcs@r`WsFø„ñô
ò