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

2321 lines
197 KiB
Plaintext
Raw Normal View History

Ë
†RjÈ„ã ó^—dZddlZddlZddlZddlmZmZddlZddlm Z ddl
m Z ddl m
Z
ddlZddlZddlmZmZmZmZmZmZmZmZdd lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%dd
l&m'Z'dd l(m)Z)m*Z*ejVejXd gd
gdgdgdgdœ«Gd„dejZ«««Z.Gd„de.«Z/Gd„de.«Z0Gd„de.«Z1Gd„de.«Z2Gd„de2«Z3Gd„de.«Z4Gd „d!e.«Z5Gd"„d#e.«Z6Gd$„d%e4«Z7ejVjqd&jsejte7jv«xsd'jy«d(d«¬)«Gd*„d+e1«Z=Gd,„d-e.«Z>Gd.„d/e.«Z?Gd0„d1e>«Z@Gd2„d3e>«ZAdGd4„ZBdHd5„ZCGd6„d7«ZDdIdd8œd9„ZEejVGd:„d;eD««ZFejVGd<„d=eD««ZGd>„ZHejVGd?„d@eD««ZIGdA„dBe.«ZJGdC„dDe.«ZKGdE„dFeK«ZLy)Jz>
Patches are `.Artist`\s with a face color and an edge color.
éN)ÚNumberÚReal)ÚSimpleNamespace)Ú
namedtuple)ÚAffine2Dé)Ú_apiÚartistÚcbookÚcolorsÚ
_docstringÚhatchÚlinesÚ
transforms)ÚNonIntersectingPathExceptionÚ get_cos_sinÚget_intersectionÚ
get_parallelsÚ
inside_circleÚmake_wedged_bezier2Ú)split_bezier_intersecting_with_closedpathÚsplit_path_inout)ÚPath)Ú JoinStyleÚCapStyleÚaaÚecÚfcÚlsÚlw)Ú antialiasedÚ edgecolorÚ facecolorÚ linestyleÚ linewidthc 󨇗eZdZdZdZdZdddddddddddœ
ˆfd„
Zd„Zd „Zd/d
„Z d/d „Z
d/d „Z ˆfd
„Z d„Z
d„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zˆfd„Zd„Zd„Zd „Zd!„Z e!e e«Z"e#jHd"„«Z%d#„Z&e#jHd$„«Z'd%„Z(d&„Z)d'„Z*d(„Z+d)„Z,d*„Z-e.j^d+„«Z0d,„Z1d/d-„Z2d.„Z3ˆxZ4S)0ÚPatchzÅ
A patch is a 2D artist with a face color and an edge color.
If any of *edgecolor*, *facecolor*, *linewidth*, or *antialiased*
are *None*, they default to their rc params setting.
rFNT)
r"r#Úcolorr%r$r!rÚfillÚcapstyleÚ joinstylec
 óæ•—t‰ |�«|€d}| €tj} |
€tj
}
t
jtjd«|_
tjd|_ t|«|_
|�+|€|�tjd«|j!|«n"|j#|«|j%|«d|_d|_d|_|j-|«|j/|«|j1|«|j3|«|j5| «|j7|
«t9| «r|j;| «yy)zW
The following kwarg properties are supported
%(Patch:kwdoc)s
NÚsolidz hatch.colorzhatch.linewidthzQSetting the 'color' property will override the edgecolor or facecolor properties.r)rN)ÚsuperÚ__init__rÚbuttrÚmiterr Úto_rgbaÚmplÚrcParamsÚ _hatch_colorÚ_hatch_linewidthÚboolÚ_fillr Ú
warn_externalÚ set_colorÚ
set_edgecolorÚ
set_facecolorÚ
_linewidthÚ_unscaled_dash_patternÚ
_dash_patternÚ
set_linestyleÚ
set_linewidthÚset_antialiasedÚ set_hatchÚ set_capstyleÚ
set_joinstyleÚlenÚ_internal_update)
Úselfr"r#r(r%r$r!rr)r*r+ÚkwargsÚ __class__s
€úU/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/patches.pyr/zPatch.__init__0sAø€ô" ‰ÑÔà Р؈IØ Ð Ü—}‘}ˆHØ Ð Ü!Ÿ™ˆIä"ŸN™N¬3¯<©<¸
Ñ+FÓGˆÔÜ #§ ¡ Ð->Ñ ?ˆÔܘ$“ZˆŒ
Ø Ð ØÐ$¨ Ð(=Ü×"Ñ"ð=ô>ð
�N‰N˜5Õ !à × Ñ ˜yÔ )Ø × Ñ ˜yÔ )àˆŒØ&/ˆÔ#Ø&ˆÔà ×ј9Ô%Ø ×ј9Ô%Ø ×ј[Ô)Ø �‰�uÔØ ×ј(Ô#Ø ×ј9Ô%ä ˆvŒ;Ø × !Ñ ! &Õ )ð ócóˆ—|j«}|j«}|j|«}t|«r|dSgS)uÝ
Return a copy of the vertices used in this patch.
If the patch contains Bézier curves, the curves will be interpolated by
line segments. To access the curves as curves, use `get_path`.
r)Ú
get_transformÚget_pathÚ to_polygonsrF)rHÚtransÚpathÚpolygonss rKÚ get_vertszPatch.get_vertsesC€ð×"Ñ"Ó$ˆØ�}‰}‹ˆØ×#Ñ# EÓ*ˆÜ ˆxŒ=ؘA‘;Р؈ rLcó²—|�|St|jt«r|j}|S|j«ddk(rd}|S|j «}|S)Nér)Ú
isinstanceÚ_pickerrÚ
get_edgecolorÚ
get_linewidth)rHÚradiusÚ_radiuss rKÚ_process_radiuszPatch._process_radiusssd€Ø Р؈MÜ �d—l‘l¤FÔ +Ø—l‘lˆGð ˆð ×!Ñ!Ó# AÑ&¨!Ò+Ø�ðˆð×,Ñ,Ó.�؈rLcó䇇‡—‰j‰«rdifS‰j‰«Š‰j«j}|��‰j«j}t j |tjk(«\}|dd}ttt j||«t j||««}n‰j«g}tˆˆˆfd„|D««}|ifS)aY
Test whether the mouse event occurred in the patch.
Parameters
----------
mouseevent : `~matplotlib.backend_bases.MouseEvent`
Where the user clicked.
radius : float, optional
Additional margin on the patch in target coordinates of
`.Patch.get_transform`. See `.Path.contains_point` for further
details.
If `None`, the default value depends on the state of the object:
- If `.Artist.get_picker` is a number, the default
is that value. This is so that picking works as expected.
- Otherwise if the edge color has a non-zero alpha, the default
is half of the linewidth. This is so that all the colored
pixels are "in" the patch.
- Finally, if the edge has 0 alpha, the default is 0. This is
so that patches without a stroked edge do not have points
outside of the filled region report as "in" due to an
invisible edge.
Returns
-------
(bool, empty dict)
FNrc3óŒ•K—|];}|j‰j‰jf‰j«‰«–—Œ=y­w©N)Úcontains_pointÚxÚyrN)Ú.0ÚsubpathÚ
mouseeventr[rHs €€€rKú <genexpr>z!Patch.contains.<locals>.<genexpr>­sDøèø€ò%ðð
× "Ñ "Ø—‘˜zŸ|™|Ð,¨d×.@Ñ.@Ó.BÀF÷
Lñ%ùsƒAA) Ú_different_canvasr]rOÚcodesÚverticesÚnpÚwhererÚMOVETOÚmapÚsplitÚany)rHrfr[rirjÚidxsÚsubpathsÚinsides``` rKÚcontainszPatch.containssØú€ð> × !Ñ ! *Ô -ؘ"�9Ð Ø×%Ñ% fÓ-ˆØ—
‘
“×%Ñ%ˆØ Ð Ø—}‘}“×/Ñ/ˆHô—H‘H˜U¤d§k¡kÑ1Ó2‰EˆDà˜˜�8ˆDÜÜ”b—h‘h˜x¨Ó.´·±¸ÀÓ0EóG‰HðŸ
™
›Ð(ˆHÜõ%ð$ô%ó%ˆð�rˆzÐrLcó‚—|j|«}|j«j||j«|«S)aØ
Return whether the given point is inside the patch.
Parameters
----------
point : (float, float)
The point (x, y) to check, in target coordinates of
``.Patch.get_transform()``. These are display coordinates for patches
that are added to a figure or Axes.
radius : float, optional
Additional margin on the patch in target coordinates of
`.Patch.get_transform`. See `.Path.contains_point` for further
details.
If `None`, the default value depends on the state of the object:
- If `.Artist.get_picker` is a number, the default
is that value. This is so that picking works as expected.
- Otherwise if the edge color has a non-zero alpha, the default
is half of the linewidth. This is so that all the colored
pixels are "in" the patch.
- Finally, if the edge has 0 alpha, the default is 0. This is
so that patches without a stroked edge do not have points
outside of the filled region report as "in" due to an
invisible edge.
Returns
-------
bool
Notes
-----
The proper use of this method depends on the transform of the patch.
Isolated patches do not have a transform. In this case, the patch
creation coordinates and the point coordinates match. The following
example checks that the center of a circle is within the circle
>>> center = 0, 0
>>> c = Circle(center, radius=1)
>>> c.contains_point(center)
True
The convention of checking against the transformed patch stems from
the fact that this method is predominantly used to check if display
coordinates (e.g. from mouse events) are within the patch. If you want
to do the above check with data coordinates, you have to properly
transform them first:
>>> center = 0, 0
>>> c = Circle(center, radius=3)
>>> plt.gca().add_patch(c)
>>> transformed_interior_point = c.get_data_transform().transform((0, 2))
>>> c.contains_point(transformed_interior_point)
True
)r]rOrarN)rHÚpointr[s rKrazPatch.contains_point³s?€ðr×%Ñ% fÓ-ˆØ�}‰}‹×-Ñ-¨eØ.2×.@Ñ.@Ó.BØ.4ó6ð 6rLcó‚—|j|«}|j«j||j«|«S)aŽ
Return whether the given points are inside the patch.
Parameters
----------
points : (N, 2) array
The points to check, in target coordinates of
``self.get_transform()``. These are display coordinates for patches
that are added to a figure or Axes. Columns contain x and y values.
radius : float, optional
Additional margin on the patch in target coordinates of
`.Patch.get_transform`. See `.Path.contains_point` for further
details.
If `None`, the default value depends on the state of the object:
- If `.Artist.get_picker` is a number, the default
is that value. This is so that picking works as expected.
- Otherwise if the edge color has a non-zero alpha, the default
is half of the linewidth. This is so that all the colored
pixels are "in" the patch.
- Finally, if the edge has 0 alpha, the default is 0. This is
so that patches without a stroked edge do not have points
outside of the filled region report as "in" due to an
invisible edge.
Returns
-------
length-N bool array
Notes
-----
The proper use of this method depends on the transform of the patch.
See the notes on `.Patch.contains_point`.
)r]rOÚcontains_pointsrN)rHÚpointsr[s rKrxzPatch.contains_pointsñs?€ðH×%Ñ% fÓ-ˆØ�}‰}‹×.Ñ.¨vØ/3×/AÑ/AÓ/CØ/5ó7ð 7rLcóÒ•—t‰|�|«|j|_|j|_|j|_|j
|_|j |_|j|_|j|_|j|_ |j|j«|j|j««|j«|_yr`)r.Ú update_fromÚ
_edgecolorÚ
_facecolorÚ_original_edgecolorÚ_original_facecolorr8Ú_hatchr5r>rAr=Ú
set_transformÚget_data_transformÚis_transform_setÚ
_transformSet)rHÚotherrJs €rKr{zPatch.update_froms¸ø€ä
‰Ñ˜EÔ"ð ×*Ñ*ˆŒØ×*Ñ*ˆŒØ#(×#<Ñ#<ˆÔ Ø#(×#<Ñ#<ˆÔ Ø—[‘[ˆŒ
Ø—l‘lˆŒ Ø!×.Ñ.ˆÔØ&+×&BÑ&BˆÔ#Ø ×ј5×+Ñ+Ô,Ø ×ј5×3Ñ3Ó5Ô6ð#×3Ñ3Ó5ˆÕrLcó\—|j«j|j««S)zU
Return the `Patch`'s axis-aligned extents as a `~.transforms.Bbox`.
©rOÚ get_extentsrN©rHs rKrˆzPatch.get_extents-s$€ð�}‰}‹×*Ñ*¨4×+=Ñ+=Ó+?Ó@Ð@rLcób—|j«tjj|«zS)z;Return the `~.transforms.Transform` applied to the `Patch`.)Úget_patch_transformr
ÚArtistrNr‰s rKrNzPatch.get_transform3s%€à×'Ñ'Ó)¬F¯M©M×,GÑ,GÈÓ,MÑMÐMrLcó@—tjj|«S)zo
Return the `~.transforms.Transform` mapping data coordinates to
physical coordinates.
)r
rŒrNr‰s rKr‚zPatch.get_data_transform7s€ô
�}‰}×*Ñ*¨4Ó0Ð0rLcó*—tj«S)aS
Return the `~.transforms.Transform` instance mapping patch coordinates
to data coordinates.
For example, one may define a patch of a circle which represents a
radius of 5 by providing coordinates for a unit circle, and a
transform which scales the coordinates (the patch coordinate) by 5.
)rÚIdentityTransformr‰s rKr‹zPatch.get_patch_transform>s€ô×+Ñ+Ó-Ð-rLcó—|jS)z0Return whether antialiasing is used for drawing.)Ú _antialiasedr‰s rKÚget_antialiasedzPatch.get_antialiasedIs€à× Ñ Ð rLcó—|jS)zReturn the edge color.)r|r‰s rKrYzPatch.get_edgecolorMó €à�‰ÐrLcó—|jS)zReturn the face color.)r}r‰s rKÚ
get_facecolorzPatch.get_facecolorQr”rLcó—|jS)z Return the line width in points.)r=r‰s rKrZzPatch.get_linewidthUr”rLcó—|jS)zReturn the linestyle.)Ú
_linestyler‰s rKÚ
get_linestylezPatch.get_linestyleYr”rLcóJ—|€tjd}||_d|_y)z|
Set whether to use antialiased rendering.
Parameters
----------
aa : bool or None
Nzpatch.antialiasedT)r3r4r‘Ústale)rHrs rKrBzPatch.set_antialiased]s'€ð ˆ:Ü—‘Ð1Ñ2ˆBØˆÔØˆ�
rLcó—d}|€Ctjds|jr |jrtjd}nd}d}t j
||j «|_|r|j|_d|_ y)NTzpatch.force_edgecolorzpatch.edgecolorÚnoneF)
r3r4r8Ú
_edge_defaultr r2Ú_alphar|r5rœ)rHr(Úset_hatch_colors rKÚ_set_edgecolorzPatch._set_edgecolorjsm€ØˆØ ˆ=Ü— ‘ Ð4Ò5ØŸ
š
 d×&8Ò&8ÜŸ ™ Ð%6Ñ7‘à�Ø"'�ä Ÿ.™.¨°· ± Ó<ˆŒÙ Ø $§¡ˆDÔ Øˆ�
rLcó4—||_|j|«y)z{
Set the patch edge color.
Parameters
----------
color : :mpltype:`color` or None
N)r~r¢©rHr(s rKr;zPatch.set_edgecoloryó€ð$)ˆÔ Ø ×јEÕ"rLcó¦—|€tjd}|jr |jnd}t j
||«|_d|_y)Nzpatch.facecolorrT)r3r4r8r r r2r}rœ)rHr(Úalphas rKÚ_set_facecolorzPatch._set_facecolor„s@€Ø ˆ=Ü—L‘LÐ!2Ñ3ˆEØ#Ÿzšz�— ’ ¨qˆÜ Ÿ.™.¨°Ó6ˆŒØˆ�
rLcó4—||_|j|«y)z{
Set the patch face color.
Parameters
----------
color : :mpltype:`color` or None
N)rr¨r¤s rKr<zPatch.set_facecolor‹r¥rLcóH—|j|«|j|«y)a
Set both the edgecolor and the facecolor.
Parameters
----------
c : :mpltype:`color`
See Also
--------
Patch.set_facecolor, Patch.set_edgecolor
For setting the edge or face color individually.
N)r<r;)rHÚcs rKr:zPatch.set_color–s €ð
×ј1ÔØ ×ј1ÕrLcó�•—t‰|�|«|j|j«|j |j
«yr`)r.Ú set_alphar¨rr¢r~)rHr§rJs €rKr­zPatch.set_alpha¦s8ø€ä
‰Ñ˜%Ô Ø ×јD×4Ñ4Ô5Ø ×јD×4Ñ4Õ5rLcó¨—|€tjd}t|«|_t j
g|j ¢|‘­Ž|_d|_y)zu
Set the patch linewidth in points.
Parameters
----------
w : float or None
Nzpatch.linewidthT) r3r4Úfloatr=ÚmlinesÚ
_scale_dashesr>r?rœ©rHÚws rKrAzPatch.set_linewidth­sS€ð
ˆ9Ü— ‘ Ð.Ñ/ˆAÜ ›(ˆŒÜ#×1Ñ1ð-Ø
×
(Ñ
(ð-Ø*+ò-ˆÔàˆ�
rLcóÈ—|€d}|dvrd}||_tj|«|_tjg|j¢|j
‘­Ž|_d|_y)aÅ
Set the patch linestyle.
========================================== =================
linestyle description
========================================== =================
``'-'`` or ``'solid'`` solid line
``'--'`` or ``'dashed'`` dashed line
``'-.'`` or ``'dashdot'`` dash-dotted line
``':'`` or ``'dotted'`` dotted line
``'none'``, ``'None'``, ``' '``, or ``''`` draw nothing
========================================== =================
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 : {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
The line style.
Nr-)ú ÚržÚNoneT)r™r°Ú_get_dash_patternr>r±r=r?rœ)rHrs rKr@zPatch.set_linestyle¼sj€ð2 ˆ:؈BØ
Ð"Ñ "؈B؈ŒÜ&,×&>Ñ&>¸rÓ&BˆÔ#Ü#×1Ñ1ð;Ø
×
(Ñ
(ð;Ø*.¯/©/ò;ˆÔàˆ�
rLcóž—t|«|_|j|j«|j |j
«d|_y)zh
Set whether to fill the patch.
Parameters
----------
b : bool
TN)r7r8r¨rr¢r~rœ©rHÚbs rKÚset_fillzPatch.set_fillßs>€ô˜!“WˆŒ
Ø ×јD×4Ñ4Ô5Ø ×јD×4Ñ4Ô5؈�
rLcó—|jS)z#Return whether the patch is filled.)r8r‰s rKÚget_fillzPatch.get_fillìó €à�z‰zÐrLcó6—t|«}||_d|_y)zß
Set the `.CapStyle`.
The default capstyle is 'round' for `.FancyArrowPatch` and 'butt' for
all other patches.
Parameters
----------
s : `.CapStyle` or %(CapStyle)s
TN)rÚ _capstylerœ)rHÚsÚcss rKrDzPatch.set_capstyleõs€ô�a‹[ˆØˆŒØˆ�
rLcó.—|jjS)zReturn the capstyle.)rÁÚnamer‰s rKÚ get_capstylezPatch.get_capstyles€à�~‰~×"Ñ"Ð"rLcó6—t|«}||_d|_y)zä
Set the `.JoinStyle`.
The default joinstyle is 'round' for `.FancyArrowPatch` and 'miter' for
all other patches.
Parameters
----------
s : `.JoinStyle` or %(JoinStyle)s
TN)rÚ
_joinstylerœ)rHrÂÚjss rKrEzPatch.set_joinstyle s€ô�q‹\ˆØˆŒØˆ�
rLcó.—|jjS)zReturn the joinstyle.)rÈrÅr‰s rKÚ
get_joinstylezPatch.get_joinstyles€à�‰×#Ñ#Ð#rLcóJ—tj|«||_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.
Parameters
----------
hatch : {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
TN)ÚmhatchÚ_validate_hatch_patternr€rœ)rHrs rKrCzPatch.set_hatchs €ô4 ×&Ñ& uÔ-؈Œ ؈�
rLcó—|jS)zReturn the hatching pattern.)r€r‰s rKÚ get_hatchzPatch.get_hatch;ó €à�{‰{ÐrLcó—||_y)zSet the hatch linewidth.N©r6)rHr s rKÚset_hatch_linewidthzPatch.set_hatch_linewidth?s
€à "ˆÕrLcó—|jS)zReturn the hatch linewidth.rÓr‰s rKÚget_hatch_linewidthzPatch.get_hatch_linewidthCó€à×$Ñ$Ð$rLcó°—|jd|j««|j«}|j|jd¬«|j
}|jddk(s|j dk(rd}|j|«|j|jŽ|j|j«|j|j«|j|j«|j!|«|j#|j$«|j'|j)««|j+|j,«|j.rQ|j1|j.«|j3|j4«|j7|j8«|j;«�|j<|j;«Ž|j?«rddl m!}||j?«|«}|D]}|jD|g|¢­ŽŒ|jG«|jId«d |_%y)
aJ
``draw()`` helper factored out for sharing with `FancyArrowPatch`.
Configure *renderer* and the associated graphics context *gc*
from the artist properties, then repeatedly call
``renderer.draw_path(gc, *draw_path_args)`` for each tuple
*draw_path_args* in *draw_path_args_list*.
ÚpatchT)ÚisRGBArVrr·N)ÚPathEffectRendererF)&Ú
open_groupÚget_gidÚnew_gcÚset_foregroundr|r=r™rAÚ
set_dashesr?rDrÁrErÈrBr‘Ú _set_gc_clipÚset_urlÚ_urlÚset_snapÚget_snapr­r r€rCr¡r5rÔr6Úget_sketch_paramsÚset_sketch_paramsÚget_path_effectsÚmatplotlib.patheffectsrÛÚ draw_pathÚrestoreÚ close_grouprœ)rHÚrendererÚdraw_path_args_listÚgcr rÛÚdraw_path_argss rKÚ"_draw_paths_with_artist_propertiesz(Patch._draw_paths_with_artist_propertiesGs΀ð ×јG T§\¡\£^Ô4Ø
�_‰_Ó
ˆà
×ј$Ÿ/™/°$ÐÔ7à
�_‰_ˆØ �?‰?˜1Ñ  Ò " d§o¡o¸Ò&?؈BØ
×Ñ˜ÔØˆ�
‰
�t×)Ñ)Ñ*Ø
�‰˜Ÿ™Ô'Ø
×јŸ™Ô)à
×ј4×,Ñ,Ô-Ø ×ј"ÔØ
�
‰
�4—9‘9ÔØ
� ‰ �D—M‘M“OÔ$à
� ‰ �T—[‘[Ô!à �;Š;Ø �L‰L˜Ÿ™Ô %Ø × Ñ ˜t×0Ñ0Ô 1Ø × "Ñ " 4×#8Ñ#8Ô 9à × !Ñ !Ó #Ð /Ø ˆB× Ñ  $×"8Ñ"8Ó":Ñ ;à × Ñ Ô "Ý AÙ)¨$×*?Ñ*?Ó*AÀ8ÓLˆHà1ò 4ˆNØ ˆH× Ñ ˜rÐ 3 NÔ 3ð 4ð �
‰
Œ Ø×јWÔ%؈�
rLcó
—|j«sy|j«}|j«}|j|«}|j «}|j ||||j dr |j ndfg«y)NrV)Ú get_visiblerOrNÚtransform_path_non_affineÚ
get_affinerñr})rHrírRÚ transformÚtpathÚaffines rKÚdrawz
Patch.drawys‚€ð×ÑÔ!Ø Ø�}‰}‹ˆØ×&Ñ&Ó(ˆ Ø×3Ñ3°DÓ9ˆØ×%Ñ%Ó'ˆØ ×/Ñ/Ø Ø�Vð"&§¡°Ò!3ˆd�oŠo¸ð ?ð
@õ ArLcó—td«‚)zReturn the path of this patch.úDerived must override©ÚNotImplementedErrorr‰s rKrOzPatch.get_pathŠs€ä!Ð"9Ó:Ð:rLcó\—|j«j|j««Sr`r‡)rHrís rKÚget_window_extentzPatch.get_window_extentŽs"€Ø�}‰}‹×*Ñ*¨4×+=Ñ+=Ó+?Ó@Ð@rLcóZ—|j|d«}|j|d«}||fS)z)Convert x and y units for a tuple (x, y).rr)Úconvert_xunitsÚconvert_yunits)rHÚxyrbrcs rKÚ_convert_xy_unitszPatch._convert_xy_units‘s3€à × Ñ   1¡Ó &ˆØ × Ñ   1¡Ó &ˆØ�!ˆtˆ rLr`)5Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚzorderrŸr/rTr]rtrarxr{rˆrNr‚r‹r’rYr–rZršrBr¢r;r¨r<r:r­rAr@r¼r¾Úpropertyr)r
ÚinterpdrDrÆrErËrCrÐrÔrÖrñr
Úallow_rasterizationrùrOrÿrÚ
__classcell__©rJs@rKr'r'sTø„ñð €Fð€Mð ØØØØØ!ØØØØö3*òj ò
ó2óh<6ó|'7ôR6ò&Aò Nò1ò .ò!òòòòò ò
ò #òò #òô 6ò
ò!òF òñ �H˜hÓ '€Dà×Ññ
óð
ò#ð×Ññ
óð
ò$òò<ò#ò%ò0ðd ×ÑñAó ðAò ;óAörLr'cód‡—eZdZd„Zej
ddœˆfd„
«Zd„Zd„Zd„Z ˆfd„Z
ˆxZ S) ÚShadowcó"—d|j›d�S)NzShadow(ú))rÙr‰s rKÚ__str__zShadow.__str__™s€Ø˜Ÿ™˜  AÐ&Ð&rLgffffffæ?)Úshadec ó$•—t‰|�«||_||c|_|_t j «|_|j|j«d|cxkrdkstd«‚td«‚d|z
tjtj|jj«««z}|j||dtj |jj"tj$ «dœ|¥«y)a
Create a shadow of the given *patch*.
By default, the shadow will have the same face color as the *patch*,
but darkened. The darkness can be controlled by *shade*.
Parameters
----------
patch : `~matplotlib.patches.Patch`
The patch to create the shadow for.
ox, oy : float
The shift of the shadow in data coordinates, scaled by a factor
of dpi/72.
shade : float, default: 0.7
How the darkness of the shadow relates to the original color. If 1, the
shadow is black, if 0, the shadow has the same color as the *patch*.
.. versionadded:: 3.8
**kwargs
Properties of the shadow patch. Supported keys are:
%(Patch:kwdoc)s
rrzshade must be between 0 and 1.çà?)r#r"r§r N)r.r/rÙÚ_oxÚ_oyrrÚ_shadow_transformr{Ú
ValueErrorrkÚasarrayr Úto_rgbr–ÚupdateÚ nextafterr Úinf)rHrÙÚoxÚoyrrIr(rJs €rKr/zShadow.__init__œsÞø€ô4 ‰ÑÔØˆŒ
ؠЈŒ�$”(Ü!+×!4Ñ!4Ó!6ˆÔà ×јŸ™Ô$Ø�EŒ˜QŠÜÐ=Ó>Ð >ðÜÐ=Ó>Ð >Ø�U‘œbŸj™j¬¯©°t·z±z×7OÑ7OÓ7QÓ)RÓSÑSˆØ � ‰  %°eÀcä!Ÿ|™|¨D¯J©J×,=Ñ,=ÄÇÁ¸wÓGñððõ rLcóÄ—|j|j«}|j|j«}|jj «j ||«yr`)Úpoints_to_pixelsrrrÚclearÚ translate)rHrír r!s rKÚ_update_transformzShadow._update_transformÄsI€Ø
×
&Ñ
& t§x¡xÓ
0ˆØ
×
&Ñ
& t§x¡xÓ
0ˆØ ×Ñ×$Ñ$Ó&×0Ñ0°°RÕ8rLcó6—|jj«Sr`)rÙrOr‰s rKrOzShadow.get_pathÉs€Ø�z‰z×"Ñ"Ó$Ð$rLcóP—|jj«|jzSr`)rÙr‹rr‰s rKr‹zShadow.get_patch_transformÌs €Ø�z‰z×-Ñ-Ó/°$×2HÑ2HÑHÐHrLcóF•—|j|«t‰|� |«yr`)r&r.rù©rHrírJs €rKrùz Shadow.drawÏsø€Ø ×јxÔ(Ü
‰‰ �XÕrL) rrrrr
r r/r&rOr‹rùr
rs@rKrr˜s@ø„ò'ð×ÑØ/2õ% óð% òN9ò
%òI÷ðrLrcó‡—eZdZdZd„Zej dddœˆfd„
«Zd„Zd„Z d „Z
e d
„«Z e jd „«Z d „Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Ze ee«ZˆxZS)Ú RectangleaÏ
A rectangle defined via an anchor point *xy* and its *width* and *height*.
The rectangle extends from ``xy[0]`` to ``xy[0] + width`` in x-direction
and from ``xy[1]`` to ``xy[1] + height`` in y-direction. ::
: +------------------+
: | |
: height |
: | |
: (xy)---- width -----+
One may picture *xy* as the bottom left corner, but which corner *xy* is
actually depends on the direction of the axis and the sign of *width*
and *height*; e.g. *xy* would be the bottom right corner if the x-axis
was inverted or if *width* was negative.
có‚—|j|j|j|j|jf}d}||zS)Nz5Rectangle(xy=(%g, %g), width=%g, height=%g, angle=%g))Ú_x0Ú_y0Ú_widthÚ_heightÚangle©rHÚparsÚfmts rKrzRectangle.__str__çs5€Ø�x‰x˜Ÿ™ 4§;¡;°· ± ¸d¿j¹jÐHˆØEˆØ�T‰zÐrLçr)r2Úrotation_pointc óÄ•—t‰|�di|¤Ž|d|_|d|_||_||_t
|«|_||_d|_ |j«y)aÀ
Parameters
----------
xy : (float, float)
The anchor point.
width : float
Rectangle width.
height : float
Rectangle height.
angle : float, default: 0
Rotation in degrees anti-clockwise about the rotation point.
rotation_point : {'xy', 'center', (number, number)}, default: 'xy'
If ``'xy'``, rotate around the anchor point. If ``'center'`` rotate
around the center. If 2-tuple of number, rotate around this
coordinate.
Other Parameters
----------------
**kwargs : `~matplotlib.patches.Patch` properties
%(Patch:kwdoc)s
rrçð?N©) r.r/r.r/r0r1r¯r2r7Ú_aspect_ratio_correctionÚ_convert_units)rHrÚwidthÚheightr2r7rIrJs €rKr/zRectangle.__init__ìsbø€ô0 ‰ÑÑ"˜6Ò"Ø�a‘5ˆŒØ�a‘5ˆŒØˆŒ ؈Œ ܘ5“\ˆŒ
Ø,ˆÔð),ˆÔ%Ø ×ÑÕrLcó*—tj«S)z%Return the vertices of the rectangle.)rÚunit_rectangler‰s rKrOzRectangle.get_paths€ä×"Ñ"Ó$Ð$rLcó—|j|j«}|j|j«}|j|j|jz«}|j|j|j
z«}||||fS)z Convert bounds of the rectangle.)rr.rr/r0r1)rHÚx0Úy0Úx1Úy1s rKr<zRectangle._convert_unitssr€à
×
Ñ
 §¡Ó
*ˆØ
×
Ñ
 §¡Ó
*ˆØ
×
Ñ
 §¡¨D¯K©KÑ!7Ó
8ˆØ
×
Ñ
 §¡¨D¯L©LÑ!8Ó
9ˆØ�2�r˜2ˆ~ÐrLcó”—|j«}|jdk(rW|j|jz
|j|j
z
}}|j|dz z|j
|dz zf}n4|jdk(r|j|j
f}n |j}t
j|«t
j«j|d |d «jd|j«j|j«jdd|jz «j|ŽzS)NÚcenterç@rrr)Úget_bboxr7rDrBrErCrÚBboxTransformTorr%Úscaler;Ú
rotate_degr2)rHÚbboxr=r>r7s rKr‹zRectangle.get_patch_transform s€ð
�}‰}‹ˆØ × Ñ  (Ò *Ø ŸG™G d§g¡gÑ-¨t¯w©w¸¿¹Ñ/@�6ˆEØ!ŸW™W u¨r¡zÑ1°4·7±7¸VÀb¹[Ñ3HÐH‰NØ
×
Ñ
 DÒ
(Ø!ŸW™W d§g¡gÐ-‰Nà!×0Ñ0ˆNÜ×)Ñ)¨$Ó/ð”*×%Ñ%Ó'ß‘˜N¨1Ñ-Ð-°¸qÑ0AÐ/AÓBß‘�q˜$×7Ñ7Ó8ß‘˜DŸJ™JÓ'ß‘�q˜!˜d×;Ñ;Ñ;Ó<ß‘˜Nð ,ñ,ð ,rLcó—|jS)z The rotation point of the patch.)Ú_rotation_pointr‰s rKr7zRectangle.rotation_point5s€ð×#Ñ#Ð#rLcó¸—|dvsDt|t«r<t|«dk(r.t|dt«rt|dt«r||_yt d«‚)N)rGrérrzC`rotation_point` must be one of {'xy', 'center', (number, number)}.)rWÚtuplerFrrOr)rHÚvalues rKr7zRectangle.rotation_point:sW€à Ð$Ñ $ܘ5¤%Ô(¬S°«Z¸1ª_ܘ5 ™8¤TÔ*¬z¸%À¹(ÄDÔ/Ià#(ˆDÕ äðCóDð
DrLcó—|jS)z,Return the left coordinate of the rectangle.)r.r‰s rKÚget_xzRectangle.get_xEó €à�x‰xˆrLcó—|jS)z.Return the bottom coordinate of the rectangle.)r/r‰s rKÚget_yzRectangle.get_yIrVrLcó2—|j|jfS)z>Return the left and bottom coords of the rectangle as a tuple.)r.r/r‰s rKÚget_xyzRectangle.get_xyMs€à�x‰x˜Ÿ™Ð!Ð!rLcóD—|j«jgd¢«S)zc
Return the corners of the rectangle, moving anti-clockwise from
(x0, y0).
)©rr©rr©rr©rr©r‹rör‰s rKÚ get_cornerszRectangle.get_cornersQs#€ð
×'Ñ'Ó)×3Ñ3Ú ,ó.ð .rLcó@—|j«jd«S)z#Return the centre of the rectangle.)rrr`r‰s rKÚ
get_centerzRectangle.get_centerYs€à×'Ñ'Ó)×3Ñ3°JÓ?Ð?rLcó—|jS©z"Return the width of the rectangle.©r0r‰s rKÚ get_widthzRectangle.get_width]rÑrLcó—|jS©z#Return the height of the rectangle.©r1r‰s rKÚ
get_heightzRectangle.get_heightaó €à�|‰|ÐrLcó—|jS)z"Get the rotation angle in degrees.©r2r‰s rKÚ get_anglezRectangle.get_angleer¿rLcó —||_d|_y)z)Set the left coordinate of the rectangle.TN)r.rœ©rHrbs rKÚset_xzRectangle.set_xió€àˆŒØˆ�
rLcó —||_d|_y)z+Set the bottom coordinate of the rectangle.TN)r/rœ©rHrcs rKÚset_yzRectangle.set_ynrsrLcó —||_d|_y)zs
Set the rotation angle in degrees.
The rotation is performed anti-clockwise around *xy*.
TN)r2rœ©rHr2s rKÚ set_anglezRectangle.set_angless€ð ˆŒ
؈�
rLcó0—|\|_|_d|_y)zŠ
Set the left and bottom coordinates of the rectangle.
Parameters
----------
xy : (float, float)
TN)r.r/rœ©rHrs rKÚset_xyzRectangle.set_xy|s€ð шŒ�$”(؈�
rLcó —||_d|_y)zSet the width of the rectangle.TN©r0rœr²s rKÚ set_widthzRectangle.set_width‡s€àˆŒ ؈�
rLcó —||_d|_y)z Set the height of the rectangle.TN©r1rœ©rHÚhs rKÚ
set_heightzRectangle.set_heightŒs€àˆŒ ؈�
rLcóŠ—t|«dk(r |d\}}}}n|\}}}}||_||_||_||_d|_y)a@
Set the bounds of the rectangle as *left*, *bottom*, *width*, *height*.
The values may be passed as separate parameters or as a tuple::
set_bounds(left, bottom, width, height)
set_bounds((left, bottom, width, height))
.. ACCEPTS: (left, bottom, width, height)
rrTN)rFr.r/r0r1rœ©rHÚargsÚlr»r³rƒs rKÚ
set_boundszRectangle.set_bounds‘sP€ô ˆt‹9˜Š>ؘa™‰JˆAˆq�!‘Qà‰JˆAˆq�!�Q؈ŒØˆŒØˆŒ ؈Œ ؈�
rLcóV—tjj|j«ŽS©zReturn the `.Bbox`.)rÚBboxÚ from_extentsr<r‰s rKrIzRectangle.get_bbox¦s €ä�‰×+Ñ+¨T×-@Ñ-@Ó-BÐCÐCrL) rrrrrr
r r/rOr<r‹r
r7ÚsetterrUrXrZrarcrgrkrorrrvryr|rr„r‰rIrr
rs@rKr,r,ÔsÌø„ñò$ð
×Ñà¨4õ%óð%òN%òò,ð*ñ$óð$ð×ÑñDóðDòòò"ò.ò@òòòòò
ò
ò òò
ò
ò*Dñ
�&˜&Ó !„BrLr,cóZ‡—eZdZdZd„Zej dddœˆfd„
«Zd„Zd„Z ˆxZ
S) ÚRegularPolygonzA regular polygon patch.cóŠ—d}||jd|jd|j|j|jfzS)Nz7RegularPolygon((%g, %g), %d, radius=%g, orientation=%g)rr)rÚ numverticesr[Ú orientation©rHrÂs rKrzRegularPolygon.__str__°sD€Ø EˆØ�D—G‘G˜A‘J §¡¨¡
¨D×,<Ñ,<¸d¿k¹kØ×$Ñ$ð&ñ&ð &rLér©r[r“c ó•—||_||_||_||_t j
|«|_tj«|_ t‰|�,di|¤Žy)a¦
Parameters
----------
xy : (float, float)
The center position.
numVertices : int
The number of vertices.
radius : float
The distance from the center to each of the vertices.
orientation : float
The polygon rotation angle (in radians).
**kwargs
`Patch` properties:
%(Patch:kwdoc)s
Nr:) rr’r“r[rÚunit_regular_polygonÚ_pathrrÚ_patch_transformr.r/)rHrÚ numVerticesr[r“rIrJs €rKr/zRegularPolygon.__init__µsVø€ð.ˆŒØ&ˆÔØ&ˆÔ؈Œ Ü×.Ñ.¨{Ó;ˆŒ
Ü *× 3Ñ 3Ó 5ˆÔÜ
‰ÑÑ"˜6Ó"rLcó—|jSr`©r™r‰s rKrOzRegularPolygon.get_pathÔó €Ø�z‰zÐrLcóÈ—|jj«j|j«j |j
«j |jŽSr`)ršr$rKr[Úrotater“r%rr‰s rKr‹z"RegularPolygon.get_patch_transform×sK€ðˆt×$Ñ$×*Ñ*Ó,ß
‰U�4—;‘;Ó
ß
‰V�D×$Ñ$Ó
%ß
‰Y˜Ÿ™ð!ð !rL) rrrrrr
r r/rOr‹r
rs@rKr�r�­s4ø„Ù"ò&ð
×Ñà qõ#óð#ò<ö!rLr�cóV‡—eZdZdZdZd„Zejˆfd„«Zd„Z d„Z
ˆxZ S)Ú PathPatchzA general polycurve path patch.Tcó’—d}|t|jj«gt|jjd«¢­zS)NzPathPatch%d((%g, %g) ...)r)rFr™rjrRr”s rKrzPathPatch.__str__ãs=€Ø 'ˆØ”C˜Ÿ
™
×+Ñ+Ó,ÐM¬u°T·Z±Z×5HÑ5HÈÑ5KÓ/LÑMÑMÐMrLc ó2•—t‰|�di|¤Ž||_y)zl
*path* is a `.Path` object.
Valid keyword arguments are:
%(Patch:kwdoc)s
Nr:)r.r/r™)rHrRrIrJs €rKr/zPathPatch.__init__çsø€ô ‰ÑÑ"˜6Ò"؈�
rLcó—|jSr`r�r‰s rKrOzPathPatch.get_pathóržrLcó—||_yr`r�)rHrRs rKÚset_pathzPathPatch.set_pathös €Øˆ�
rL) rrrrrŸrr
r r/rOr§r
rs@rKr¢r¢Þs5ø„Ù)à€MòNð×Ñó óð òörLr¢có`‡—eZdZdZdZej dddœˆfd„
«Zd„Zd„Z d
d „Z
ˆxZ S) Ú StepPatchz“
A path patch describing a stepwise constant function.
By default, the path is not closed and starts and stops at
baseline value.
FÚverticalr)r“Úbaselinec ó •—||_tj|«|_tj|«|_|�tj|«nd|_|j
«t‰|� |jfi|¤Žy)a1
Parameters
----------
values : array-like
The step heights.
edges : array-like
The edge positions, with ``len(edges) == len(vals) + 1``,
between which the curve takes on vals values.
orientation : {'vertical', 'horizontal'}, default: 'vertical'
The direction of the steps. Vertical means that *values* are
along the y-axis, and edges are along the x-axis.
baseline : float, array-like or None, default: 0
The bottom value of the bounding edges or when
``fill=True``, position of lower edge. If *fill* is
True or an array is passed to *baseline*, a closed
path is drawn.
**kwargs
`Patch` properties:
%(Patch:kwdoc)s
N)
r“rkrÚ_edgesÚ_valuesÚ _baselineÚ _update_pathr.r/r™)rHÚvaluesÚedgesr“r«rIrJs €rKr/zStepPatch.__init__sfø€ð8'ˆÔÜ—j‘j Ó'ˆŒ Ü—z‘z &Ó)ˆŒ Ø19Ð1EœŸ™ HÔ-È4ˆŒØ ×ÑÔÜ
‰Ñ˜Ÿ™Ñ. vÓ.rLc óΗtjtj|j««r t d«‚|jj
dz
|j j
k7r:t d|j j
›d|jj
›d�«‚tjd«gtjdtj¬«g}}tj|j «}|j�"|tj|j«z}tj|«D�]ä\}}tj|j||dzd «}tj|j ||d «}|j€tj|dd||d
dg«}nÚ|jjdk(r/tj|jg||jgg«}n’|jjdk(rntj|j||d «ddd
…}tj||ddd
…g«}tj|d
d||dd|dd||d
dg«}n t d «‚|j d k(rtj"||g«} ntj"||g«} |j%| «|j%tj&gtj(gt+| «dz
zz«�Œçttj|«tj|««|_y)
Nz$Nan values in "edges" are disallowedrziSize mismatch between "values" and "edges". Expected `len(values) + 1 == len(edges)`, but `len(values) = z` and `len(edges) = z`.©rrQr)ÚdtyperQéÿÿÿÿzInvalid `baseline` specifiedrª)rkÚisnanÚsumr­rÚsizer®ÚemptyrÚ code_typer¯r Úcontiguous_regionsÚrepeatÚ concatenateÚndimr“Ú column_stackÚappendrmÚLINETOrFr™)
rHÚvertsriÚ _nan_maskÚidx0Úidx1rbrcÚbasers
rKr°zStepPatch._update_path'sÀÜ
�8‰8”B—F‘F˜4Ÿ;™;Ó'Ô (ÜÐCÓDÐ DØ �;‰;× Ñ ˜aÑ  4§<¡<×#4Ñ#4Ò 4Üð/à/3¯|©|×/@Ñ/@Ð.AðB.Ø.2¯k©k×.>Ñ.>Ð-?¸rðCóDð
Dô
Ÿ™ Ó(Ð)¬B¯H©H°Q¼d¿n¹nÔ,MÐ+Nˆuˆä—H‘H˜TŸ\™\Ó*ˆ Ø �>‰>Ð %Ø œŸ™ $§.¡.Ó1Ñ 1ˆIÜ×2Ñ2°I°:Ó>ó D‰JˆD�$Ü— ‘ ˜$Ÿ+™+ d¨4°©6Ð2°AÓ6ˆAÜ— ‘ ˜$Ÿ,™, t¨DÐ1°1Ó5ˆAØ�~‰~Ð%Ü—N‘N A b q E¨1¨a°°¨fÐ#5Ó6‘Ø—‘×$Ñ$¨Ò)Ü—N‘N T§^¡^Ð$4°a¸$¿.¹.Ð9IÐ#JÓK‘Ø—‘×$Ñ$¨Ò)Ü—y‘y §¡°°TÐ!:¸AÓ>¹tÀ¸tÑD�Ü—N‘N A q©¨2¨¡w <Ó0�Ü—N‘N D¨¨ I¨q°$°r¸°(Ø$(¨¨! H¨d°D¸¸°Ið$?ó@‘ô!Ð!?Ó@Ð@Ø×Ñ :Ò-Ü—_‘_ a¨ VÓ,‘ä—_‘_ a¨ VÓ,�Ø �L‰L˜Ô Ø �L‰Lœ$Ÿ+™+˜¬$¯+©+¨¼¸B»À¹ Ñ)BÑBÖ Cð' Dô(œ"Ÿ.™.¨Ó/´·±ÀÓ1FÓGˆ�
rLcój—tdd«}||j|j|j«S)z:Get `.StepPatch` values, edges and baseline as namedtuple.Ú StairDatazvalues edges baseline)rr®r­r¯)rHrÉs rKÚget_datazStepPatch.get_dataKs*€ä˜{Ð,CÓDˆ Ù˜Ÿ™ t§{¡{°D·N±NÓCÐCrLcóü—|€|€
|€ td«‚|�tj|«|_|�tj|«|_|�tj|«|_|j
«d|_y)a
Set `.StepPatch` values, edges and baseline.
Parameters
----------
values : 1D array-like or None
Will not update values, if passing None
edges : 1D array-like, optional
baseline : float, 1D array-like or None
Nz)Must set *values*, *edges* or *baseline*.T)rrkrr®r­r¯r°rœ)rHr±r²r«s rKÚset_datazStepPatch.set_dataPss€ð ˆ>˜e˜m°Ð0@ÜÐHÓIÐ IØ Ð ÜŸ:™: fÓ-ˆDŒLØ Ð ÜŸ*™* UÓ+ˆDŒKØ Ð ÜŸZ™Z¨Ó1ˆDŒNØ ×ÑÔØˆ�
rL)NNN) rrrrrŸr
r r/r°rÊrÌr
rs@rKr©r©ús?ø„ñð€Mà×Ñà'°!õ /óð /òD"HòHD÷
rLr©c󀇗eZdZdZd„Zej ddœˆfd„
«Zd„Zd„Z d„Z
d „Z d
„Z e
e e d ¬ «ZˆxZS)
ÚPolygonzA general polygon patch.cóÀ—t|jj«r?d}|t|jj«g|jjd¢­zSy)NzPolygon%d((%g, %g) ...)rz
Polygon0())rFr™rjr”s rKrzPolygon.__str__jsM€Ü ˆt�z‰z×"Ñ"Ô #Ø)ˆAØœ˜DŸJ™J×/Ñ/Ó0ÐJ°4·:±:×3FÑ3FÀqÑ3IÑJÑJÐ JàrLT©Úclosedc óT•—t‰|�di|¤Ž||_|j|«y)zÿ
Parameters
----------
xy : (N, 2) array
closed : bool, default: True
Whether the polygon is closed (i.e., has identical start and end
points).
**kwargs
%(Patch:kwdoc)s
Nr:)r.r/Ú_closedr|)rHrrÑrIrJs €rKr/zPolygon.__init__qs'ø€ô ‰ÑÑ"˜6Ò"؈Œ Ø � ‰ �B�rLcó—|jS)zGet the `.Path` of the polygon.r�r‰s rKrOzPolygon.get_pathƒr¿rLcó—|jS)z%Return whether the polygon is closed.)rÓr‰s rKÚ
get_closedzPolygon.get_closed‡rlrLcó¢—|jt|«k(ryt|«|_|j|j««d|_y)z›
Set whether the polygon is closed.
Parameters
----------
closed : bool
True if the polygon is closed
NT)rÓr7r|rZrœ)rHrÑs rKÚ
set_closedzPolygon.set_closed‹s;€ð �<‰<œ4 ›<Ò 'Ø Ü˜F“|ˆŒ Ø � ‰ �D—K‘K“MÔ"؈�
rLcó.—|jjS)z’
Get the vertices of the path.
Returns
-------
(N, 2) array
The coordinates of the vertices.
)r™rjr‰s rKrZzPolygon.get_xyšs€ð�z‰z×"Ñ"Ð"rLcón—tj|«}|j\}}|jr?|dk(s|dkDrX|d|dk7j «r?tj
||dgg«}n#|dkDr|d|dk(j
«r|dd}t||j¬«|_d|_ y)aÝ
Set the vertices of the polygon.
Parameters
----------
xy : (N, 2) array-like
The coordinates of the vertices.
Notes
-----
Unlike `.Path`, we do not ignore the last input vertex. If the
polygon is meant to be closed, and the last point of the polygon is not
equal to the first, we assume that the user has not explicitly passed a
``CLOSEPOLY`` vertex, and add it ourselves.
rrr¶rQNrÐT)
rkrÚshaperÓrpr¾Úallrr™rœ)rHrÚnvertsÚ_s rKr|zPolygon.set_xy¥s§€ô �Z‰Z˜‹^ˆØ—H‘H‰ ˆ�Ø �<Š<ð
˜Š{˜f qšj¨b°©e°r¸"±v©o×-BÑ-BÔ-DÜ—^‘^ R¨"¨Q©%¨ MÓ2‘ð˜Šz˜r !™u¨¨2©™×3Ñ3Ô5ؘ˜�W�ܘ" T§\¡\Ô2ˆŒ
؈�
rLz+The vertices of the path as a (N, 2) array.)Údoc)rrrrrr
r r/rOrÖrØrZr|r
rr
rs@rKrÎrÎgsVø„Ù"ò ð×ÑØ%)õóðò"òò
ò #òñB
�&˜&ØCô
E„BrLrÎcóv‡—eZdZdZd„Zej ddœˆfd„
«Zd„Zd„Z d„Z
d „Z d
„Z d „Z
d „ZˆxZS)
ÚWedgezWedge shaped patch.có¤—|jd|jd|j|j|j|jf}d}||zS)Nrrz<Wedge(center=(%g, %g), r=%g, theta1=%g, theta2=%g, width=%s))rGÚrÚtheta1Útheta2r=r3s rKrz
Wedge.__str__ÍsF€Ø— ‘ ˜A‘ § ¡ ¨A¡°·±Ø— ‘ ˜TŸ[™[¨$¯*©*ð6ˆàLˆØ�T‰zÐrLN©r=c óÀ•—t‰|�di|¤Ž||_||c|_|_||c|_|_tj«|_ |j«y)a4
A wedge centered at *x*, *y* center with radius *r* that
sweeps *theta1* to *theta2* (in degrees). If *width* is given,
then a partial wedge is drawn from inner radius *r* - *width*
to outer radius *r*.
Valid keyword arguments are:
%(Patch:kwdoc)s
Nr:) r.r/rGrãr=rärårr�ršÚ_recompute_path)rHrGrãrärår=rIrJs €rKr/zWedge.__init__ÓsYø€ô ‰ÑÑ"˜6Ò"؈Œ ؠЈŒ�”
Ø#)¨6Ð ˆŒ �T”[Ü *× <Ñ <Ó >ˆÔØ ×ÑÕrLcó —t|j|jz
dz
«dkrd\}}tj}n(|j|j}}tj
}tj ||«}|j�Ž|j}|jddd…|j|jz
z|jz }tj||dgg«}g|j¢|‘|jdd¢tj‘}nCtj|jddgg«}g|j¢|‘tj‘}t||jz|jz|«|_y)Néhgê-�™—q=)rrêr¶r\r)ÚabsrårärrmrÂÚarcr=rjrãrkr¾riÚ CLOSEPOLYrGr™) rHräråÚ connectorrìÚv1Úv2Úvr«s rKrèzWedge._recompute_pathæs>€ä �— ‘ ˜dŸk™kÑ)¨SÑ0Ó 1°UÒ :Ø#‰NˆF�FÜŸ ™ ‰Ià!Ÿ[™[¨$¯+©+�FˆFÜŸ ™ ˆIô�h‰h�v˜vÓ&ˆà �:‰:Ð !𗑈BØ—‘™d ˜dÑ# t§v¡v°·
±
Ñ':Ñ;¸d¿f¹fÑDˆBÜ—‘  B¨¨Ð1Ó2ˆAØG�#—)‘)ÐG˜YÐG¨¯©°1°2¨ÐG¼¿¹ÐG‰Aô—‘ § ¡ ¨v°vÐ.>Ð?Ó@ˆAØ7�#—)‘)Ð7˜YÐ7¬¯©Ð7ˆAô˜!˜dŸf™f™* t§{¡{Ñ2°AÓ6ˆ�
rLcó.—d|_||_d|_y©NT)r™rGrœ)rHrGs rKÚ
set_centerzWedge.set_centeró€ØˆŒ
؈Œ ؈�
rLcó.—d|_||_d|_yró)r™rãrœ©rHr[s rKÚ
set_radiuszWedge.set_radiuss€ØˆŒ
؈ŒØˆ�
rLcó.—d|_||_d|_yró)r™rärœ)rHräs rKÚ
set_theta1zWedge.set_theta1 rõrLcó.—d|_||_d|_yró)r™rårœ)rHrås rKÚ
set_theta2zWedge.set_theta2rõrLcó.—d|_||_d|_yró)r™r=rœ©rHr=s rKrzWedge.set_widths€ØˆŒ
؈Œ
؈�
rLcóR—|j€|j«|jSr`©r™rèr‰s rKrOzWedge.get_pathó"€Ø �:‰:Ð Ø × Ñ Ô "Ø�z‰zÐrL)rrrrrr
r r/rèrôrørúrürrOr
rs@rKráráÊsKø„Ùòð ×ÑØ;?õóðò$7ò6ò
ò
ò
ò
ö
rLrác
󮇗eZdZdZd„Zej ddgddgddgddgddgdd gddgg«Zejdd
œˆfd „
«Z
d „Z d
„Z dd„Z
ˆxZS)ÚArrowzAn arrow patch.có—y)NzArrow()r:r‰s rKrz
Arrow.__str__$s€ØrLr6çš™™™™™¹?gš™™™™™¹¿çš™™™™™é?g333333Ó¿r9ç333333Ó?ræc óN•—t‰|�di|¤Ž|j|||||«y)aQ
Draws an arrow from (*x*, *y*) to (*x* + *dx*, *y* + *dy*).
The width of the arrow is scaled by *width*.
Parameters
----------
x : float
x coordinate of the arrow tail.
y : float
y coordinate of the arrow tail.
dx : float
Arrow length in the x direction.
dy : float
Arrow length in the y direction.
width : float, default: 1
Scale factor for the width of the arrow. With a default value of 1,
the tail width is 0.2 and head width is 0.6.
**kwargs
Keyword arguments control the `Patch` properties:
%(Patch:kwdoc)s
See Also
--------
FancyArrow
Patch that allows independent control of the head and tail
properties.
Nr:)r.r/rÌ)rHrbrcÚdxÚdyr=rIrJs €rKr/zArrow.__init__+s)ø€ô< ‰ÑÑ"˜6Ò"Ø �
‰
�a˜˜B  EÕ*rLcó—|jSr`r�r‰s rKrOzArrow.get_pathLržrLcó—|jSr`)ršr‰s rKr‹zArrow.get_patch_transformOs€Ø×$Ñ$Ð$rLcóæ—|�||_|�||_|�||_|�||_|�||_t j «jtj|j|j«|j«jtj|j|j««j|j|j«j«|_y)a±
Set `.Arrow` x, y, dx, dy and width.
Values left as None will not be updated.
Parameters
----------
x, y : float or None, default: None
The x and y coordinates of the arrow base.
dx, dy : float or None, default: None
The length of the arrow along x and y direction.
width : float or None, default: None
Width of full arrow tail.
N)Ú_xÚ_yÚ_dxÚ_dyr0rrrKrkÚhypotr Úarctan2r%Úfrozenrš)rHrbrcr r
r=s rKrÌzArrow.set_dataRs°€ð
ˆ=؈DŒGØ ˆ=؈DŒGØ
ˆ>؈DŒHØ
ˆ>؈DŒHØ Ð ØˆDŒKä × Ñ Ó !ß
‰U”2—8‘8˜DŸH™H d§h¡hÓ/°·±Ó
=ß
‰V”B—J‘J˜tŸx™x¨¯©Ó2Ó
3ß
‰Y�t—w‘w §¡Ó
(ß
‰V‹Xð
ÕrL)NNNNN)rrrrrrÚ_create_closedr™r
r r/rOr‹rÌr
rs@rKrr!s}ø„Ùòð
ˆD× Ñ Ø ˆcˆ
�S˜$�K # t ¨s°D¨k¸CÀ¸:Ø ˆcˆ
�S˜#�Jð! ó
!€Eð×ÑØ.1õ+óð+ò@ò%÷rLrc óz‡—eZdZdZdZd„Zejdddddddd œˆfd
„
«Zdddddddd œd „Z d
„Z
ˆxZ S)Ú
FancyArrowzP
Like Arrow, but lets you set head width and head height independently.
Tcó—y)Nz FancyArrow()r:r‰s rKrzFancyArrow.__str__{s€ØrLgü©ñÒMbP?FNÚfullr)r=Úlength_includes_headÚ
head_widthÚ head_lengthrÛÚoverhangÚhead_starts_at_zeroc óø•—||_||_||_||_||_||_||_||_| |_|
|_ | |_
|j«t‰
|�4|jfddi| ¤Žy)av
Parameters
----------
x, y : float
The x and y coordinates of the arrow base.
dx, dy : float
The length of the arrow along x and y direction.
width : float, default: 0.001
Width of full arrow tail.
length_includes_head : bool, default: False
True if head is to be counted in calculating the length.
head_width : float or None, default: 3*width
Total width of the full arrow head.
head_length : float or None, default: 1.5*head_width
Length of arrow head.
shape : {'full', 'left', 'right'}, default: 'full'
Draw the left-half, right-half, or full arrow.
overhang : float, default: 0
Fraction that the arrow is swept back (0 overhang means
triangular shape). Can be negative or greater than one.
head_starts_at_zero : bool, default: False
If True, the head starts being drawn at coordinate 0
instead of ending at coordinate 0.
**kwargs
`.Patch` properties:
%(Patch:kwdoc)s
rÑTN)rrrrr0Ú_length_includes_headÚ _head_widthÚ _head_lengthÚ_shapeÚ _overhangÚ_head_starts_at_zeroÚ _make_vertsr.r/rÃ)rHrbrcr r
r=rrrrÛrrrIrJs €rKr/zFancyArrow.__init__~s~ø€ðTˆŒØˆŒØˆŒØˆŒØˆŒ Ø%9ˆÔ"Ø%ˆÔØ'ˆÔ؈Œ Ø!ˆŒØ$7ˆÔ!Ø ×ÑÔÜ
‰Ñ˜Ÿ™Ñ;¨DÐ;°FÓ;rL)rbrcr r
r=rrcóØ—|�||_|�||_|�||_|�||_|�||_|�||_|�||_|j«|j|j«y)aˆ
Set `.FancyArrow` x, y, dx, dy, width, head_with, and head_length.
Values left as None will not be updated.
Parameters
----------
x, y : float or None, default: None
The x and y coordinates of the arrow base.
dx, dy : float or None, default: None
The length of the arrow along x and y direction.
width : float or None, default: None
Width of full arrow tail.
head_width : float or None, default: None
Total width of the full arrow head.
head_length : float or None, default: None
Length of arrow head.
N)
rrrrr0r!r"r&r|rÃ)rHrbrcr r
r=rrs rKrÌzFancyArrow.set_data¶sy€ð.
ˆ=؈DŒGØ ˆ=؈DŒGØ
ˆ>؈DŒHØ
ˆ>؈DŒHØ Ð ØˆDŒKØ Ð !Ø)ˆDÔ Ø Ð "Ø +ˆDÔ Ø ×ÑÔØ � ‰ �D—J‘JÕrLcóZ—|j€d|jz}n |j}|j€d|z}n |j}tj|j
|j «}|jr|}n||z}tj|«dk(rtjddg«|_
y||}}|j|j}}tjddg| | dz g| d|z
z| dz g| | dz g| dgg«} |js| |dgz
} |jr
| |dz dgz
} |jdk(r| }
na| ddgz} |jd k(r| }
nH|jd
k(r!tj| dd| d dd…g«}
nt!d |j›�«‚|dk7r|j
|z } |j |z }
nd
\} }
| |
g|
| gg}tj"|
|«|j$|j
z|j&|j zgz|_
y)NrVgø?rrQr6rÚleftr¶ÚrightréþÿÿÿzGot unknown shape: r_)r!r0r"rkrrrr r¹rºrÃr$Úarrayr%r#r¾rÚdotrr)rHrrÚdistanceÚlengthÚhwÚhlÚhsr Úleft_half_arrowÚcoordsÚright_half_arrowÚcxÚsxÚMs rKr&zFancyArrow._make_vertsÞsI€Ø × Ñ Ð #ؘTŸ[™[™‰Jà×)Ñ)ˆJØ × Ñ Ð $Ø 
Ñ*‰Kà×+Ñ+ˆKä—8‘8˜DŸH™H d§h¡hÓ/ˆà × %Ò %؉Fà  Ñ+ˆFÜ
�7‰7�6‹?˜aÒ ÜŸ™ 1 a &Ó)ˆD�Jð  �ˆBØ—^‘^ T§[¡[�ˆBÜ Ÿh™hØ�c�
Ø��r�c˜A‘g�Ø�˜˜B™‘ "  q¡Ð)Ø�˜2˜# ™'Ð"Ø�˜!� ð (óˆOð×-Ò-Ø K°Ð#3Ñ3�à×(Ò(Ø K°!¡O°QÐ#7Ñ7�à�{‰{˜fÒ$Ø(‘à#2°a¸°WÑ#<Ð Ø—;‘; 'Ò)Ø-‘FØ—[‘[ FÒ*ô Ÿ^™^¨_¸S¸bÐ-AØ-=¸b¸fÀ"¸fÑ-Eð-GóH‘Fô%Ð':¸4¿;¹;¸/Ð%JÓKÐKؘ1Š}Ø—X‘X Ñ(�Ø—X‘X Ñ(‘ð‘��BØ�b�˜R˜C ˜9Ð%ˆAÜŸ™ ¨Ó*Ø—‘˜$Ÿ(™(Ñ"Ø—‘˜$Ÿ(™(Ñ"ð.ñˆD�JrL) rrrrrŸrr
r r/rÌr&r
rs@rKrrts]ø„ñð€Mòð×Ñà°5ÀTØ!¨¸!Ø%*õ5<óð5<ðn! D¨T°dÀ$Ø ¨dô& öP<rLrú
r¶rQ)rcóN‡—eZdZdZd„Zej dddœˆfd„ «ZˆxZS)Ú
CirclePolygonz*A polygon-approximation of a circle patch.cót—d}||jd|jd|j|jfzS)Nz1CirclePolygon((%g, %g), radius=%g, resolution=%d)rr)rr[r’r”s rKrzCirclePolygon.__str__%s5€Ø ?ˆØ�D—G‘G˜A‘J §¡¨¡
¨D¯K©K¸×9IÑ9IÐJÑJÐJrLé)Ú
resolutionc ó.•—t‰|�||f|ddœ|¤Žy)a
Create a circle at *xy* = (*x*, *y*) with given *radius*.
This circle is approximated by a regular polygon with *resolution*
sides. For a smoother circle drawn with splines, see `Circle`.
Valid keyword arguments are:
%(Patch:kwdoc)s
rr–N©r.r/)rHrr[r>rIrJs €rKr/zCirclePolygon.__init__)s,ø€ô ‰ÑØ �
ð DØ#)°qñ DØ<Bó DrL©r•) rrrrrr
r r/r
rs@rKr;r;"s1ø„Ù4òKð×ÑðDØõDóôDrLr;có臗eZdZdZd„Zej ddœˆfd„
«Zd„Zd„Z d„Z
d „Z d
„Z e
e e «Zd „Zd „Ze
ee«Zd
„Zd„Ze
ee«Zd„Zd„Ze
ee«Zd„Zd„Zd„ZˆxZS)ÚEllipsezA scale-free ellipse.cóŽ—|jd|jd|j|j|jf}d}||zS)Nrrz3Ellipse(xy=(%s, %s), width=%s, height=%s, angle=%s))Ú_centerr=r>r2r3s rKrzEllipse.__str__>s@€Ø— ‘ ˜Q‘ §¡¨a¡Ø—
‘
˜DŸK™K¨¯©ð5ˆàCˆØ�T‰zÐrLrrnc óЕ—t‰|�di|¤Ž||_||c|_|_||_t
j«|_d|_ tj«|_ y)aÁ
Parameters
----------
xy : (float, float)
xy coordinates of ellipse centre.
width : float
Total length (diameter) of horizontal axis.
height : float
Total length (diameter) of vertical axis.
angle : float, default: 0
Rotation in degrees anti-clockwise.
Notes
-----
Valid keyword arguments are:
%(Patch:kwdoc)s
r9Nr:)
r.r/rEr0r1Ú_anglerÚ unit_circler™r;rr�rš)rHrr=r>r2rIrJs €rKr/zEllipse.__init__Ds^ø€ô( ‰ÑÑ"˜6Ò"àˆŒ Ø$)¨6Ð!ˆŒ �T”\؈Œ Ü×%Ñ%Ó'ˆŒ
ð ),ˆÔ%ä *× <Ñ <Ó >ˆÕrLcóæ—|j|jd«|j|jd«f}|j|j«}|j|j«}t j «j|dz|dz|jz«j|j«jdd|jz «j|Ž|_ y)a!
Notes
-----
This cannot be called until after this has been added to an Axes,
otherwise unit conversion will fail. This makes it very important to
call the accessor method and not directly access the transformation
member variable.
rrrN)
rrErr0r1rrrKr;rLr2r%rš)rHrGr=r>s rKÚ_recompute_transformzEllipse._recompute_transformgsÄ€ð×%Ñ% d§l¡l°1¡oÓ6Ø×%Ñ% d§l¡l°1¡oÓ6ð8ˆà×#Ñ# D§K¡KÓ0ˆØ×$Ñ$ T§\¡\Ó2ˆð!¤
× 3Ñ 3Ó 5ß
‰U�5˜3‘; ¨¡ ¨t×/LÑ/LÑ LÓ
Mß
‰Z˜Ÿ
™
Ó
#ß
‰U�1�a˜$×7Ñ7Ñ7Ó
8ß
‰Y˜ð ! ˆÕrLcó—|jS)zReturn the path of the ellipse.r�r‰s rKrOzEllipse.get_pathzr¿rLcó:—|j«|jSr`)rJršr‰s rKr‹zEllipse.get_patch_transform~s€Ø ×!Ñ!Ô#Ø×$Ñ$Ð$rLcó —||_d|_y)zs
Set the center of the ellipse.
Parameters
----------
xy : (float, float)
TN)rErœr{s rKrôzEllipse.set_center‚s€ðˆŒ ؈�
rLcó—|jS)z!Return the center of the ellipse.©rEr‰s rKrczEllipse.get_center�rlrLcó —||_d|_y)zl
Set the width of the ellipse.
Parameters
----------
width : float
TNr~rþs rKrzEllipse.set_width“ó€ðˆŒ ؈�
rLcó—|jS)z2
Return the width of the ellipse.
rfr‰s rKrgzEllipse.get_widthžs€ð�{‰{ÐrLcó —||_d|_y)zn
Set the height of the ellipse.
Parameters
----------
height : float
TNr�)rHr>s rKr„zEllipse.set_height¦s€ðˆŒ ؈�
rLcó—|jS)z!Return the height of the ellipse.rjr‰s rKrkzEllipse.get_height±rlrLcó —||_d|_y)zl
Set the angle of the ellipse.
Parameters
----------
angle : float
TN)rGrœrxs rKryzEllipse.set_angle·rQrLcó—|jS)z Return the angle of the ellipse.©rGr‰s rKrozEllipse.get_angleÂrÑrLcóD—|j«jgd¢«S)z¼
Return the corners of the ellipse bounding box.
The bounding box orientation is moving anti-clockwise from the
lower left corner defined before rotation.
))r¶r¶)rr¶r^)r¶rr`r‰s rKrazEllipse.get_cornersÈs#€ð×'Ñ'Ó)×3Ñ3Ú 0ó2ð 2rLcóö—|j|jkr"|j«jddg«}n!|j«jddg«}|D�cgc]
}t |«‘Œc}Scc}w)zµ
Return the vertices coordinates of the ellipse.
The definition can be found `here <https://en.wikipedia.org/wiki/Ellipse>`_
.. versionadded:: 3.8
r_©rr¶r]©r¶r©r=r>r‹rörR©rHÚretrbs rKÚ get_verticeszEllipse.get_verticesÒóh€ð �:‰:˜Ÿ ™ Ò #Ø×*Ñ*Ó,×6Ñ6¸ÀÐ7HÓI‰Cà×*Ñ*Ó,×6Ñ6¸ÀÐ7HÓIˆCØ"%Ö&˜Q”�a•Ò&Ð&ùÒ&óÁ!A6cóö—|j|jkr"|j«jddg«}n!|j«jddg«}|D�cgc]
}t |«‘Œc}Scc}w)z¸
Return the co-vertices coordinates of the ellipse.
The definition can be found `here <https://en.wikipedia.org/wiki/Ellipse>`_
.. versionadded:: 3.8
r]r[r_rZr\r]s rKÚget_co_verticeszEllipse.get_co_verticesàr`ra)rrrrrr
r r/rJrOr‹rôrcr
rGrrgr=r„rkr>ryror2rar_rcr
rs@rKrCrC;s§ø„Ùòð ×ÑØ34õ ?óð ?òD ò&ò%ò òñ�j *Ó
-€Fò òñ
�Y  Ó *€Eò òñ�j *Ó
-€Fò òñ
�Y  Ó *€Eò2ò 'ö 'rLrCcóÞ‡—eZdZdZej
dˆfd„ «Zd„Zd„Zd„Z e
e e«Z d„Z d„Z
e
e
e «Zd„Zd „Ze
ee«Zd
„Zd „Zd „Zd
„Ze
ee«Zd„Zd„Zd„ZˆxZS)ÚAnnulusz
An elliptical annulus.
c ó~•—t‰|�di|¤Ž|j|«||_||_||_d|_y)a‰
Parameters
----------
xy : (float, float)
xy coordinates of annulus centre.
r : float or (float, float)
The radius, or semi-axes:
- If float: radius of the outer circle.
- If two floats: semi-major and -minor axes of outer ellipse.
width : float
Width (thickness) of the annular ring. The width is measured inward
from the outer ellipse so that for the inner ellipse the semi-axes
are given by ``r - width``. *width* must be less than or equal to
the semi-minor axis.
angle : float, default: 0
Rotation angle in degrees (anti-clockwise from the positive
x-axis). Ignored for circular annuli (i.e., if *r* is a scalar).
**kwargs
Keyword arguments control the `Patch` properties:
%(Patch:kwdoc)s
Nr:)r.r/Ú set_radiirGr=r2r™)rHrrãr=r2rIrJs €rKr/zAnnulus.__init__ôs=ø€ô2 ‰ÑÑ"˜6Ò"à �‰�qÔØˆŒ ؈Œ
؈Œ
؈�
rLcóÖ—|j|jk(r
|j}n|j|jf}dg|j¢|‘|j‘|j‘­zS)Nz.Annulus(xy=(%s, %s), r=%s, width=%s, angle=%s))Úar»rGr=r2©rHrãs rKrzAnnulus.__str__s]€Ø �6‰6�T—V‘VÒ Ø—‘‰Aà—‘˜Ÿ™Ð ˆAà?Ø9�$—+‘+Ð9˜qÐ9 $§*¡*Ð9¨d¯j©jÑ9ñ:ð :rLcó.—||_d|_d|_y)zs
Set the center of the annulus.
Parameters
----------
xy : (float, float)
NT)rEr™rœr{s rKrôzAnnulus.set_centers€ðˆŒ ؈Œ
؈�
rLcó—|jS)z!Return the center of the annulus.rOr‰s rKrczAnnulus.get_center*rlrLcóŠ—|t|j|j«kDr td«‚||_d|_d|_y)z¼
Set the width (thickness) of the annulus ring.
The width is measured inwards from the outer ellipse.
Parameters
----------
width : float
z>Width of annulus must be less than or equal to semi-minor axisNT)Úminrir»rr0r™rœrþs rKrzAnnulus.set_width0sD€ð ”3�t—v‘v˜tŸv™vÓ&Ò &ÜØPóRð
RðˆŒ ØˆŒ
؈�
rLcó—|jS)z1Return the width (thickness) of the annulus ring.rfr‰s rKrgzAnnulus.get_widthBrÑrLcó.—||_d|_d|_y)zq
Set the tilt angle of the annulus.
Parameters
----------
angle : float
NT)rGr™rœrxs rKryzAnnulus.set_angleHs€ðˆŒ ؈Œ
؈�
rLcó—|jS)z Return the angle of the annulus.rWr‰s rKrozAnnulus.get_angleTrÑrLcó@—t|«|_d|_d|_y)zv
Set the semi-major axis *a* of the annulus.
Parameters
----------
a : float
NT)r¯rir™rœ)rHris rKÚ
set_semimajorzAnnulus.set_semimajorZó€ô�q“ˆŒØˆŒ
؈�
rLcó@—t|«|_d|_d|_y)zv
Set the semi-minor axis *b* of the annulus.
Parameters
----------
b : float
NT)r¯r»r™rœrºs rKÚ
set_semiminorzAnnulus.set_semiminorfrtrLcóæ—tj|«dk(r|\|_|_n;tj|«dk(rt |«x|_|_n t d«‚d|_d|_y)aE
Set the semi-major (*a*) and semi-minor radii (*b*) of the annulus.
Parameters
----------
r : float or (float, float)
The radius, or semi-axes:
- If float: radius of the outer circle.
- If two floats: semi-major and -minor axes of outer ellipse.
)rQr:z(Parameter 'r' must be one or two floats.NT)rkrÛrir»r¯rr™rœrjs rKrgzAnnulus.set_radiirs]€ô �8‰8�A‹;˜$Ò Ø‰NˆDŒF�D•FÜ
�X‰X�a‹[˜BÒ
Ü# A›hÐ &ˆDŒF�T•VäÐGÓHÐ HàˆŒ
؈�
rLcó2—|j|jfS)z:Return the semi-major and semi-minor radii of the annulus.)rir»r‰s rKÚ get_radiizAnnulus.get_radiiˆs€à�v‰v�t—v‘vˆ~ÐrLcó—tj«j|j||f«Žj |j
«j |j|j«Žj|«Sr`) rrrKrrLr2r%rGrö)rHrÃrir»s rKÚ_transform_vertszAnnulus._transform_vertsŽsl€ððŒz×"Ñ"Ó$ß
‰U�D×*Ñ*¨A¨q¨6Ó2ð4ç
‰Z˜Ÿ
™
Ó
#ß
‰Y˜×.Ñ.¨t¯{©{Ó;ð=÷‰Y�uÓ
ð  rLcó—tjdd«}|j|j|j}}}|j |j ||«}|j |j ddd…||z
||z
«}tj|||ddd…fdg«}tj|jtj|jddtjtjg«}t||«|_
y)Nrrêr¶r\r)rrìrir»r=r{rjrkÚvstackÚhstackrirmrír™) rHrìrir»r³rïrðrñr«s rKrèzAnnulus._recompute_path•sÕ€ä�h‰h�q˜#Óˆð—&‘&˜$Ÿ&™& $§*¡*ˆaˆ1ˆØ
×
"Ñ
" 3§<¡<°°AÓ
6ˆØ
×
"Ñ
" 3§<¡<±°"°Ñ#5°q¸1±u¸aÀ!¹eÓ
DˆÜ �I‰I�r˜2˜r !¢Q $™x¨Ð0Ó 1ˆÜ �I‰I�s—y‘y¤$§+¡+Ø—y‘y  �}¤d§k¡kÜ—~‘~ð'ó
(ˆô˜!˜Q“Zˆ�
rLcóR—|j€|j«|jSr`rr‰s rKrOzAnnulus.get_path¤rrL©r6)rrrrr
r r/rrôrcr
rGrrgr=ryror2rsrvrgryÚradiir{rèrOr
rs@rKrereïs¡ø„ñð×Ñôóðò@:ò
òñ�j *Ó
-€Fòò$ñ
�Y  Ó *€Eò
òñ
�Y  Ó *€Eò
ò
òò,ñ
�Y  Ó *€Eòò
 örLrecóf‡—eZdZdZd„Zej dˆfd„ «Zd„Zd„Z e
e e«Z ˆxZ S)ÚCirclez
A circle patch.
cób—|jd|jd|jf}d}||zS)NrrzCircle(xy=(%g, %g), radius=%g))rGr[r3s rKrzCircle.__str__®s1€Ø�{‰{˜1‰~˜tŸ{™{¨1™~¨t¯{©{Ð:ˆØ.ˆØ�T‰zÐrLc óD•—t‰|�||dz|dzfi|¤Ž||_y)a&
Create a true circle at center *xy* = (*x*, *y*) with given *radius*.
Unlike `CirclePolygon` which is a polygonal approximation, this uses
Bezier splines and is much closer to a scale-free circle.
Valid keyword arguments are:
%(Patch:kwdoc)s
rQN)r.r/r[)rHrr[rIrJs €rKr/zCircle.__init__³s*ø€ô ‰Ñ˜˜V a™Z¨°!©Ñ>°vÒ>؈� rLcó4—d|zx|_|_d|_y)zm
Set the radius of the circle.
Parameters
----------
radius : float
rQTN)r=r>rœr÷s rKrøzCircle.set_radiusÂs€ð$% v¡:Ð-ˆŒ
�T”[؈�
rLcó —|jdz S)z Return the radius of the circle.rHrær‰s rKÚ
get_radiuszCircle.get_radiusÍs€à�z‰z˜B‰ÐrLrA)
rrrrrr
r r/rørˆr
r[r
rs@rKrƒrƒªs?ø„ñòð
×Ñô óð ò òñ�j *Ó
-„FrLrƒc󀇗eZdZdZd„Zej ddddœˆfd„
«Zejd„«Z
d„Z d „Z ˆxZ
S)
ÚArczx
An elliptical arc, i.e. a segment of an ellipse.
Due to internal optimizations, the arc cannot be filled.
cóº—|jd|jd|j|j|j|j|j
f}d}||zS)NrrzEArc(xy=(%g, %g), width=%g, height=%g, angle=%g, theta1=%g, theta2=%g))rGr=r>r2rärår3s rKrz Arc.__str__ÛsO€Ø— ‘ ˜A‘ § ¡ ¨A¡°·
±
Ø— ‘ ˜TŸZ™Z¨¯©°d·k±kðCˆð<ˆà�T‰zÐrLr6g€v@)r2räråc ó8•—|jdd«}|r td«‚t‰ |� |||fd|i|¤Ž||_||_|j
«\|_|_|_ |_
tj|j|j«|_
y)a²
Parameters
----------
xy : (float, float)
The center of the ellipse.
width : float
The length of the horizontal axis.
height : float
The length of the vertical axis.
angle : float
Rotation of the ellipse in degrees (counterclockwise).
theta1, theta2 : float, default: 0, 360
Starting and ending angles of the arc in degrees. These values
are relative to *angle*, e.g. if *angle* = 45 and *theta1* = 90
the absolute starting angle is 135.
Default *theta1* = 0, *theta2* = 360, i.e. a complete ellipse.
The arc is drawn in the counterclockwise direction.
Angles greater than or equal to 360, or smaller than 0, are
represented by an equivalent angle in the range [0, 360), by
taking the input value mod 360.
Other Parameters
----------------
**kwargs : `~matplotlib.patches.Patch` properties
Most `.Patch` properties are supported as keyword arguments,
except *fill* and *facecolor* because filling is not supported.
%(Patch:kwdoc)s
r)FzArc objects cannot be filledr2N)Ú
setdefaultrr.r/räråÚ_theta_stretchÚ_theta1Ú_theta2Ú_stretched_widthÚ_stretched_heightrrìr™)
rHrr=r>r2rärårIr)rJs
€rKr/z Arc.__init__âsŽø€ðH× Ñ  ¨Ó/ˆÙ ÜÐ;Ó<Ð <ä
‰Ñ˜˜U FÑB°%ÐB¸6ÒBàˆŒ ؈Œ à#'×#6Ñ#6Ó#8ñ !ˆŒ�t”| TÔ%:Ø
Ô Ü—X‘X˜dŸl™l¨D¯L©LÓ9ˆ�
rLcó<‡—|j«sy|j«|j«|j«}|j |j
|j f«|j d«z
\}}d}||kr||krtj||«Sd„Šˆfd„}tj|jxs|jd¬«j«|j«z
}tj «j#|«}t%«} t'|j(dd|j(d d«D]~\}
} |g|
¢| ¢­Ž} | j*\}
}t-j.t-j0||
««d
zd
z}| j3||j4|k||j6kz«Œ€t9| «|j6gz} |j4}t-j:|j4«}|j=t-j>|«t-j@|«f«}|jB}| D]=}|r5tjD||d «|_!tj||«d}nd }|}Œ?||_!y)
aÑ
Draw the arc to the given *renderer*.
Notes
-----
Ellipses are normally drawn using an approximation that uses
eight cubic Bezier splines. The error of this approximation
is 1.89818e-6, according to this unverified source:
Lancaster, Don. *Approximating a Circle or an Ellipse Using
Four Bezier Cubic Splines.*
https://www.tinaja.com/glib/ellipse4.pdf
There is a use case where very large ellipses must be drawn
with very high accuracy, and it is too expensive to render the
entire ellipse with enough segments (either splines or line
segments). Therefore, in the case where either radius of the
ellipse is large enough that the error of the spline
approximation will be visible (greater than one pixel offset
from the ideal), a different technique is used.
In that case, only the visible parts of the ellipse are drawn,
with each visible arc using a fixed number of spline segments
(8). The algorithm proceeds as follows:
1. The points where the ellipse intersects the axes (or figure)
bounding box are located. (This is done by performing an inverse
transformation on the bbox such that it is relative to the unit
circle -- this makes the intersection calculation much easier than
doing rotated ellipse intersection directly.)
This uses the "line intersecting a circle" algorithm from:
Vince, John. *Geometry for Computer Graphics: Formulae,
Examples & Proofs.* London: Springer-Verlag, 2005.
2. The angles of each of the intersection points are calculated.
3. Proceeding counterclockwise starting in the positive
x-direction, each of the visible arc-segments between the
pairs of vertices are drawn using the Bezier arc
approximation technique implemented in `.Path.arc`.
Nr\gø\!ÛÈAcóª—||z
}||z
}||z||zz}||z||zz
}||z}||z
} | dk\r�tjd|«}
tj| «} tj||z|
|z| zz|z | |zt |«| zz|z g||z|
|z| zz
|z | |zt |«| zz
|z gg«Stj
d«S)Nr6rr´)rkÚcopysignÚsqrtr,rërº) rBrCrDrEr r
Údr2ÚDÚD2ÚdiscrimÚsign_dyÚ sqrt_discrims rKÚline_circle_intersectz'Arc.draw.<locals>.line_circle_intersectWs€Ø�b‘ˆBØ�b‘ˆBØ�r‘'˜B ™GÑ#ˆCØ�R‘˜"˜r™'Ñ!ˆAØ�Q‘ˆBؘB‘hˆGؘ#Š~ÜŸ+™+ a¨Ó,�Ü!Ÿw™w wÓ/� Ü—x‘xؘ2‘v ¨"¡ ¨|Ñ ;Ñ;¸sÑBØ�r˜B‘w¤ R£¨<Ñ!7Ñ7¸3Ñ>ð@à˜2‘v ¨"¡ ¨|Ñ ;Ñ;¸sÑBØ�r˜B‘w¤ R£¨<Ñ!7Ñ7¸3Ñ>ð@ðAóBðBô —x‘x Ó'Ð'rLcóÀ•—d}||kr||}}n||}}||kr||}}n||}}‰ ||||«} | j\}
} | ||z
|
k|
||zkz||z
| kz| ||zkzS)Ng•Ö&è .>)ÚT)
rBrCrDrEÚepsilonÚx0eÚx1eÚy0eÚy1eÚxysÚxsÚysr�s
€rKÚsegment_circle_intersectz*Arc.draw.<locals>.segment_circle_intersectis ø€ØˆGØ�BŠwؘr�S‘à˜r�S�Ø�BŠwؘr�S‘à˜r�S�Ù'¨¨B°°BÓ7ˆCØ—U‘U‰FˆB�ØØ�w‘ Ñ#¨¨S°7©]Ñ(:Ñ;ؘ‘= 2Ñ%ñ'Ø*,¨s°W©}Ñ*<ñ>ñð
rLF©Úrootr¶rrêéT)#rórJr°r‚rör‘r’r'rùrrJÚaxesÚ
get_figurerMrNrr@Ú transformedÚsetÚziprjrŸrkÚrad2degrrr�r�ÚsortedÚdeg2radraÚcosÚsinr™rì)rHríÚdata_to_screen_transÚpwidthÚpheightÚ inv_errorr¨Úbox_path_transformÚbox_pathÚthetasÚp0Úp1rrbrcÚthetaÚ
last_thetaÚ
theta1_radrsÚ
path_originalr�s @rKrùzArc.drawslø€ð\×ÑÔ!Ø à ×!Ñ!Ô#à ×ÑÔð $×6Ñ6Ó8Ðà × *Ñ *¨D×,AÑ,AØ,0×,BÑ,Bð,Dó
Eà × *Ñ *¨6Ó 2ñ
3ñ ˆ�ð-ˆ à �IÒ  '¨IÒ"5Ü—:‘:˜d HÓ-Ð -ò (ô$ ô*
× &Ñ &¨¯ © Ò(P°T·_±_È%°_Ó5P×'VÑ'VÓ WØ× Ñ Ó"ñ
#ð ô×&Ñ&Ó(×4Ñ4Ð5GÓHˆä“ˆä˜(×+Ñ+¨C¨RÐ0°(×2CÑ2CÀAÀBÐ2GÓHò H‰FˆB�Ù)Ð3¨2Ð3°Ò3ˆBØ—4‘4‰DˆAˆqô—Z‘Z¤§
¡
¨1¨aÓ 0Ó1°CÑ7¸3Ñ>ˆEØ �M‰MØ�t—|‘| eÑ+°¸¿ ¹ Ñ0DÑEÑFõ
Hð
 Hô˜“ 4§<¡< .Ñ0ˆØ—\‘\ˆ
Ü—Z‘Z § ¡ Ó-ˆ
Ø×(Ñ(Ü
�V‰V�JÓ
¤§¡¨
Ó!3Ð 4ó
ˆð
Ÿ
™
ˆ
Øò ˆEÙÜ!ŸX™X j°%¸Ó;�”
Ü—
‘
˜4 Ô*Ø‘à�؉Jð ð#ˆ�
rLc
óJ—|j«}td„t||j|j|j
|j f«D««rK|\|_|_|_|_tj|j|j«|_ yy)Nc3ó,K—|] \}}||k7–—Œy­wr`r:)rdrir»s rKrgz#Arc._update_path.<locals>.<genexpr>¤sèø€ò6™$˜!˜Qˆq�A�vñ6ùs‚)
rŽrpr°r�r�r‘r’rrìr™)rHÚ stretcheds rKr°zArc._update_path¡sŠ€à×'Ñ'Ó)ˆ Ü ñ6¤#ؘDŸL™L¨$¯,©,¸×8MÑ8MØ ×2Ñ2ð4ó#5ô6ô 6ð(1ñ
%ˆTŒ\˜4œ<¨Ô)>Ø
Ô
#ÜŸ™ $§,¡,°· ± Ó=ˆD�Jð  6rLcó†—d„}|j|j«}|j|j«}||k7rj|j|j
k7r|jdz|j
dzk(s2||j||z «}||j
||z «}||||fS|j|j
||fS)Ncóè—tj|«}tj|«}tj|«}tjtj
||z|««}|dzdzS)Nrê)rkr³r´rµr±r)r¿rKrbrcÚsthetas rKÚ
theta_stretchz)Arc._theta_stretch.<locals>.theta_stretch®sV€Ü—J‘J˜uÓ%ˆEÜ—‘�u“
ˆAÜ—‘�u“
ˆAÜ—Z‘Z¤§
¡
¨5°1©9°aÓ 8Ó9ˆFà˜S‘L CÑ'Ð 'rLrê)rr=rr>rärå)rHrÉr=r>rärås rKrŽzArc._theta_stretch«s´€ò (ð×#Ñ# D§J¡JÓ/ˆØ×$Ñ$ T§[¡[Ó1ˆð
�VŠOð—[‘[ D§K¡KÒ/Ø—[‘[ 3Ñ&¨$¯+©+¸Ñ*;Ò;á" 4§;¡;°¸±Ó?ˆFÙ" 4§;¡;°¸±Ó?ˆFؘ6 5¨&Ð0Ð 0Ø�{‰{˜DŸK™K¨°Ð6Ð6rL)rrrrrr
r r/r
r rùr°rŽr
rs@rKrŠrŠÔsVø„ñò ð×Ñà 3¨uõ-:óð-:ð^ ×ÑñL#ó ðL#ò\>ö7rLrŠcó˜—|€i}|j«}|jdd«}|j|«}|j|«}t |j
|dz z
|j |dz z
f|j|z|j|z|tj«d¬«}|j|«|j|«y)a>
A debug function to draw a rectangle around the bounding
box returned by an artist's `.Artist.get_window_extent`
to test whether the artist is returning the correct bbox.
*props* is a dict of rectangle props with the additional property
'pad' that sets the padding around the bbox in points.
NÚpadérQF)rr=r>r)röÚclip_on)
ÚcopyÚpopr#rÿr,rBrCr=r>rr�rrù)r
ríÚpropsr)rËrMrãs rKÚ bbox_artistrÑÊs¸€ð
€}ØˆØ �J‰J‹L€EØ
�)‰)�E˜1Ó
€CØ
×
#Ñ
# CÓ
(€CØ #ˆ6× #Ñ # HÓ -€DÜØ �G‰G�c˜A‘gÑ ˜tŸw™w¨¨q©Ñ0Ð 1Ø�j‰j˜3Ñ t§{¡{°SÑ'8Ø
œZ×9Ñ9Ó;ÀUô L€Að‡H�HˆU„O؇F�Fˆ8ÕrLcóª—t|j|j|j|dd¬«}|�|j |«|j |«y)z¼
A debug function to draw a rectangle around the bounding
box returned by an artist's `.Artist.get_window_extent`
to test whether the artist is returning the correct bbox.
F)rr=r>r"r)rÍN)r,r½r=r>r�rù)rMrír(rQrãs rKÚ draw_bboxrÓásE€ô �T—W‘W D§J¡J°t·{±{Ø!¨°uô >€Aà ÐØ �‰˜Ô؇F�Fˆ8ÕrLcó|—eZdZdZd„Zd„Zed„«Zed„«Zee jddd¬ «d
„««Z y ) Ú_Stylez®
A base class for the Styles. It is meant to be a container class,
where actual styles are declared as subclass of it, and it
provides some helper functions.
có"—tjjdi|j›d�|j «|j›d�|j «dzdj t
dj|j««zdzi¤Žy)Nz:tablez:table_and_acceptsz
.. ACCEPTS: [ú|z '{}' ú]r:) r
r ÚregisterrÚ
pprint_stylesÚjoinrnÚformatÚ _style_list©Úclss rKÚ__init_subclass__z_Style.__init_subclass__õs‰€ô ×Ñ×#Ñ#ñ Ø�|‰|ˆn˜FÐ # S×%6Ñ%6Ó%8Ø�|‰|ˆnÐ.Ð /Ø×!Ñ!Ó#Ø)ñ*à—(‘(œ3˜xŸ™°·±Ó@ÓAñBðñð'
ó rLc ó¸—|jdd«jd«}|dj«} |j|} |ddD�cgc]}|jd«‘Œ}}|D� �
cic]\} }
| t
|
«“Œ} } }
|d
ii| ¥|¥¤ŽS#t$r}t d|›�«|‚d}~wwxYwcc}wcc}
} w#t
$r}t d |›�«|‚d}~wwxYw) z>Return the instance of the subclass with the given style name.rµr¶ú,rzUnknown style: Nrú=zIncorrect style argument: r:)ÚreplaceroÚlowerrÝÚKeyErrorrr¯) rßÚ stylenamerIÚ_listÚ_nameÚ_clsÚerrrÃÚ
_args_pairÚkrñÚ_argss rKÚ__new__z_Style.__new__ s€ð×!Ñ! # rÓ*×0Ñ0°Ó5ˆØ�a‘—‘Ó ˆð GØ—?‘? 5Ñ)ˆDð EØ27¸¸°)Ö<¨B˜"Ÿ(™( 3�-Ð<ˆJÐ<Ø-7×8¡T Q¨�Qœ˜a›‘[Ð8ˆEÑ8ñÑ*Ð)˜Ð) &Ð)Ñ*Ð*øôò Gܘ¨y¨mÐ<Ó=À3Ð Fûð Güò=ùÛ8øÜò EÜØ,¨Y¨MÐ:ó<ØADð
Eûð EúsMBÁB<Á
B1Á%B<Á,B6ÂB<Â B.ÂB)Â)B.Â1 B<Â< CÃCÃCcó—|jS)z(Return a dictionary of available styles.)rÝrÞs rKÚ
get_stylesz_Style.get_styles s€ð�‰ÐrLc
ól—dg|jj«D��cgc];\}}|jd|›d�tt j
|««ddxsdf‘Œ=c}}¢}t
|ŽD�cgc]}td„|D««‘Œ}}djd„|D««}d jd
|djd „t
|d |«D««|g|dd
D�cgc]$}djd„t
||«D««‘Œ&c}¢|‘«}tj|d¬«Scc}}wcc}wcc}w)z5Return the available styles as pretty-printed string.)ÚClassÚNameÚ
Parametersz``rr¶r·c3ó2K—|]}t|«–—Œy­wr`)rF)rdÚcells rKrgz'_Style.pprint_styles.<locals>.<genexpr>* sèø€Ò4 T”s˜4—yÑ4ùs‚z c3ó&K—|] }d|z–—Œ y­w)rãNr:)rdÚcls rKrgz'_Style.pprint_styles.<locals>.<genexpr>+ sèø€Ò#?° C¨"¥HÑ#?ùs‚r9r¶c3óDK—|]\}}|j|«–—Œy­wr`©Úljust©rdr÷rùs rKrgz'_Style.pprint_styles.<locals>.<genexpr>/ sèø€ÒL©¨¨r�d—j‘j —nÑLùó‚ rNc3óDK—|]\}}|j|«–—Œy­wr`rûrýs rKrgz'_Style.pprint_styles.<locals>.<genexpr>1 sèø€ÒI©8¨4°˜Ÿ
™
 2ŸÑIùrþz )Úprefix) rÝÚitemsrÚstrÚinspectÚ signaturer°ÚmaxrÛÚtextwrapÚindent)rßrÅÚtableÚcolumnÚcol_lenÚtable_formatstrÚrowÚ rst_tables rKrÚz_Style.pprint_styles sK€ð1ð>ð %(§O¡O×$9Ñ$9Ó$;÷ =ñ
!�t˜Sð —L‘Là˜˜˜b�Mäœ×)Ñ)¨#Ó.Ó/°°"Ð5Ò?¸ò Aó=ð>ˆôDGÈÀ;ÖO¸”3Ñ4¨VÔ4Õ4ÐOˆÐOØŸ)™)Ñ#?°wÔ#?Ó?ˆØ—I‘IØ Ø Ø �I‰IÑL´S¸¸q¹À7Ó5KÔLÓ LØ ð 
ð ˜q˜r˜ö$Øð�i‰iÑI´s¸3ÀÓ7HÔIÕIò$ð 
ð
ð
ó ˆ ô�‰˜y°Ô9Ð9ùó%=ùòPùò$s AD&Á/D,Ã)D1
z3.10.0z%This method is never used internally.z6No replacement. Please open an issue if you use this.)ÚmessageÚ alternativecó‚—t||j«st|›d|j›�«‚||j|<y)zRegister a new style.z must be a subclass of N)Ú
issubclassÚ_BaserrÝ)rßrÅÚstyles rKrÙz_Style.register7 s;€ô˜% §¡Ô+Ü ˜wÐ&=¸c¿i¹i¸[ÐIÓJÐ JØ %ˆ�‰˜ÒrLN) rrrrràrïÚ classmethodrñrÚr Ú
deprecatedrÙr:rLrKrÕrÕîsi„ñò  ò&+ð$ñóððñ:óð:ð.Ø€T‡_�_ØØ7ØLôñ
&ó óñ &rLrÕ©rÅcó„—|€tjt||¬«S|||xs|jj «<|S)z=Class decorator that stashes a class in a (style) dictionary.r)Ú functoolsÚpartialÚ_register_stylerrå)Ú
style_listrßrÅs rKrrD s=€à
€{Ü× Ñ ¤°*À4ÔHÐHØ/2€JˆtÒ+�s—|‘|×)Ñ)Ó+Ñ,Ø €JrLcó¼—eZdZdZiZee«Gd„d««Zee«Gd„d««Zee«Gd„d««Zee«Gd„d ««Z ee«Gd
„d e ««Z
ee«Gd „d
««Z ee«Gd„d««Z ee«Gd„d««Z
ee«Gd„d««Zee«Gd„de««Zy)ÚBoxStylea¦
`BoxStyle` is a container class which defines several
boxstyle classes, which are used for `FancyBboxPatch`.
A style object can be created as::
BoxStyle.Round(pad=0.2)
or::
BoxStyle("Round", pad=0.2)
or::
BoxStyle("Round, pad=0.2")
The following boxstyle classes are defined.
%(BoxStyle:table)s
An instance of a boxstyle class is a callable object, with the signature ::
__call__(self, x0, y0, width, height, mutation_size) -> Path
*x0*, *y0*, *width* and *height* specify the location and size of the box
to be drawn; *mutation_size* scales the outline properties such as padding.
có—eZdZdZdd„Zd„Zy)úBoxStyle.Squarez
A square box.có—||_y©z 
Parameters
----------
pad : float, default: 0.3
The amount of padding around the original box.
N©rË©rHrËs rKr/zBoxStyle.Square.__init__p ó €ðˆD�HrLcóª—||jz}|d|zz|d|zz}}||z
||z
}}||z||z}}tj||f||f||f||fg«S©NrQ©rËrr) rHrBrCr=r>Ú
mutation_sizerËrDrEs rKÚ__call__zBoxStyle.Square.__call__y s{€Ø $§(¡(Ñ*ˆCà! A¨¡G™O¨V°a¸#±gÑ-=�6ˆEà˜#‘X˜r C™x�ˆBؘ%‘Z  f¡�ˆBÜ×&Ñ&Ø�b�˜B ˜8 b¨" X°°B¨xÐ8ó:ð
:rLN©r©rrrrr/r)r:rLrKÚSquarerl s„áó ó :rLr,có—eZdZdZdd„Zd„Zy)úBoxStyle.CirclezA circular box.có—||_yr!r"r#s rKr/zBoxStyle.Circle.__init__‡ r$rLcó¶—||jz}|d|zz|d|zz}}||z
||z
}}tj||dz z||dz zft||«dz «Sr&)rËrÚcircler)rHrBrCr=r>r(rËs rKr)zBoxStyle.Circle.__call__� sr€Ø $§(¡(Ñ*ˆCØ! A¨¡G™O¨V°a¸#±gÑ-=�6ˆEà˜#‘X˜r C™x�ˆBÜ—;‘;  U¨Q¡Y¡°°V¸a±Z±Ð@Ü # E¨6Ó 2°QÑ 6ó8ð
8rLNr*r+r:rLrKrƒr.ƒ s„áó ó 8rLrƒcó—eZdZdZdd„Zd„Zy)úBoxStyle.EllipsezC
An elliptical box.
.. versionadded:: 3.7
có—||_yr!r"r#s rKr/zBoxStyle.Ellipse.__init__  r$rLcóf—||jz}|d|zz|d|zz}}||z
||z
}}|tjd«z }|tjd«z }t«j ||«j ||dz z||dz z«} | j
tj««Sr&) rËÚmathr–rrKr%Útransform_pathrrH)
rHrBrCr=r>r(rËrir»rQs
rKr)zBoxStyle.Ellipse.__call__© s®€Ø $§(¡(Ñ*ˆCØ! A¨¡G™O¨V°a¸#±gÑ-=�6ˆEà˜#‘X˜r C™x�ˆBØœŸ ™  !› Ñ$ˆAØœŸ™ 1›Ñ%ˆAÜ“J×$Ñ$ Q¨Ó*×4Ñ4°R¸%À!¹)±^Ø57¸&À1¹*±_óFˆEà×'Ñ'¬×(8Ñ(8Ó(:Ó;Ð ;rLNr*r+r:rLrKrCr3˜ s„ñ ó  ó <rLrCcó—eZdZdZdd„Zd„Zy)úBoxStyle.LArrowz,A box in the shape of a left-pointing arrow.có—||_yr!r"r#s rKr/zBoxStyle.LArrow.__init__¸ r$rLc ó"—||jz}|d|zz|d|zz}}||z
||z
}}||z||z}}||z
dz } | dz }
||dz z}tj||
z|f||f||f||
z|f||
z||
zf|| z
|| zf||
z||
z
f||
z|fg«S©NrQgffffffö?r'© rHrBrCr=r>r(rËrDrEr Údxxs rKr)zBoxStyle.LArrow.__call__Á sâ€à $§(¡(Ñ*ˆCà! A¨¡G™O¨V°a¸#±gÑ-=�6ˆEà˜#‘X˜r C™x�ˆBؘ%‘Z  f¡�ˆBà�r‘'˜Q‘ˆBØ�q‘&ˆCØ�c˜C‘i‘ˆBä×&Ñ&Ø�s‘(˜B� " b ¨B°¨8°b¸3±hÀ°^Ø�s‘(˜B ™HÐ%¨¨R©°°b±Ð'9Ø�s‘(˜B ™HÐ%Ø�s‘(˜B�ð!ó"ð
"rLNr*r+r:rLrKÚLArrowr9´ s„á:ó ó "rLr?có—eZdZdZd„Zy)úBoxStyle.RArrowz-A box in the shape of a right-pointing arrow.có¨—tjj||||||«}d|z|z|jdd…dfz
|jdd…df<|S)NrQr)rr?r)rj)rHrBrCr=r>r(Úps rKr)zBoxStyle.RArrow.__call__Ø sT€Ü—‘×(Ñ(Ø�b˜"˜e V¨]ó<ˆAà  2™v¨™~°·
±
º1¸a¸4Ñ0@Ñ@ˆA�J‰J’q˜!�tÑ ØˆHrLN©rrrrr)r:rLrKÚRArrowrAÔ s
„á;ó rLrEcó—eZdZdZdd„Zd„Zy)úBoxStyle.DArrowz&A box in the shape of a two-way arrow.có—||_yr!r"r#s rKr/zBoxStyle.DArrow.__init__ã r$rLcóB—||jz}|d|zz}||z
||z
}}||z||z}}||z
dz } | dz }
||dz z}tj||
z|f||f|||
z
f|| z|
z|| zf|||
zf||f||
z|f||
z||
zf|| z
|| zf||
z||
z
f||
z|fg «Sr<r'r=s rKr)zBoxStyle.DArrow.__call__ì s€à $§(¡(Ñ*ˆCð˜a #™gÑ%ˆFà˜#‘X˜r C™x�ˆBؘ%‘Z  f¡�ˆBà�r‘'˜Q‘ˆBØ�q‘&ˆCØ�c˜C‘i‘ˆBä×&Ñ&Ø�c‘˜2�  R Ø�R˜#‘X�  b¡¨3¡°°R±Ð 8Ø�R˜#‘X�Ø�R�˜2 ™8 R˜.Ø�c‘˜2 ™8Ð$ r¨B¡w°°R±Ð&8Ø�c‘˜2 ™8Ð$Ø�c‘˜2�ð( ó!ð
!rLNr*r+r:rLrKÚDArrowrGÞ s„á4ó ó !rLrJcó—eZdZdZdd„Zd„Zy)úBoxStyle.RoundzA box with round corners.Ncó —||_||_y)zù
Parameters
----------
pad : float, default: 0.3
The amount of padding around the original box.
rounding_size : float, default: *pad*
Radius of the corners.
N©rËÚ
rounding_size©rHrËrOs rKr/zBoxStyle.Round.__init__
ó€ðˆDŒHØ!.ˆDÕ rLcóø—||jz}|jr||jz}n|}|d|zz|d|zz}}||z
||z
}}||z||z} }||z|f||z
|f||f|||zf|| |z
f|| f||z
| f||z| f|| f|| |z
f|||zf||f||z|f||z|fg}
tjtjtj
tj
tjtj
tj
tjtj
tj
tjtj
tj
tj g} t|
| «Sr&)rËrOrrmrÂÚCURVE3rí© rHrBrCr=r>r(rËÚdrrDrEÚcpÚcoms rKr)zBoxStyle.Round.__call__
sr€ð  $§(¡(Ñ*ˆCð×!Ò!Ø" T×%7Ñ%7Ñ7‘à�à! A¨¡G™O¨V°a¸#±gÑ-=�6ˆEà˜#‘X˜r C™x�ˆBؘ%‘Z  f¡�ˆBð˜‘7˜B�-ؘ‘7˜B�-Ø�r�(˜R  b¡˜MØ�r˜B‘w�-Ø�r�(˜R "™W b˜Mؘ‘7˜B�-Ø�r�(˜R  b¡˜MØ�r˜B‘w�-Ø�r�(˜R "™W b˜Mؘ‘7˜B�-ð !ˆBô—;‘;Ü—;‘;Ü—;‘;¤§ ¡ Ü—;‘;Ü—;‘;¤§ ¡ Ü—;‘;Ü—;‘;¤§ ¡ Ü—;‘;Ü—;‘;¤§ ¡ Ü—>‘>ð #ˆCô˜˜C“=Ð rL©rNr+r:rLrKÚRoundrL
s„á'ó
/ó( !rLrYcó—eZdZdZdd„Zd„Zy)úBoxStyle.Round4zA box with rounded edges.Ncó —||_||_y)z÷
Parameters
----------
pad : float, default: 0.3
The amount of padding around the original box.
rounding_size : float, default: *pad*/2
Rounding of edges.
NrNrPs rKr/zBoxStyle.Round4.__init__A
rQrLcóF—||jz}|jr||jz}n|dz }|d|zzd|zz
}|d|zzd|zz
}||z
|z||z
|z}}||z||z} }||f||z||z
f||z
||z
f||f||z||zf||z| |z
f|| f||z
| |zf||z| |zf|| f||z
| |z
f||z
||zf||f||fg}
tjtjtjtjtjtjtjtjtjtjtjtjtjtj
g} t|
| «S)NrHrQ)rËrOrrmÚCURVE4rírTs rKr)zBoxStyle.Round4.__call__M
s§€ð  $§(¡(Ñ*ˆCð×!Ò!Ø" T×%7Ñ%7Ñ7‘à˜2‘X�à˜A ™G‘O a¨"¡fÑ,ˆEؘa #™gÑ%¨¨B©Ñ.ˆFà˜#‘X ‘] B¨¡H¨r¡M�ˆBؘ%‘Z  f¡�ˆBà�r�(ؘ‘7˜B ™GÐ$ r¨B¡w°°R±Ð&8¸2¸r¸(ؘ‘7˜B ™GÐ$ r¨B¡w°°R±Ð&8¸2¸r¸(ؘ‘7˜B ™GÐ$ r¨B¡w°°R±Ð&8¸2¸r¸(ؘ‘7˜B ™GÐ$ r¨B¡w°°R±Ð&8¸2¸r¸(Ø�r�(ð ˆBô—;‘;Ü—;‘;¤§ ¡ ¬T¯[©[Ü—;‘;¤§ ¡ ¬T¯[©[Ü—;‘;¤§ ¡ ¬T¯[©[Ü—;‘;¤§ ¡ ¬T¯[©[Ü—>‘>ð #ˆCô˜˜C“=Ð rLrXr+r:rLrKÚRound4r[=
s„á'ó
/ó !rLr_có$—eZdZdZdd„Zd„Zd„Zy)úBoxStyle.SawtoothzA box with a sawtooth outline.Ncó —||_||_y)z÷
Parameters
----------
pad : float, default: 0.3
The amount of padding around the original box.
tooth_size : float, default: *pad*/2
Size of the sawtooth.
N)rËÚ
tooth_size)rHrËrcs rKr/zBoxStyle.Sawtooth.__init__r
s€ðˆDŒHØ(ˆD�OrLcó`—||jz}|j€|jdz|z}n|j|z}|dz }|d|zz|z
}|d|zz|z
}t||z
|dzz «dz} t||z
|dzz «dz}
||z
|z||z
|z}}||z||z} } |gtj||z| |z
d| zdz«¢| | |z| | |z
g|
zdd|
zdz¢| ‘tj| |z
||zd| zdz«¢|||z
|||zg|
zdd|
zdz¢}
g|||z
|||zg| zdd| zdz¢|‘tj||z| |z
d|
zdz«¢| | |z| | |z
g| zdd| zdz¢| ‘tj| |z
||zd|
zdz«¢}gt |
|«¢|
d|df‘S)NrrQrr)rËrcÚroundrkÚlinspacer°)rHrBrCr=r>r(rËrcÚhszÚdsx_nÚdsy_nrDrEr¦r§s rKÚ_get_sawtooth_verticesz(BoxStyle.Sawtooth._get_sawtooth_vertices~
su€ð  $§(¡(Ñ*ˆCð�‰Ð&Ø!ŸX™X¨™]¨]Ñ:‘
à!Ÿ_™_¨}Ñ<�
à˜q‘.ˆCؘA ™G‘O jÑ0ˆEؘa #™gÑ%¨
Ñ2ˆFô˜5 :Ñ-°*¸q±.ÑAÓBÀQÑFˆEܘ6 JÑ.°:À±>ÑBÓCÀaÑGˆEà˜#‘X ‘^ R¨#¡X°¡^�ˆBؘ%‘Z  f¡�ˆBððÜ—[‘[  c¡¨2°©8°Q¸±YÀ±]ÓCðà�r˜C‘x  R¨#¡XÐ.°Ñ6¸
¸¸5¹À¹ÐCðððô—[‘[  c¡¨2°©8°Q¸±YÀ±]ÓCðð�r˜C‘x  R¨#¡XÐ.°Ñ6¸
¸¸5¹À¹ÐCð ˆBð Ø�r˜C‘x  R¨#¡XÐ.°Ñ6¸
¸¸5¹À¹ÐCðàðä—[‘[  c¡¨2°©8°Q¸±YÀ±]ÓCðð�r˜C‘x  R¨#¡XÐ.°Ñ6¸
¸¸5¹À¹ÐCððð ô—[‘[  c¡¨2°©8°Q¸±YÀ±]ÓCð ˆBð2”S˜˜R“[Ð1 2 a¡5¨"¨Q©% .Ð1Ð 1rLcóF—|j|||||«}t|d¬«S)NTrÐ)rjr)rHrBrCr=r>r(Ú saw_verticess rKr)zBoxStyle.Sawtooth.__call__¤
s+€Ø×6Ñ6°r¸2¸uØ7=¸}óNˆLä˜ ¨TÔ2Ð 2rLrX)rrrrr/rjr)r:rLrKÚSawtoothran
s„á,ó
)ò$ 2óL 3rLrmcó—eZdZdZd„Zy)úBoxStyle.Roundtoothz&A box with a rounded sawtooth outline.có&—|j|||||«}tj||dgg«}tjgtj
tj
gt
|«dz
dzzztjgz}t||«S)NrrrQ)rjrkr¾rrmrSrFrí)rHrBrCr=r>r(rlris rKr)zBoxStyle.Roundtooth.__call__­
sŽ€Ø×6Ñ6°r¸2Ø7<¸fØ7DóFˆLôŸ>™>¨<¸,Àq¹/Ð9JÐ*KÓLˆLÜ—k‘k�]Ü—k‘k¤4§;¡;Ð/´C¸ Ó4EÀaÑ4GÈ!Ñ3KÑLñMä—n‘nÐ%ñ&ˆEô˜  eÓ,Ð ,rLNrDr:rLrKÚ
Roundtoothro©
s
„á4ó -rLrqN)rrrrrÝrr,rƒrCr?rErJrYr_rmrqr:rLrKrrL s@„ñð8€Ká�[Ó!÷:ð:ó"ð:ñ,�[Ó!÷8ð8ó"ð8ñ(�[Ó!÷<ð<ó"ð<ñ6�[Ó!÷"ð"ó"ð"ñ>�[Ó!ô�óó"ðñ�[Ó!÷"!ð"!ó"ð"!ñH�[Ó!÷7!ð7!ó"ð7!ñr�[Ó!÷.!ð.!ó"ð.!ñ`�[Ó!÷83ð83ó"ð83ñt�[Ó!ô -�Xó -ó"ñ -rLrcó—eZdZdZiZGd„d«Zee«Gd„de««Zee«Gd„de««Zee«Gd„d e««Z ee«Gd
„d e««Z
ee«Gd „d
e««Z y)ÚConnectionStylea
`ConnectionStyle` is a container class which defines
several connectionstyle classes, which is used to create a path
between two points. These are mainly used with `FancyArrowPatch`.
A connectionstyle object can be either created as::
ConnectionStyle.Arc3(rad=0.2)
or::
ConnectionStyle("Arc3", rad=0.2)
or::
ConnectionStyle("Arc3, rad=0.2")
The following classes are defined
%(ConnectionStyle:table)s
An instance of any connection style class is a callable object,
whose call signature is::
__call__(self, posA, posB,
patchA=None, patchB=None,
shrinkA=2., shrinkB=2.)
and it returns a `.Path` instance. *posA* and *posB* are
tuples of (x, y) coordinates of the two points to be
connected. *patchA* (or *patchB*) is given, the returned path is
clipped so that it start (or end) from the boundary of the
patch. The path is further shrunk by *shrinkA* (or *shrinkB*)
which is given in points.
có&—eZdZdZd„Zd„Z dd„Zy)úConnectionStyle._Basea“
A base class for connectionstyle classes. The subclass needs
to implement a *connect* method whose call signature is::
connect(posA, posB)
where posA and posB are tuples of x, y coordinates to be
connected. The method needs to return a path connecting two
points. This base class defines a __call__ method, and a few
helper methods.
có‡—ˆfd„S)zw
Return a predicate function testing whether a point *xy* is
contained in *patch*.
cóN•—‰jt|d|d¬««dS)Nrr)rbrc)rtr)rrÙs €rKú<lambda>z1ConnectionStyle._Base._in_patch.<locals>.<lambda>ò
s*ø€˜eŸn™nÜ " Q¡%¨2¨a©5Ô1ó3Ø34ñ6€rLr:)rHrÙs `rKÚ _in_patchzConnectionStyle._Base._in_patchí
s
ø€ó
6ð
6rLcó�—|r t||«\}}|r t||«\}}|S|S#t$rYŒ!wxYw#t$rY|SwxYw)a$
Clip *path* at its start by the region where *in_start* returns
True, and at its stop by the region where *in_stop* returns True.
The original path is assumed to start in the *in_start* region and
to stop in the *in_stop* region.
)rr)rHrRÚin_startÚin_stoprÞs rKÚ_clipzConnectionStyle._Base._clipõ
sm€ñðÜ.¨t°XÓ>‘G�A�tñðÜ.¨t°WÓ=‘G�D˜!ðˆK�4ˆKøô"òÙðûô
"òØØˆKðús„)–8© 5´5¸ AÁANc ó>—|j||«}|j||r|j|«nd|r|j|«nd«}|j||rtg|jd¢|‘­Žnd|r tg|jd¢|‘­Ž«}|Sd«}|S)zŠ
Call the *connect* method to create a path between *posA* and
*posB*; then clip and shrink the path.
Nrr¶)Úconnectr}ryrrj)rHÚposAÚposBÚshrinkAÚshrinkBÚpatchAÚpatchBrRs rKr)zConnectionStyle._Base.__call__ s¬€ð —<‘<  dÓ+ˆDØ—:‘:ØÙ*0�—‘˜vÔ&°dÙ*0�—‘˜vÔ&°dóˆDð
—:‘:ØÙ=D”
Ð9˜tŸ}™}¨QÑ/Ð9°Ó9È$Ù>E”
Ð:˜tŸ}™}¨RÑ0Ð:°'Ò:óˆDð
ˆKðLPóˆDð
ˆKrL)rHrHNN)rrrrryr}r)r:rLrKrruá
s„ñ
ò 6ò ð*BFô rLrcó—eZdZdZdd„Zd„Zy)úConnectionStyle.Arc3uN
Creates a simple quadratic Bézier curve between two
points. The curve is created so that the middle control point
(C1) is located at the same distance from the start (C0) and
end points(C2) and the distance of the C1 to the line
connecting C0-C2 is *rad* times the distance of C0-C2.
có—||_y)zy
Parameters
----------
rad : float
Curvature of the curve.
N)Úrad)rHr‰s rKr/zConnectionStyle.Arc3.__init__& r$rLcó—|\}}|\}}||zdz ||zdz }}||z
||z
}
} |j} || |
zz|| | zz
}
} ||f| |
f||fg}tjtjtjg}t||«S)NrH)r‰rrmrS)rHr€r�rDrEÚx2Úy2Úx12Úy12r r
Úfr6Úcyrjris rKrzConnectionStyle.Arc3.connect/ s©€Ø‰FˆB�؉FˆB�ؘR™ 2‘~¨¨R©°2¡~�ˆCؘ"‘W˜b 2™g�ˆBà—‘ˆAà˜1˜r™6‘\ 3¨¨R©¡<�ˆBà˜R˜Ø˜R˜Ø˜R˜ð"ˆHô—[‘[Ü—[‘[Ü—[‘[ð"ˆEô˜ %Ó(Ð (rLNr€©rrrrr/rr:rLrKÚArc3r‡ s„ñ ó ó )rLr’có—eZdZdZdd„Zd„Zy)úConnectionStyle.Angle3u
Creates a simple quadratic Bézier curve between two points. The middle
control point is placed at the intersecting point of two lines which
cross the start and end point, and have a slope of *angleA* and
*angleB*, respectively.
có —||_||_y)zÄ
Parameters
----------
angleA : float
Starting angle of the path.
angleB : float
Ending angle of the path.
N)ÚangleAÚangleB)rHr–r—s rKr/zConnectionStyle.Angle3.__init__K s€ð!ˆDŒKØ ˆD�KrLc
ó\—|\}}|\}}tjtj|j««}tjtj|j««}tjtj|j
««} tjtj|j
««}
t
||||||| |
«\} } ||f| | f||fg}
tjtjtjg}t|
|«Sr`)
r6r´Úradiansr–rµr—rrrmrS)rHr€r�rDrEr‹rŒÚcosAÚsinAÚcosBÚsinBr6r�rjris rKrzConnectionStyle.Angle3.connectY sހ؉FˆB�؉FˆB�ä—8‘8œDŸL™L¨¯©Ó5Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó5Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó5Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó5Ó6ˆDä% b¨"¨d°DØ&(¨"¨d°Dó:‰FˆB�ð˜R˜ 2 r (¨R°¨HÐ5ˆHÜ—[‘[¤$§+¡+¬t¯{©{Ð;ˆE䘠%Ó(Ð (rLN)éZrr‘r:rLrKÚAngle3r”B s„ñ ó !ó )rLrŸcó—eZdZdZdd„Zd„Zy)úConnectionStyle.Angleu]
Creates a piecewise continuous quadratic Bézier path between two
points. The path has a one passing-through point placed at the
intersecting point of two lines which cross the start and end point,
and have a slope of *angleA* and *angleB*, respectively.
The connecting edges are rounded with *rad*.
có.—||_||_||_y)a
Parameters
----------
angleA : float
Starting angle of the path.
angleB : float
Ending angle of the path.
rad : float
Rounding radius of the edge.
N)r–r—r‰)rHr–r—r‰s rKr/zConnectionStyle.Angle.__init__t s€ð!ˆDŒKØ ˆDŒKàˆD�HrLc
ó˜—|\}}|\}}tjtj|j««}tjtj|j««}tjtj|j
««} tjtj|j
««}
t
||||||| |
«\} } ||fg}
tjg}|jdk(r3|
j| | f«|jtj«nÎ|| z
|| z
}}tj||«}|j|z }|| z
|| z
}}tj||«}|j|z }|
j| ||zz| ||zzf| | f| ||zz| ||zzfg«|jtjtjtjg«|
j||f«|jtj«t|
|«S)Nr6)r6r´r™r–rµr—rrrmr‰rÁrÂrkrÚextendrS)rHr€r�rDrEr‹rŒršr›rœr�r6r�rjriÚdx1Údy1Úd1Úf1Údx2Údy2Úd2Úf2s rKrzConnectionStyle.Angle.connect‡ sՀ؉FˆB�؉FˆB�ä—8‘8œDŸL™L¨¯©Ó5Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó5Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó5Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó5Ó6ˆDä% b¨"¨d°DØ&(¨"¨d°Dó:‰FˆB�ð˜R˜�zˆHÜ—[‘[�MˆEà�x‰x˜2Š~Ø—‘  R Ô)Ø— ‘ œTŸ[™[Õ)à ™7 B¨¡G�S�Ü—X‘X˜c 3Ó'�Ø—X‘X ‘]�Ø ™7 B¨¡G�S�Ü—X‘X˜c 3Ó'�Ø—X‘X ‘]�Ø—‘ " s¨R¡x¡-°°c¸B±h±Ð!?Ø"$ b Ø"$ s¨R¡x¡-°°c¸B±h±Ð!?ð!AôBð— ‘ œdŸk™k¬4¯;©;¼¿ ¹ ÐDÔEà �O‰O˜R ˜HÔ %Ø �L‰LœŸ™Ô %䘠%Ó(Ð (rLN)ržrr6r‘r:rLrKÚAngler¡j s„ñ ó ó&! )rLr­có—eZdZdZdd„Zd„Zy)úConnectionStyle.Arcu?
Creates a piecewise continuous quadratic Bézier path between two
points. The path can have two passing-through points, a
point placed at the distance of *armA* and angle of *angleA* from
point A, another point with respect to point B. The edges are
rounded with *rad*.
NcóJ—||_||_||_||_||_y)aŸ
Parameters
----------
angleA : float
Starting angle of the path.
angleB : float
Ending angle of the path.
armA : float or None
Length of the starting arm.
armB : float or None
Length of the ending arm.
rad : float
Rounding radius of the edges.
N)r–r—ÚarmAÚarmBr‰)rHr–r—r±r²r‰s rKr/zConnectionStyle.Arc.__init__´ s'€ð(!ˆDŒKØ ˆDŒK؈DŒI؈DŒIàˆD�HrLcóΗ|\}}|\}}||fg}g}tjg} |jrÇtjtj
|j ««}
tjtj
|j ««} |j|jz
} |j|| |
zz|| | zzf«|j} |j|| |
zz|| | zzf«|j�r|tjtj
|j««}
tjtj
|j««}||j|
zz||j|zz}}|r©|d\}}||z
||z
}}||z||zzdz}|j||j|z|z z||j|z|z zf«|j|«| jtjtjtjg«n |d\}}||z
||z
}}||z||zzdz}||jz
} || |z|z z|| |z|z zf||fg}|r¨|d\}}||z
||z
}}||z||zzdz}|j||j|z|z z||j|z|z zf«|j|«| jtjtjtjg«|j||f«| jtj«t|| «S)Nr¶r)rrmr±r6r´r™r–rµr‰rÁr²r—r¤rÂrS)rHr€r�rDrEr‹rŒrjÚroundedriršr›Údrœr�Úx_armBÚy_armBÚxpÚypr r
Údds rKrzConnectionStyle.Arc.connectÏ s€Ø‰FˆB�؉FˆB�à˜R˜�zˆH؈GÜ—[‘[�MˆEà�yŠyÜ—x‘x¤§ ¡ ¨T¯[©[Ó 9Ó:�Ü—x‘x¤§ ¡ ¨T¯[©[Ó 9Ó:�à—I‘I §¡Ñ(�Ø—‘  Q¨¡X¡
¨r°A¸±H©}Ð=Ô>Ø—I‘I�Ø—‘  Q¨¡X¡
¨r°A¸±H©}Ð=Ô>à�y‹yÜ—x‘x¤§ ¡ ¨T¯[©[Ó 9Ó:�Ü—x‘x¤§ ¡ ¨T¯[©[Ó 9Ó:�Ø!# d§i¡i°$Ñ&6Ñ!6¸¸T¿Y¹YÈÑ=MÑ8M˜�áØ$ R™[‘F�B˜Ø# b™[¨&°2©+˜�Bؘr™' B¨¡GÑ+°Ñ2�Bà—N‘N B¨¯©°B©¸Ñ);Ñ$;Ø$&¨¯©°B©¸Ñ);Ñ$;ð$=ô>à—O‘O GÔ,Ø—L‘L¤$§+¡+Ü"&§+¡+Ü"&§+¡+ð"/õ0ð& b™\‘F�B˜Ø# b™[¨&°2©+˜�Bؘr™' B¨¡GÑ+°Ñ2�Bà˜Ÿ™‘M�Ø  R¡¨"¡Ñ,¨b°1°r±6¸B±;Ñ.>Ð?Ø" FÐ+ð-�ñØ  ™‘��Bؘb™ " r¡'�B�ؘ2‘g  R¡Ñ'¨BÑ.�à—‘  T§X¡X°¡]°RÑ%7Ñ 7Ø " T§X¡X°¡]°RÑ%7Ñ 7ð 9ô:à—‘ Ô(Ø— ‘ œdŸk™kÜ"Ÿk™kÜ"Ÿk™kð+ô,ð
�O‰O˜R ˜HÔ %Ø �L‰LœŸ™Ô %䘠%Ó(Ð (rL)rrNNr6r‘r:rLrKrŠr¯ª s„ñ ó ó69 )rLrŠcó—eZdZdZdd„Zd„Zy)úConnectionStyle.Bara

A line with *angle* between A and B with *armA* and *armB*. One of the
arms is extended so that they are connected in a right angle. The
length of *armA* is determined by (*armA* + *fraction* x AB distance).
Same for *armB*.
Ncó<—||_||_||_||_y)a¿
Parameters
----------
armA : float
Minimum length of armA.
armB : float
Minimum length of armB.
fraction : float
A fraction of the distance between two points that will be
added to armA and armB.
angle : float or None
Angle of the connecting line (if None, parallel to A and B).
N)r±r²Úfractionr2)rHr±r²r¾r2s rKr/zConnectionStyle.Bar.__init__ s €ð"ˆDŒI؈DŒIØ$ˆDŒM؈D�JrLcór—|\}}|x\}}\}}tj||z
||z
«} ||z
||z
} }
|
|
z| | zzdz} |
| z | | z }}
|j|j}}|j�±t j |j«}| |z
}| tj|«z}| tj|«z}||tj|«zz||tj|«zz}}||z
}||z
||z
} }
|
|
z| | zzdz}|
|z | |z }}
t||«}|j| z|z}|||zz|||
zz
}}|||zz|||
zz
}}||f||f||f||fg}tjtjtjtjg}t||«S)Nr)r6Úatan2r±r²r2rkr³rµr´rr¾rrmrÂ)rHr€r�rDrEÚx20Úy20r‹rŒrär r
rºÚddxÚddyr±r²Útheta0ÚdthetaÚdlÚdLÚdd2Úarmr�Úcx1Úcy1Úcx2Úcy2rjris rKrzConnectionStyle.Bar.connect) s䀨‰FˆB�Ø $Ð $‰HˆC�‘v�r˜2ä—Z‘Z  R¡¨¨b©Ó1ˆFؘ"‘W˜b 2™g�ˆBØ�r‘'˜B ™GÑ#¨Ñ*ˆBؘB‘w  R¡�ˆCàŸ™ D§I¡I�$ˆDà�z‰zÐ%ÜŸ™ D§J¡JÓ/�Ø &™�Øœ$Ÿ(™( 6Ó*Ñ*�Øœ$Ÿ(™( 6Ó*Ñ*�ؘb¤4§8¡8¨FÓ#3Ñ3Ñ3°R¸"¼t¿x¹xÈÓ?OÑ:OÑ5O�B�ؘb‘y�ð˜b™ " r¡'�B�ؘB‘w  b¡Ñ(¨RÑ/�Ø ™8 R¨#¡X�S�ä�d˜D“/ˆCØ—
‘
 Ñ" SÑ(ˆAà˜A ™G‘| R¨!¨c©'¡\�ˆCؘA ™G‘| R¨!¨c©'¡\�ˆCà˜R˜Ø˜c˜
ؘc˜
ؘc˜
ð$ˆHô—[‘[Ü—[‘[Ü—[‘[Ü—[‘[ð"ˆEô
˜ %Ó(Ð (rL)r6r6rNr‘r:rLrKÚBarr¼
s„ñ ó ó,' )rLrÏN) rrrrrÝrrr’rŸr­rŠrÏr:rLrKrsrs¹
sÄ„ñ"ðH€K÷9ñ9ñv�[Ó!ô#)ˆuó#)ó"ð#)ñJ�[Ó!ô%)�ó%)ó"ð%)ñN�[Ó!ô=)�ó=)ó"ð=)ñ~�[Ó!ô])ˆeó])ó"ð])ñ~�[Ó!ôE)ˆeóE)ó"ñE)rLrscó`—||z
||z
}}|||z||zzdzz }|||zz
|||zz
} }|| fS)z{
Return the point on the line connecting (*x0*, *y0*) -- (*x1*, *y1*) whose
distance from (*x0*, *y0*) is *d*.
rr:)
rBrCrDrErµr r
Úffr‹rŒs
rKÚ_point_along_a_linerÒS sS€ð
�"‰W�b˜2‘gˆ€BØ
ˆb�2‰g˜˜R™Ñ BÑ
&Ñ &€BØ
�"�r‘'‰\˜2  R¡™<ˆ€Bà
ˆrˆ6€MrLcó2—eZdZdZiZGd„d«ZGd„de«Zeed¬«Gd„d e««Zeed
¬«Gd „d e««Z eed
¬«Gd„de««Z
eed¬«Gd„de««Z eed¬«Gd„de««Z eed¬«Gd„de««Z
eed¬«Gd„de««Zeed¬«Gd„de««Zeed¬«Gd „d!e««Zeed"¬«Gd#„d$e««Zeed%¬«Gd&„d'e««Zeed(¬«Gd)„d*e««Zeed+¬«Gd,„d-e««Zee«Gd.„d/e««Zee«Gd0„d1e««Zee«Gd2„d3e««Zy4)5Ú
ArrowStyleaF
`ArrowStyle` is a container class which defines several
arrowstyle classes, which is used to create an arrow path along a
given path. These are mainly used with `FancyArrowPatch`.
An arrowstyle object can be either created as::
ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)
or::
ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)
or::
ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")
The following classes are defined
%(ArrowStyle:table)s
For an overview of the visual appearance, see
:doc:`/gallery/text_labels_and_annotations/fancyarrow_demo`.
An instance of any arrow style class is a callable object,
whose call signature is::
__call__(self, path, mutation_size, linewidth, aspect_ratio=1.)
and it returns a tuple of a `.Path` instance and a boolean
value. *path* is a `.Path` instance along which the arrow
will be drawn. *mutation_size* and *aspect_ratio* have the same
meaning as in `BoxStyle`. *linewidth* is a line width to be
stroked. This is meant to be used to correct the location of the
head so that it does not overshoot the destination point, but not all
classes support it.
Notes
-----
*angleA* and *angleB* specify the orientation of the bracket, as either a
clockwise or counterclockwise angle depending on the arrow type. 0 degrees
means perpendicular to the line connecting the arrow's head and tail.
.. plot:: gallery/text_labels_and_annotations/angles_on_bracket_arrows.py
có0—eZdZdZed„«Zd„Z dd„Zy)úArrowStyle._BaseaÅ
Arrow Transmuter Base class
ArrowTransmuterBase and its derivatives are used to make a fancy
arrow around a given path. The __call__ method returns a path
(which will be used to create a PathPatch instance) and a boolean
value indicating the path is open therefore is not fillable. This
class is not an artist and actual drawing of the fancy arrow is
done by the FancyArrowPatch class.
cóî—t|j««}t|«dk7s2|ddtjk7s|ddtj
k7r t
d«‚g|dd¢|dd¢S)uR
Some ArrowStyle classes only works with a simple quadratic
Bézier curve (created with `.ConnectionStyle.Arc3` or
`.ConnectionStyle.Angle3`). This static method checks if the
provided path is a simple quadratic Bézier curve and returns its
control points if true.
rQrrz,'path' is not a valid quadratic Bezier curve)ÚlistÚ
iter_segmentsrFrrmrSr)rRÚsegmentss rKÚensure_quadratic_bezierz(ArrowStyle._Base.ensure_quadratic_bezier¡ s|€ô˜D×.Ñ.Ó0Ó1ˆHÜ�H“
 Ò" h¨q¡k°!¡n¼¿ ¹ Ò&CؘQ‘K ‘N¤d§k¡kÒ1Ü ØBóDðDà5�X˜a‘[ ‘^Ð5 h¨q¡k°!¡nÐ5Ð 5rLcó—td«‚)a�
The transmute method is the very core of the ArrowStyle class and
must be overridden in the subclasses. It receives the *path*
object along which the arrow will be drawn, and the
*mutation_size*, with which the arrow head etc. will be scaled.
The *linewidth* may be used to adjust the path so that it does not
pass beyond the given points. It returns a tuple of a `.Path`
instance and a boolean. The boolean value indicate whether the
path can be filled or not. The return value can also be a list of
paths and list of booleans of the same length.
rûrü)rHrRr(r%s rKÚ transmutezArrowStyle._Base.transmute± s€ô&Ð&=Ó>Ð >rLcóN—|�Œ|jd|gz }t||j«}|j|||«\}}t j
|«r6|D� cgc]'} t| jd|gz| j«‘Œ)}
} |
|fS||fS|j|||«Scc} w)z‹
The __call__ method is a thin wrapper around the transmute method
and takes care of the aspect ratio.
r)rjrrirÝrkÚiterable) rHrRr(r%Ú aspect_ratiorjÚ path_shrunkÚ path_mutatedÚfillablerCÚ path_lists rKr)zArrowStyle._Base.__call__¿ s½€ðÐ'àŸ=™=¨A¨|Ð+<Ñ<�Ü" 8¨T¯Z©ZÓ8� à)-¯©¸ Ø8EØ8Aó*CÑ&� ˜hô—;‘;˜xÔ(ð+7ö!8Ø%&ô"& a§j¡j°A°|Ð3DÑ&DÀaÇgÁgÕ!Nð!8�Ið!8à$ hÐ.Ð.à'¨Ð1Ð1à—~‘~ d¨M¸9ÓEÐEùò
!8sÁ,B"N)r9)rrrrÚ staticmethodrÛrÝr)r:rLrKrrÖ‘ s+„ñ ð
ñ
6ó
ð
6ò ?ð#%ô FrLrcóH‡—eZdZdZdZdxZZ dˆfd„ Zd„Zd„Z d„Z
ˆxZ S) úArrowStyle._Curvea9
A simple arrow which will work with any path instance. The
returned path is the concatenation of the original path, and at
most two paths representing the arrow head or bracket at the start
point and at the end point. The arrow heads can be either open
or closed.
ú-Fc ód•—||c|_|_||c|_|_||c|_|_||c|_|_| |
c|_|_ d|_
d|_ d|_ d|_
d|jvr td«‚|jj!dd«\} } | dk(rd|_
d|_ n-| dk(rd|_
d|_ d|_n| dvrd|_
d|_ | d k(rd|_ d|_
n-| d
k(rd|_ d|_
d|_n| d vrd|_ d|_
t&‰
|�Q«y )
aï
Parameters
----------
head_length : float, default: 0.4
Length of the arrow head, relative to *mutation_size*.
head_width : float, default: 0.2
Width of the arrow head, relative to *mutation_size*.
widthA, widthB : float, default: 1.0
Width of the bracket.
lengthA, lengthB : float, default: 0.2
Length of the bracket.
angleA, angleB : float, default: 0
Orientation of the bracket, as a counterclockwise angle.
0 degrees means perpendicular to the line.
scaleA, scaleB : float, default: *mutation_size*
The scale of the brackets.
Frèz-arrow must have the '-' between the two headsrú<Tz<|)rØr×ú>z|>)ú[r×N)rrÚwidthAÚwidthBÚlengthAÚlengthBr–r—ÚscaleAÚscaleBÚ_beginarrow_headÚ_beginarrow_bracketÚ_endarrow_headÚ_endarrow_bracketÚarrowrroÚ fillbeginÚfillendr.r/)rHrrrírîrïrðr–r—rñròÚ
beginarrowÚendarrowrJs €rKr/zArrowStyle._Curve.__init__ä sYø€ð*1<¸ZÐ -ˆDÔ ˜dœoØ'-¨vÐ $ˆDŒK˜œØ)0°'Ð &ˆDŒL˜$œ,Ø'-¨vÐ $ˆDŒK˜œØ'-¨vÐ $ˆDŒK˜œà$)ˆDÔ !Ø',ˆDÔ $Ø"'ˆDÔ Ø%*ˆDÔ "à˜$Ÿ*™*Ñ$Ü ð"1ó2ð2ð$(§:¡:×#3Ñ#3°C¸Ó#;Ñ ˆJ˜à˜SÒ Ø(,�Ô%Ø+0�Õ(ؘtÒ#Ø(,�Ô%Ø+0�Ô(Ø!%�•ؘzÑ)Ø(-�Ô%Ø+/�Ô(à˜3ŠØ&*�Ô#Ø).�Õ&ؘTÒ!Ø&*�Ô#Ø).�Ô&Ø#�• ؘZÑ'Ø&+�Ô#Ø)-�Ô&ä ‰GÑ Õ rLc ó¶—||z
||z
}
} tj| |
«} d|z|z } | dk(rd} | | z| z }
| |
z| z }| | z |z} |
| z |z}
|| z||
zz| | z||
zz}}|| z||
zz
|| z||
zz}}||
z|z||z|zf||
z||zf||
z|z||z|zfg}tjtjtjg}|||
|fS)a
Return the paths for arrow heads. Since arrow lines are
drawn with capstyle=projected, The arrow goes beyond the
desired point. This method also returns the amount of the path
to be shrunken so that it does not overshoot.
rrr)rkrrrmrÂ)rHrBrCrDrEÚ head_distÚcos_tÚsin_tr%r r
Ú cp_distanceÚ
pad_projectedrÃrÄr¥r¦r©rªÚvertices_arrowÚ codes_arrows rKÚ_get_arrow_wedgez"ArrowStyle._Curve._get_arrow_wedge"
sC€ð˜"‘W˜b 2™g�ˆBäŸ(™( 2 rÓ*ˆKð  )™^¨eÑ3ˆMð˜aÒØ� ð  "Ñ$ {Ñ2ˆCØ "Ñ$ {Ñ2ˆCð�kÑ! IÑ-ˆBØ�kÑ! IÑ-ˆBà˜r‘z E¨B¡JÑ.°°¸± ¸eÀb¹jÑ0H�ˆCؘr‘z E¨B¡JÑ.°¸±
¸UÀR¹ZÑ0G�ˆCà! C™x¨#™~¨r°C©x¸#©~Ð>Ø! C™x¨¨c©Ð2Ø! C™x¨#™~¨r°C©x¸#©~Ð>ð@ˆNô Ÿ;™;ÜŸ;™;ÜŸ;™;ð(ˆKð" ;°°SÐ8Ð 8rLcóŽ—t||||«\}} ddlm}
|
|||| |«\}}} } ||z|| z}}
||
z||zf||f| | f| |
z| |zfg}tjtj
tj
tj
g}|r6t
j«j|||«}|j|«}||fS)Nr)Úget_normal_points)
rÚmatplotlib.bezierrrrmrÂrrÚrotate_deg_aroundrö)rHrBrCrDrEr=r/r2rþrÿrr‹rŒr r
rrrQs rKÚ _get_bracketzArrowStyle._Curve._get_bracketL
sÝ€ô' r¨2¨r°2Ó6‰LˆE�5õ
<Ù.¨r°2°u¸eÀUÓK‰NˆB��B˜à˜e‘^ V¨e¡^�ˆBà! B™w¨¨R©Ð0Ø! 2˜hØ! 2˜hØ! B™w¨¨R©Ð0ð2ˆNô Ÿ;™;ÜŸ;™;ÜŸ;™;ÜŸ;™;ð(ˆKñ
Ü"×+Ñ+Ó-×?Ñ?ÀÀBÈÓN�Ø!&§¡°Ó!@�à! ;Ð.Ð .rLc
ó¨—|js |jr>|j|z}|j|z}t j
||«}||z ||z }}|j €|n |j } |j€|n |j}
|jd\} } |jd\}
}|jxr | | f|
|fk7}|r|j|
|| | |«nggddf\}}}}|jd\}}|jd\}}|jxr ||f||fk7}|r|j|||||«nggddf\}}}}tt j| |z| |zfg|jdd||z||zfgg«|j«g}dg}|r||jrC|jtg|¢d‘g|¢tj‘««|jd«nÇ|jt||««|jd«nš|j rŽ|jd\} } |jd\}
}|j#| | |
||j$| z|j&| z|j(«\}}|jt||««|jd«|r‚|j*rF|jd«|jtg|¢d‘g|¢tj‘««||fS|jd«|jt||««||fS|j,rŽ|jd\} } |jd\}
}|j#| | |
||j.|
z|j0|
z|j2«\}}|jt||««|jd«||fS)Nrrr+r¶Fr\T)rórõrrrkrrñròrjrrr¾rirørÁrírôr rírïr–rùrörîrðr—)rHrRr(r%rrrýrþrÿrñròrBrCrDrEÚhas_begin_arrowÚ verticesAÚcodesAÚddxAÚddyAr‹rŒÚx3Úy3Ú
has_end_arrowÚ verticesBÚcodesBÚddxBÚddyBÚpathsÚfillss rKrÝzArrowStyle._Curve.transmutef
sø€à×$Ò$¨×(;Ò(;Ø"×.Ñ.°Ñ>� Ø!Ÿ_™_¨}Ñ<�
ÜŸH™H [°*Ó=� Ø*¨YÑ6¸
ÀYÑ8N�u�à&*§k¡kÐ&9‘]¸t¿{¹{ˆFØ&*§k¡kÐ&9‘]¸t¿{¹{ˆFð—]‘] 1Ñ%‰FˆB�Ø—]‘] 1Ñ%‰FˆB�ð#×3Ñ3ÒL¸¸R¸ÀRÈÀHÑ8LˆOñ#ð×%Ñ% b¨"¨b°"Ø&/°¸¸yôJð˜"˜a �^ñ
*ˆI�v˜t Tð—]‘] 2Ñ&‰FˆB�Ø—]‘] 2Ñ&‰FˆB�ð!×/Ñ/ÒH°R¸°HÀÀRÀÑ4HˆMñ!ð×%Ñ% b¨"¨b°"Ø&/°¸¸yôJð˜"˜a �^ñ
*ˆI�v˜t Tôœ"Ÿ.™.¨B°©I°r¸D±yÐ+AÐ*BØ*.¯-©-¸¸"Ð*=Ø,.°©I°r¸D±yÐ+AÐ*Bð*DóEðŸ*™*ó&ð'ˆEð�GˆEáØ—>’>Ø—L‘LÜÐ1˜yÐ1¨&Ð1Ð3L°VÐ3L¼T¿^¹^Ð3LÓMôOà—L‘L Õ&à—L‘L¤ i°Ó!8Ô9Ø—L‘L Õ'Ø×)Ò)ØŸ™ qÑ)‘��BØŸ™ qÑ)‘��BØ$(×$5Ñ$5°b¸"¸bÀ"Ø6:·k±kÀFÑ6JØ6:·l±lÀVÑ6KØ6:·k±kó%CÑ!� ˜6ð
— ‘ œT )¨VÓ4Ô5Ø— ‘ ˜UÔ#áØ—<’<Ø—L‘L Ô&Ø—L‘LÜÐ1˜yÐ1¨&Ð1Ð3L°VÐ3L¼T¿^¹^Ð3LÓMôOð ˜%�<Ð ð—L‘L Ô'Ø—L‘L¤ i°Ó!8Ô9ð˜%�<Ð ð×'Ò'ØŸ™ rÑ*‘��BØŸ™ rÑ*‘��BØ$(×$5Ñ$5°b¸"¸bÀ"Ø6:·k±kÀFÑ6JØ6:·l±lÀVÑ6KØ6:·k±kó%CÑ!� ˜6ð
— ‘ œT )¨VÓ4Ô5Ø— ‘ ˜UÔ#à˜%�<Ð rL)
çš™™™™™Ù?çš™™™™™É?r9r9rrrrNN) rrrrr÷rørùr/rr rÝr
rs@rKÚ_CurverçØ s9ø„ñ ðˆØ#Ð#ˆ �GàLNØJNØ õ< ò|( 9òT /ö4S rLrrèrcó"‡—eZdZdZˆfd„ZˆxZS)úArrowStyle.Curvez&A simple curve without any arrow head.có(•—t‰|�dd¬«y)Nrr)rrr@)rHrJs €rKr/zArrowStyle.Curve.__init__¿
sø€ô
‰GÑ ¨¸Ð Õ ;rL)rrrrr/r
rs@rKÚCurver»
sø„á4÷ <ð <rLrú<-có—eZdZdZdZy)úArrowStyle.CurveAz(An arrow with a head at its start point.r N©rrrrr÷r:rLrKÚCurveAr"Ä
s
„á6؉rLr$ú->có—eZdZdZdZy)úArrowStyle.CurveBz&An arrow with a head at its end point.r%Nr#r:rLrKÚCurveBr'É
s
„á4؉rLr(ú<->có—eZdZdZdZy)úArrowStyle.CurveABz8An arrow with heads both at the start and the end point.r)Nr#r:rLrKÚCurveABr+Î
s
„áF؉rLr,ú<|-có—eZdZdZdZy)úArrowStyle.CurveFilledAz0An arrow with filled triangle head at the start.r-Nr#r:rLrKÚ CurveFilledAr/Ó
s
„á>؉rLr0ú-|>có—eZdZdZdZy)úArrowStyle.CurveFilledBz.An arrow with filled triangle head at the end.r1Nr#r:rLrKÚ CurveFilledBr3Ø
s
„á<؉rLr4ú<|-|>có—eZdZdZdZy)úArrowStyle.CurveFilledABz1An arrow with filled triangle heads at both ends.r5Nr#r:rLrKÚ
CurveFilledABr7Ý
s
„á?؉rLr8ú]-có(‡—eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.BracketAz5An arrow with an outward square bracket at its start.r9có*•—t‰|�|||¬«y©aŽ
Parameters
----------
widthA : float, default: 1.0
Width of the bracket.
lengthA : float, default: 0.2
Length of the bracket.
angleA : float, default: 0 degrees
Orientation of the bracket, as a counterclockwise angle.
0 degrees means perpendicular to the line.
)rírïr–Nr@©rHrírïr–rJs €rKr/zArrowStyle.BracketA.__init__ç
óø€ô
‰GÑ  F°GÀFÐ Õ KrL©r9rr©rrrrr÷r/r
rs@rKÚBracketAr;â
sø„áC؈÷ Lñ LrLrBú-[có(‡—eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.BracketBz3An arrow with an outward square bracket at its end.rCcó*•—t‰|�|||¬«y©aŽ
Parameters
----------
widthB : float, default: 1.0
Width of the bracket.
lengthB : float, default: 0.2
Length of the bracket.
angleB : float, default: 0 degrees
Orientation of the bracket, as a counterclockwise angle.
0 degrees means perpendicular to the line.
)rîrðr—Nr@©rHrîrðr—rJs €rKr/zArrowStyle.BracketB.__init__ú
r?rLr@rArs@rKÚBracketBrEõ
sø„áA؈÷ Lñ LrLrIú]-[có,‡—eZdZdZdZ dˆfd„ ZˆxZS)úArrowStyle.BracketABz3An arrow with outward square brackets at both ends.rJcó0•—t‰|�||||||¬«y)a§
Parameters
----------
widthA, widthB : float, default: 1.0
Width of the bracket.
lengthA, lengthB : float, default: 0.2
Length of the bracket.
angleA, angleB : float, default: 0 degrees
Orientation of the bracket, as a counterclockwise angle.
0 degrees means perpendicular to the line.
©rírïr–rîrðr—Nr@)rHrírïr–rîrðr—rJs €rKr/zArrowStyle.BracketAB.__init__
s%ø€ô
‰GÑ  F°GÀFØ$*°GÀFð
õ
LrL)r9rrr9rrrArs@rKÚ BracketABrLsø„áA؈ð56Ø45÷ Lñ LrLrOú|-|có(‡—eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.BarABz/An arrow with vertical bars ``|`` at both ends.rPcó0•—t‰|�|d||d|¬«y)aM
Parameters
----------
widthA, widthB : float, default: 1.0
Width of the bracket.
angleA, angleB : float, default: 0 degrees
Orientation of the bracket, as a counterclockwise angle.
0 degrees means perpendicular to the line.
rrNNr@)rHrír–rîr—rJs €rKr/zArrowStyle.BarAB.__init__#s%ø€ô
‰GÑ  F°A¸fØ$*°A¸fð
õ
FrL)r9rr9rrArs@rKÚBarABrRsø„á=؈÷ Fñ FrLrTú]->có(‡—eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.BracketCurveze
An arrow with an outward square bracket at its start and a head at
the end.
rUcó*•—t‰|�|||¬«yr=r@r>s €rKr/z ArrowStyle.BracketCurve.__init__8r?rL©r9rNrArs@rKÚ BracketCurverW0óø„ñ ðˆ÷ Lñ LrLrZú<-[có(‡—eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.CurveBracketze
An arrow with an outward square bracket at its end and a head at
the start.
r\có*•—t‰|�|||¬«yrGr@rHs €rKr/z ArrowStyle.CurveBracket.__init__Nr?rLrYrArs@rKÚ CurveBracketr^Fr[rLr`có*‡—eZdZdZdˆfd„ Zd„ZˆxZS)úArrowStyle.Simpleu:A simple arrow. Only works with a quadratic Bézier curve.cóN•—|||c|_|_|_t‰|�«y)aA
Parameters
----------
head_length : float, default: 0.5
Length of the arrow head.
head_width : float, default: 0.5
Width of the arrow head.
tail_width : float, default: 0.2
Width of the arrow tail.
N©rrÚ
tail_widthr.r/©rHrrrerJs €rKr/zArrowStyle.Simple.__init__`ó)ø€ð˜Z¨ð
?ˆDÔ ˜dœo¨t¬ä ‰GÑ Õ rLcó2—|j|«\}}}}}} |j|z}
t|| |
«} ||f||f|| fg} t| | «\}
}|j |z}t||dz d¬«\}}|
��(|j|z}t|
|dz «\}}tj|dftj|dftj|dftj|dftj|dftj|dftj|dftj|dftj|dftj|dftj|dftj|dftj|dfg
}nztj|dftj|dftj|dftj|dftj|dftj|dfg}t|D��cgc]\}}|‘Œ c}}|D��cgc]\}}|‘Œ c}}«}|dfS#t$r3t || |||
«\}}d||zzd|| zz}}||f||f|| fg}d}
Y�Œ9wxYwcc}}wcc}}w)NrrH©ÚwmrrrQT)rÛrrrrrÒrrrerrrmrSrÂrí)rHrRr(r%rBrCrDrEr‹rŒrÚin_fÚ
arrow_pathÚ arrow_outÚarrow_inÚx1nÚy1nrÚ head_leftÚ
head_rightreÚ tail_leftÚ
tail_rightÚ
patch_pathr«rCs rKrÝzArrowStyle.Simple.transmuteqs©€à%)×%AÑ%AÀ$Ó%GÑ "ˆB��B˜˜B ð×*Ñ*¨]Ñ:ˆKÜ   R¨Ó5ˆDؘr˜( R¨ H¨r°2¨hÐ7ˆJð
!ä=¸jÈ$ÓOñ$� ˜8🙨=Ñ8ˆJÜ$7¸Ø8BÀR¹ÈBô%PÑ !ˆI�zðÑ$Ø!Ÿ_™_¨}Ñ<�
Ü(5°iØ6@À2±oó)GÑ%� ˜:ô $Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ~™~¨z¸!©}Ð=ð
 ‘
ô $Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨J°q©MÐ:Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ{™{¨I°a©LÐ9Ü#Ÿ~™~¨y¸©|Ð<ð  �
ô z×2™t˜q !šÓ2À:×4N¹4¸1¸a²QÓ4NÓOˆDà˜�:Ð øôY0ò
!ô-¨R°°R¸¸[ÓI‘��BØ " r¡'™?¨C°2¸±7©O�S�Ø ˜H s¨C j°2°r°(Ð;�Ø “ ð

!üóT3ùÓ4NsÁIÈ" J
È6 J É8J
Ê J
)rrr©rrrrr/rÝr
rs@rKÚSimplerb\sø„áHõ ö"8 rLrwcó*‡—eZdZdZdˆfd„ Zd„ZˆxZS)úArrowStyle.Fancyu9A fancy arrow. Only works with a quadratic Bézier curve.cóN•—|||c|_|_|_t‰|�«y)aA
Parameters
----------
head_length : float, default: 0.4
Length of the arrow head.
head_width : float, default: 0.4
Width of the arrow head.
tail_width : float, default: 0.4
Width of the arrow tail.
Nrdrfs €rKr/zArrowStyle.Fancy.__init__¯rgrLcóê—|j|«\}}}}}} |j|z}
||f||f|| fg} t|| |
«} t| | «\}
}|}t|| |
dz«} t| | «\}
}|
}|j |z}t||dz d¬«\}}|j|z}t||dzddd¬«\}}t|||dz«} t| | «\}}
|d }||}}tj|ftj|d
ftj|d ftj|d ftj|d
ftj|d ftj|d ftj|d ftj|d
ftj|d ftj|d ftj|d
ftj|ftj|fg}t|D��cgc]\}}|‘Œ c}}|D��cgc]\}}|‘Œ c}}«}|d
fS#t$r3t || |||
«\}}d||zzd|| zz}}||f||f|| fg} | }Y�ŒwxYwcc}}wcc}}w)NrrrHg333333ã?rir9r)Úw1rjÚw2r¶rrrQT)rÛrrrrrÒrrrerrmrÂrSrí)rHrRr(r%rBrCrDrEr‹rŒrrlrkÚpath_outÚpath_inÚ path_headrorpÚ path_tailrÚhead_lÚhead_rrersrtÚ
tail_startrrrqrur«rCs rKrÝzArrowStyle.Fancy.transmuteÀs´€à%)×%AÑ%AÀ$Ó%GÑ "ˆB��B˜˜B ð×*Ñ*¨]Ñ:ˆKؘr˜( R¨ H¨r°2¨hÐ7ˆJô!  R¨Ó5ˆDð
$Ü$MØ ó%&Ñ!�˜'ð$� ô!  R¨°rÑ)9Ó:ˆDÜ IؘDó!"Ñ ˆH�gà ˆI🙨=Ñ8ˆJÜ0°Ø1;¸b±Ø46ô8‰NˆF�Fð
Ÿ™¨=Ñ8ˆJÜ$7¸ Ø8BÀR¹Ø;=À#È#ô%OÑ !ˆI�zô
!  R¨°b©Ó9ˆDÜ IؘDó!"Ñ ˆG�Xà  ™ˆJà$*¨F˜ ˆJÜŸ;™;¨
Ð3ÜŸ;™;¨
°1©
Ð6ÜŸ;™;¨
°1©
Ð6ÜŸ;™;¨
°1©
Ð6ÜŸ;™;¨
°1©
Ð6ÜŸ;™;¨
°1©
Ð6ÜŸ;™;¨
°1©
Ð6ÜŸ;™;¨ °!© Ð5ÜŸ;™;¨ °!© Ð5ÜŸ;™;¨ °!© Ð5ÜŸ;™;¨ °!© Ð5ÜŸ;™;¨ °!© Ð5ÜŸ;™;¨
Ð3ÜŸ>™>¨:Ð6ðˆJô z×2™t˜q !šÓ2À:×4N¹4¸1¸a²QÓ4NÓOˆDà˜�:Ð øôi0ò
'ô-¨R°°R¸¸[ÓI‘��BØ " r¡'™?¨C°2¸±7©O�S�Ø! 2˜h¨¨c¨
°R¸°HÐ=�
Ø&“ ð

'üód3ùÓ4NsÁH*Ç> I)
È I/ È*8I&É%I&)rrrrvrs@rKÚFancyry«sø„áGõ ö"A rLr…có*‡—eZdZdZdˆfd„ Zd„ZˆxZS)úArrowStyle.Wedgeuë
Wedge(?) shape. Only works with a quadratic Bézier curve. The
start point has a width of the *tail_width* and the end point has a
width of 0. At the middle, the width is *shrink_factor*x*tail_width*.
có>•—||_||_t‰|�
«y)zý
Parameters
----------
tail_width : float, default: 0.3
Width of the tail.
shrink_factor : float, default: 0.5
Fraction of the arrow width at the middle point.
N)reÚ
shrink_factorr.r/)rHrer‰rJs €rKr/zArrowStyle.Wedge.__init__ sø€ð)ˆDŒOØ!.ˆDÔ Ü ‰GÑ Õ rLc ó>—|j|«\}}}}}} ||f||f|| fg}
t|
|j|zdz |j¬«\} } tj
| dftj | dftj | dftj| dftj | dftj | dftj| dfg}
t |
D��cgc]\}}|‘Œ c}}|
D��cgc]\}}|‘Œ c}}«}|dfScc}}wcc}}w)NrHrirrrQT) rÛrrer‰rrmrSrÂrí)rHrRr(r%rBrCrDrEr‹rŒrlÚb_plusÚb_minusrur«rCs rKrÝzArrowStyle.Wedge.transmutes€à%)×%AÑ%AÀ$Ó%GÑ "ˆB��B˜˜B à˜r˜( R¨ H¨r°2¨hÐ7ˆJÜ1Ø$.Ø$(§O¡O°mÑ$CÀbÑ$HØ'+×'9Ñ'9ô;‰OˆF�Gô
 Ÿ;™;¨¨q© Ð2ÜŸ;™;¨¨q© Ð2ÜŸ;™;¨¨q© Ð2ÜŸ;™;¨°©
Ð3ÜŸ;™;¨°©
Ð3ÜŸ;™;¨°©
Ð3ÜŸ>™>¨7°1©:Ð6ð
ˆJô z×2™t˜q !šÓ2À:×4N¹4¸1¸a²QÓ4NÓOˆDà˜�:Ð ùó3ùÓ4Ns Ã' D
Ã; D )rrrvrs@rKrár‡sø„ñ õ ö rLráN)rrrrrÝrrrrr$r(r,r0r4r8rBrIrOrTrZr`rwr…rár:rLrKrÔrÔ_ sa„ñ,ð\€K÷EFñEFôNa �ôa ñF�[ sÔ+ô<�ó<ó,ð<ñ�[ tÔ,ô�óó-ðñ�[ tÔ,ô�óó-ðñ�[ uÔ-ô�&óó.ðñ�[ uÔ-ô�vóó.ðñ�[ uÔ-ô�vóó.ðñ�[ wÔ/ô˜óó0ðñ�[ tÔ,ôL�6óLó-ðLñ$�[ tÔ,ôL�6óLó-ðLñ$�[ uÔ-ôL�FóLó.ðLñ*�[ uÔ-ôF�óFó.ðFñ"�[ uÔ-ôL�vóLó.ðLñ*�[ uÔ-ôL�vóLó.ðLñ*�[Ó!ôL�óLó"ðLñ\�[Ó!ôU�óUó"ðUñn�[Ó!ô)�ó)ó"ñ)rLrÔcóÚ‡—eZdZdZdZd„Zejddddœˆfd„ «Zejdd„«Z d„Z
d „Z d
„Z d „Z
d „Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZˆxZS)ÚFancyBboxPatchaO
A fancy box around a rectangle with lower left at *xy* = (*x*, *y*)
with specified width and height.
`.FancyBboxPatch` is similar to `.Rectangle`, but it draws a fancy box
around the rectangle. The transformation of the rectangle box to the
fancy box is delegated to the style classes defined in `.BoxStyle`.
Tcó–—|jjdz}||j|j|j|j
fzS)Nz((%g, %g), width=%g, height=%g))rJrrrr0r1r”s rKrzFancyBboxPatch.__str__<s;€Ø �N‰N× #Ñ #Ð&GÑ GˆØ�D—G‘G˜TŸW™W d§k¡k°4·<±<Ð@Ñ@Ð@rLr)Úmutation_scaleÚmutation_aspectc 󪕗t‰|�di|¤Ž|\|_|_||_||_|j
|«||_||_d|_ y)a
Parameters
----------
xy : (float, float)
The lower left corner of the box.
width : float
The width of the box.
height : float
The height of the box.
boxstyle : str or `~matplotlib.patches.BoxStyle`
The style of the fancy box. This can either be a `.BoxStyle`
instance or a string of the style name and optionally comma
separated attributes (e.g. "Round, pad=0.2"). This string is
passed to `.BoxStyle` to construct a `.BoxStyle` object. See
there for a full documentation.
The following box styles are available:
%(BoxStyle:table)s
mutation_scale : float, default: 1
Scaling factor applied to the attributes of the box style
(e.g. pad or rounding_size).
mutation_aspect : float, default: 1
The height of the rectangle will be squeezed by this value before
the mutation and the mutated box will be stretched by the inverse
of it. For example, this allows different horizontal and vertical
padding.
Other Parameters
----------------
**kwargs : `~matplotlib.patches.Patch` properties
%(Patch:kwdoc)s
TNr:)
r.r/rrr0r1Ú set_boxstyleÚ_mutation_scaleÚ_mutation_aspectrœ) rHrr=r>Úboxstyler�r‘rIrJs €rKr/zFancyBboxPatch.__init__@sWø€ôV ‰ÑÑ"˜6Ò"ØÑˆŒ�”؈Œ ؈Œ Ø ×ј(Ô#Ø-ˆÔØ /ˆÔ؈�
rLc ó„—|€tj«St|t«r t|fi|¤Žn||_d|_y)aï
Set the box style, possibly with further attributes.