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œ«GddejZ«««Z.Gdde.«Z/Gdde.«Z0Gdde.«Z1Gdde.«Z2Gdde2«Z3Gdde.«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
ZdZd „Zd/d
Z d/d Z
d/d Z ˆfd
Z dZ
dZdZdZdZdZdZdZdZdZdZdZdZdZdZˆfdZdZdZd „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
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Ø Ð Üˆ"ŸN™N¬3¯<©<¸
Ñ+FÓÔÜ #§ ¡ Ð->Ñ ?ˆÔܘ$“ZˆŒ
Ø Ð ØÐ$¨ Ð(=Ü×
N‰N˜5Õ × Ñ ˜yÔ × Ñ ˜yÔ ˆŒØ&/ˆÔ&ˆÔà ×ј9Ô ×ј9Ô ×ј[Ô Ø ×ј(Ô ×ј9Ô ˆvŒ;Ø × !   ócóˆ|j«}|j«}|j|«}t|«r|dSgS)
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)r)Ú
isinstanceÚ_pickerrÚ
get_edgecolorÚ
get_linewidth)rHÚradiusÚ_radiuss rKÚ_process_radiuszPatch._process_radiusssdØ Ð ØˆMÜ d—l‘l¤FÔ —l‘lˆGð ˆð ×# &¨!Òðˆð×.؈rLcóäj«rdifSj«Šj«j}|j«j}t j |tjk(«\}|dd}ttt j||«t j||««}nj«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|];}|jjjfj««Œ=y­w©N)Úcontains_pointÚ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.containsú€ð> × !  ˜" Ø×% Ø
ר Ð Ø—}‘}“×/ˆHô—H‘H˜U¤d§k¡kÑ2‰EˆDà˜˜8ˆDÜÜ”b—h‘h˜x¨Ó·±¸ÀÓ0EóG‰HðŸ
Ð(ˆHÜõ%ˆðrˆrLcó‚|j|«}|j«j||j«|«S)
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ó 6rLcó‚|j|«}|j«j||j«|«S)
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ó 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¸ø€ä
ј ׌Ø×*ˆŒØ#(×#<Ñ#<ˆÔ Ø#(×#<Ñ#<ˆÔ Ø—[[ˆŒ
Ø—l‘lˆŒ Ø.ˆÔØ&+×&BÑ&BˆÔ ×ј5× ×ј5×#×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ÑMrLcó@tjj|«S)zo
Return the `~.transforms.Transform` mapping data coordinates to
physical coordinates.
)r
rNr‰s rKrzPatch.get_data_transform7sô
}‰}×*¨4Ó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 rKrzPatch.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'ð ˆÐ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|r5)rHr(Úset_hatch_colors rKÚ_set_edgecolorzPatch._set_edgecolorjsmØˆØ ˆ=Ü ÐŸ
š
 d×&8Ò&8ÜŸ Ð%6Ñ7àØ"'ä Ÿ.™.¨°· ± ÓŒÙ Ø $§¡ˆDÔ Øˆ
rLcó4||_|j|«y)z{
Set the patch edge color.
Parameters
----------
color : :mpltype:`color` or None
N)r~©rHr(s rKr;zPatch.set_edgecoloryóð$)ˆÔ Ø ×ј"rLcó¦|tjd}|jr |jnd}t j
||«|_d|_y)Nzpatch.facecolorrT)r3r4r8r r r2r})rHr(Úalphas rKÚ_set_facecolorzPatch._set_facecolor„s@Ø ˆ—L‘LÐ!2Ñ3ˆEØ#Ÿzšz ¨qˆÜ Ÿ.™.¨°ÓŒØˆ
rLcó4||_|j|«y)z{
Set the patch face color.
Parameters
----------
color : :mpltype:`color` or None
N)rs rKr<zPatch.set_facecolorrLcó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_colors ð
×ј1ÔØ ×ј1ÕrLcót||«|j|j«|j |j
«yr`)r.Ú set_alphar¨rr~)rHrJs €rKr­zPatch.set_alpha¦s8ø€ä
ј%Ô Ø ×јD× ×јD×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?©rHÚws rKrAzPatch.set_linewidth­sSð
ˆ9Ü Ð/ˆAÜ ›(ˆŒÜ
×
-Ø*+òÔàˆ
rLcóÈ|d}|dvrd}||_tj|«|_tjg|j¢|j
­Ž|_d|_y)
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-)ú ÚÚNoneT)r™Ú_get_dash_patternr>r=r?)rHrs rKr@zPatch.set_linestyle¼sjð2 ˆˆBØ
Ð ˆˆŒÜ&,×&>Ñ&>¸rÓ&BˆÔ#×
×
;Ø*.¯/©/òÔàˆ
rLcóžt|«|_|j|j«|j |j
«d|_y)zh
Set whether to fill the patch.
Parameters
----------
b : bool
TN)r7r8rr~©rHÚbs rKÚset_fillzPatch.set_fillßs>ô˜!“WˆŒ
Ø ×јD× ×јD׈
rLcó|jS)z#Return whether the patch is filled.)r8r‰s rKÚget_fillzPatch.get_fillìó àz‰zÐrLcó6t|«}||_d|_y)
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Úcss rKrDzPatch.set_capstyleõsôa‹[ˆØˆŒØˆ
rLcó.|jjS)zReturn the capstyle.)Únamer‰s rKÚ get_capstylezPatch.get_capstylesà~‰~×"rLcó6t|«}||_d|_y)
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œ)rHÚjss rKrEzPatch.set_joinstyle sôq‹\ˆØˆŒØˆ
rLcó.|jjS)zReturn the joinstyle.)r‰s rKÚ
get_joinstylezPatch.get_joinstylesà×#rLcó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.
Parameters
----------
hatch : {'/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
TN)ÚmhatchÚ_validate_hatch_patternr€)rHrs rKrCzPatch.set_hatchs ô4 ×& ˆŒ ؈
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)ÚisRGBArVrN)ÚPathEffectRendererF)&Ú
open_groupÚget_gidÚnew_gcÚset_foregroundr|r=r™rAÚ
set_dashesr?rDrErBrÚ _set_gc_clipÚset_urlÚ_urlÚset_snapÚget_snapr­r r€rCr5r6Úget_sketch_paramsÚset_sketch_paramsÚget_path_effectsÚmatplotlib.patheffectsrÛÚ draw_pathÚrestoreÚ close_grouprœ)rHÚrendererÚdraw_path_args_listÚgcr Údraw_path_argss rKÚ"_draw_paths_with_artist_propertiesz(Patch._draw_paths_with_artist_propertiesGð ×јG T§\¡\£^Ô
_‰_Ó
ˆà
×ј$Ÿ/™/°$ÐÔ
_‰_ˆØ ?‰?˜  Ò " d§o¡o¸Ò&?؈
×Ñ˜ÔØˆ
t×
˜ŸÔ
×јŸÔ
×ј4× ×ј"ÔØ
4—9Ø
D—MM“OÔ
T—[‘[Ô ;Š;Ø L‰L˜ŸÔ × Ñ ˜t× × " 4×#8Ñ#8Ô × ˆB× Ñ  $×"8Ñ"8Ó":Ñ × Ñ Ô )¨$×*?Ñ*?Ó*AÀ8ÓLˆ 4ˆ ˆH× Ñ ˜ 3  
Œ Ø×јWÔˆ
rLcó
|j«sy|j«}|j«}|j|«}|j «}|j ||||j dr |j ndfg«y)NrV)Ú get_visiblerOrNÚtransform_path_non_affineÚ
get_affinerñr})rHrRÚ transformÚtpathÚaffines rKÚdrawz
Patch.drawysð×ÑÔ Ø}‰}ˆØ×(ˆ Ø×3°DÓ9ˆØ×Ø × Ø"&§¡°Ò!3ˆdoŠ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‡)rHs 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_unitss3à × Ñ   1¡Ó Ø × Ñ   Ó &ˆØ!ˆtˆ rLr`)5Ú__name__Ú
__module__Ú __qualname__Ú__doc__ÚzorderrŸr/rTr]rtrarxr{rˆrNrrrrYrrZrBr;r<r:r­rAr@Úpropertyr)r
ÚinterpdrDrErCr
Úallow_rasterizationrùrOrÿrÚ
__classcell__©rJs@rKr'r'sTø„ñð €Fð€Mð ØØØØØØØØö3*òj ò
ó2óh<6ó|'7ôR6ò&Aò Nò òòòò ò
ò ò ô 
ò!òF òñ H˜hÓ '€Dà×Ññ
óð
ò×Ññ
óð
òò<ò0ðd ×ÑñAó ðAò AörLr'códeZdZdZej
ddœˆfd
«ZdZdZdZ ˆfdZ
ˆxZ S) ÚShadowcó"d|jdS)NzShadow(ú))r‰s rKÚ__str__zShadow.__str__™sؘŸ˜  &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 N)r.r/Ú_oxÚ_oyrrÚ_shadow_transformr{Ú
ValueErrorrkÚasarrayr Úto_rgbrÚupdateÚ nextafterr Úinf)rHÚoxÚoyrrIr(rJs €rKr/zShadow.__init__œø€ô4 ÑÔØˆŒ
ؠЈŒ$”(Ü!+×!4Ñ!4Ó!6ˆÔà ×јŸÔ˜QŠÜÐ ÜÐ UœbŸj™j¬¯©°t·z±z×7OÑ7OÓ7QÓ)RÓSˆØ  %°eÀcä!Ÿ|™|¨D¯J©J×,=Ñ,=ÄÇÁ¸wÓððõ rLcóÄ|j|j«}|j|j«}|jj «j ||«yr`)Úpoints_to_pixelsrrrÚclearÚ translate)rHr r!s rKÚ_update_transformzShadow._update_transformÄsIØ
×
& t§x¡xÓ
0ˆØ
×
& t§x¡xÓ
Ø ×Ñ×&×°RÕ8rLcó6|jj«Sr`)rOr‰s rKrOzShadow.get_pathÉsØz‰z×$rLcóP|jj«|jzSr`)rrr‰s rKrzShadow.get_patch_transformÌs Øz‰z×/°$×2HÑ2HÑHrLcóF|j|«t| |«yr`)r&r.©rHrJs €rKz Shadow.drawÏsø€Ø ×јxÔ
 rL) rrrrr
r r/r&rOrr
rs@rKrr˜s@ø„ò×ÑØ/2õ% óð% òN
I÷ðrLrcóeZdZdZdZej dddœˆfd
«ZdZdZ d „Z
e d
«Z e jd «Z d Zd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZe 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ÐØØT‰zÐrLçr)r2Úrotation_pointc óÄt|di|¤Ž|d|_|d|_||_||_t
|«|_||_d|_ |j«y)
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/r0r1r2r7Ú_aspect_ratio_correctionÚ_convert_units)rHrÚwidthÚheightr2r7rIrJs €rKr/zRectangle.__init__ìsbø€ô0 ÑÑ"˜a5ˆŒØ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ˆØ2r˜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)centerç@rrr)Úget_bboxr7rDrBrErCrÚBboxTransformTorr%Úscaler;Ú
rotate_degr2)rHÚbboxr=r>r7s rKrzRectangle.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Ø
×
Ñ
 
!ŸW™W d§g¡gÐ-‰Nà0ˆNÜ×)¨$Ó”*טN¨1ѸqÑ0AÐ/AÓq˜$טDŸJ™JÓq˜!˜dט  ,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©rr‰s rKÚ get_cornerszRectangle.get_cornersQs#ð
×)×  .rLcó@|j«jd«S)z#Return the centre of the rectangle.)rrr`r‰s rKÚ
get_centerzRectangle.get_centerYsà×)×3°JÓ?rLcó|jS©z"Return the width of the rectangle.©r0r‰s rKÚ get_widthzRectangle.get_width]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.©rHrbs rKÚset_xzRectangle.set_xióàˆŒØˆ
rLcó ||_d|_y)z+Set the bottom coordinate of the rectangle.TN)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)r2©rHr2s rKÚ set_anglezRectangle.set_angless𠈌
؈
rLcó0|\|_|_d|_y)
Set the left and bottom coordinates of the rectangle.
Parameters
----------
xy : (float, float)
TN)r.r/©rHrs rKÚset_xyzRectangle.set_xy|sð шŒ$”(؈
rLcó ||_d|_y)zSet the width of the rectangle.TN©r0s rKÚ set_widthzRectangle.set_width‡sàˆŒ ؈
rLcó ||_d|_y)z Set the height of the rectangle.TN©r1©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/r0r1©rHÚargsÚlr»s rKÚ
set_boundszRectangle.set_boundssPô ˆtŠ>ؘa™‰JˆAˆq!‰JˆAˆq!ˆŒØˆŒØˆŒ ؈Œ ؈
rLcóVtjj|j«ŽS©zReturn the `.Bbox`.)rÚBboxÚ from_extentsr<r‰s rKrIzRectangle.get_bbox¦s ä×+¨T×-@Ñ-@Ó-BÐCrL) rrrrrr
r r/rOr<rr
r7ÚsetterrUrXrZrarcrgrkrorrrvryr|rr„r‰rIrr
rs@rKr,r,Ôø„ñò$ð
×Ñà¨4õ%óð%òNò,ð*ñð×ÑñDóðDòòò@òòòòò
ò
ò òò
ò
ò*Dñ
&˜&Ó !„BrLr,cóZeZdZdZdZej dddœˆfd
«ZdZdZ ˆ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©rHs rKrzRegularPolygon.__str__°sDØ EˆØD—G‘G˜A‘J §¡¨¡
¨D×,<Ñ,<¸d¿k¹kØ× &rLér©r[r“c óÂ||_||_||_||_t j
|«|_tj«|_ t|,di|¤Žy)
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:) rrr“r[rÚunit_regular_polygonÚ_pathrrÚ_patch_transformr.r/)rHrÚ numVerticesr[r“rIrJs €rKr/zRegularPolygon.__init__µsVø€ð.ˆŒØÔØÔ؈Œ Ü×.¨{ÓŒ
Ü *× 3Ñ 3Ó 5ˆÔÜ
ÑÑ"˜"rLcó|jSr`©r™r‰s rKrOzRegularPolygon.get_pathÔó Øz‰zÐrLcóÈ|jj«j|j«j |j
«j |jŽSr`)r$rKr[Úrotater“r%rr‰s rKrz"RegularPolygon.get_patch_transform×sKðˆt×
‰U4—;
ß
‰VD×
‰Y˜Ÿð !rL) rrrrrr
r r/rOrr
rs@rKrr­s4ø„Ù
×Ñà qõð#ò<ö!rLrcóVeZdZdZdZdZejˆfd«ZdZ dZ
ˆ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ÑMrLc ó2t|di|¤Ž||_y)zl
*path* is a `.Path` object.
Valid keyword arguments are:
%(Patch:kwdoc)s
Nr:)r.r/r™)rHrRrIrJs €rKr/zPathPatch.__init__çsø€ô ÑÑ"˜ˆ
rLcó|jSr`rr‰s rKrOzPathPatch.get_pathórLcó||_yr`r)rHrRs rKÚset_pathzPathPatch.set_pathös ؈
rL) rrrrrr
r r/rOr
rs@rKÞs5ø„Ù€MòNð×Ñó óð òörLcó`eZdZdZdZej dddœˆfd
«ZdZdZ 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.
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“rIrJs €rKr/zStepPatch.__init__sfø€ð8'ˆÔÜ—jj Ó'ˆŒ Ü—zz Œ Ø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 «}|jtj|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
rKzStepPatch._update_path'Ü
8‰8”B—FF˜4Ÿ;™;Ó Ð ;‰;× Ñ ˜  4§<¡<×#4Ñ#4Ò ð/à/3¯|©|×/@Ñ/@Ð.AðB.Ø.2¯k©k×.>Ñ.>Ð-?¸CóDð
Dô
Ÿ Ó)¬B¯H©H°Q¼d¿n¹nÔ,MÐ+Nˆuˆä—HH˜TŸ\™\Ó*ˆ Ø >‰>Ð œŸ $§.¡.Ó 1ˆIÜ×2°I°:Ó D‰JˆD ˜$Ÿ+™+ d¨4°©6Ð2°AÓ6ˆAÜ— ‘ ˜$Ÿ,™, t¨DÐ1°1Ó5ˆAØ~‰~ЗNN A b q E¨1¨a°°¨fÐ#5Ó6‘Ø×Ò—N‘N T§^¡^Ð$4°a¸$¿.¹.Ð9IÐ#JÓK‘Ø×Ò—y‘y §¡°°TÐ!:¸AÓ>¹tÀ¸DÜ—NN A ¨2¨¡w 0Ü—NN ¨ I¨q°$°r¸°(Ø$(¨¨! H¨d°D¸¸°Ið$?ó@ô!Ð!?Ó×Ñ :Ò—_‘_ a¨ VÓ,‘ä—_‘_ a¨ VÓ,Ø L‰L˜Ô Ø L‰Lœ$Ÿ+™+˜¬$¯+©+¨¼¸B»À¹ Ñ)BÑ Cð' Dô(œ"Ÿ.™.¨Ó·±ÀÓ1FÓ
rLcójtdd«}||j|j|j«S)z:Get `.StepPatch` values, edges and baseline as namedtuple.Ú StairDatazvalues edges baseline)rr­)rHs rKÚget_datazStepPatch.get_dataKs*ä˜{Ð,CÓDˆ Ù˜Ÿ t§{¡{°D·N±NÓ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­)rHs rKÚset_datazStepPatch.set_dataPssð ˆ>˜e˜Ð0@ÜÐ Ð ÜŸ:™: fÓ-ˆDŒLØ Ð ÜŸ*™* UÓ+ˆDŒKØ Ð ÜŸZ™Z¨Ó1ˆDŒNØ ×ÑÔØˆ
rL)NNN) rrrrr
r r/r
rs@rKús?ø„ñð€Mà×Ñà'°!õ ð /òD"HòHD÷
rLcó€eZdZdZdZej ddœˆfd
«ZdZdZ dZ
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Ü ˆtz‰z× )ˆœ˜DŸJ™J×J°4·:±:×3FÑ3FÀqÑ3IÑ rLÚclosedc óTt|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|)rHrrIrJs €rKr/zPolygon.__init__qs'ø€ô ÑÑ"˜6ÒˆŒ Ø BrLcó|jS)zGet the `.Path` of the polygon.rr‰s rKrOzPolygon.get_pathƒr¿rLcó|jS)z%Return whether the polygon is closed.)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)r7r|rZ)rHs rKÚ
set_closedzPolygon.set_closeds;ð <‰<œ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óntj|«}|j\}}|jr?|dk(s|dkDrX|d|dk7j «r?tj
||dgg«}n#|dkDr|d|dk(j
«r|dd}t||j¬«|_d|_ y)
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.
rrrQNrÐT)
rkrÚshaperÓrpÚallrr™)rHrÚnvertsÚ_s rKr|zPolygon.set_xy¥ô Z‰Z˜‹^ˆØ—HH‰ ˆØ <Š<ð
˜Š{˜f qšj¨b°©e°r¸"±v©o×-BÑ-BÔ-DÜ—^^ R¨"¨Q©%¨ 2ð˜Šz˜r !™u¨¨2©×˜˜Wܘ" T§\¡\Ô2ˆŒ
؈
rLz+The vertices of the path as a (N, 2) array.)Údoc)rrrrrr
r r/rOrZr|r
rr
rs@rKgsVø„Ù ð×ÑØ%)õóðò"òò
ò ñB
&˜
E„BrLcóveZdZdZdZej ddœˆfd
«ZdZdZ dZ
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Útheta1Útheta2r=r3s rKrz
Wedge.__str__ÍsFØ ˜A‘ § ¡ ¨A¡°·±Ø ˜TŸ[™[¨$¯*©*ðàØT‰zÐrLr=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=rrÚ_recompute_path)rHrGr=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)ÚabsrårrmÚarcr=rjrkriÚ CLOSEPOLYrGr™) rHÚ connectorrìÚv1Úv2Úvr«s rKzWedge._recompute_pathæs>ä  ˜dŸk™kÑ)¨SÑ 1°UÒ #‰NˆFŸ ‰Ià!Ÿ[™[¨$¯+©+FˆFÜŸ ˆh‰hv˜vÓ&ˆà :‰:Ð ˆBØ™d ˜dÑ# t§v¡v°·
±
Ñ':Ñ;¸d¿f¹fÑDˆ  B¨¨Ð2ˆAØG#—)‘)ÐG˜YЯ©°1°2¨Ð¿¹ÐG‰Aô § ¡ ¨v°vÐ.>Ð@ˆ7#—)7˜YЯ©Ð7ˆAô˜!˜dŸf™f™* t§{¡{Ñ2°AÓ6ˆ
rLcó.d|_||_d|_y©NT)r™rG)rHrGs rKÚ
set_centerzWedge.set_centeróØˆŒ
؈Œ ؈
rLcó.d|_||_d|_y)r™©rHr[s rKÚ
set_radiuszWedge.set_radiuss؈Œ
؈ŒØˆ
rLcó.d|_||_d|_y)r™)rHs rKÚ
set_theta1zWedge.set_theta1 rLcó.d|_||_d|_y)r™)rHs rKÚ
set_theta2zWedge.set_theta2rLcó.d|_||_d|_y)r™r=©rHr=s rKrzWedge.set_widths؈Œ
؈Œ
؈
rLcóR|j|j«|jSr`©r™r‰s rKrOzWedge.get_pathó"Ø :‰:Ð Ø × Ñ Ô z‰zÐrL)rrrrrr
r r/rrOr
rs@rKÊsKø„Ùòð ×ÑØ;?õóðò$7ò6ò
ò
ò
ò
ö
rLc
ó®eZdZdZdZej ddgddgddgddgddgdd gddgg«Zejdd
œˆfd
«Z
d Z d
Z ddZ
ˆxZS)ÚArrowzAn arrow patch.cóy)NzArrow()r:r‰s rKrz
Arrow.__str__$sØrLr6çš™™™™™¹?gš™™™™™¹¿çš™™™™™é?g333333Ó¿r9ç333333Ó?ræc óNt|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/)rHrbrcÚdxÚdyr=rIrJs €rKr/zArrow.__init__+s)ø€ô< ÑÑ"˜
a˜˜B  *rLcó|jSr`rr‰s rKrOzArrow.get_pathLrLcó|jSr`)r‰s rKrzArrow.get_patch_transformOsØ×$rLcóæ|||_|||_|||_|||_|||_t j «jtj|j|j«|j«jtj|j|j««j|j|j«j«|_y)
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 rKzArrow.set_dataRð
ˆ=؈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¨¯©Ó
‰Yt—ww §¡Ó
‰V
ÕrL)NNNNN)rrrrrrÚ_create_closedr™r
r r/rOrr
rs@rKrr!s}ø„Ùòð
ˆD× Ñ Ø ˆcˆ
S˜$K # t ¨s°D¨k¸¸ ˆ
S˜#! ó
!€Eð×ÑØ.1õð+ò@òrLrc ózeZdZdZdZdZejdddddddd œˆ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
TN)rrrrr0Ú_length_includes_headÚ _head_widthÚ _head_lengthÚ_shapeÚ _overhangÚ_head_starts_at_zeroÚ _make_vertsr.r/)rHrbrcr r
r=rrrrrrIrJs €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|)rHrbrcr r
r=rrs rKzFancyArrow.set_data¶syð.
ˆ=؈DŒGØ ˆ=؈DŒGØ
ˆˆDŒHØ
ˆ>؈DŒHØ Ð ØˆDŒKØ Ð )ˆDÔ Ø Ð "Ø +ˆDÔ Ø ×ÑÔØ D—J‘JÕrLcóZ|jd|jz}n |j}|jd|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 ddg«}
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$Úarrayr%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‰76?˜ ÜŸ 1 a )ˆD  ˆ—^‘^ T§[¡[ˆBÜ Ÿh™hØc
Ørc˜A‘gؘ˜B™  Ð˜2˜# ™'И! ð (óˆOð× K°Ð#3Ñ3à× K°!¡O°QÐ#7Ñ7à{‰{˜fÒ(à#2°a¸°WÑ#<Ð Ø—;; -—[[  Ÿ^™^¨_¸S¸bÐ-AØ-=¸b¸fÀ"¸fÑ-Eð-GóH%Ð':¸4¿;¹;¸/Ð%JÓ˜1Š}Ø—X‘X Ñ(Ø—X‘X Ñ(‘ðb˜R˜C ˜9Ð%ˆAÜŸ ¨Ó˜$Ÿ(™(ј$Ÿ(™(Ñ.ñˆDJrL) rrrrrr
r r/r&r
rs@rKrrts]ø„ñð€Mòð×Ñà°5ÀTظ!Ø%*õ5ð5<ðn! D¨T°dÀ$Ø ¨dô& öP<rLrú
rQ)rcóNeZdZdZdZej dddœˆfd «ZˆxZS)Ú
CirclePolygonz*A polygon-approximation of a circle patch.cótd}||jd|jd|j|jfzS)Nz1CirclePolygon((%g, %g), radius=%g, resolution=%d)rr)rr[rr”s rKrzCirclePolygon.__str__%s5Ø ?ˆØD—G‘G˜A‘J §¡¨¡
¨D¯K©K¸×9IÑ9IÐ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
rrr.r/)rHrr[r>rIrJs €rKr/zCirclePolygon.__init__)s,ø€ô ÑØ 
ð DØ#)°qñ DØ<Bó DrL©r•) rrrrrr
r r/r
rs@rKr;r;"s1ø„ÙKð×ÑðDØõDóôDrLr;cóèeZdZdZdZej ddœˆfd
«ZdZdZ dZ
d „Z d
Z e
e e «Zd Zd Ze
ee«Zd
ZdZe
ee«ZdZdZe
ee«ZdZdZdZˆ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¨¯©ðàØT‰zÐrLrrnc óÐt|di|¤Ž||_||c|_|_||_t
j«|_d|_ tj«|_ y)
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)rHrr=r>r2rIrJs €rKr/zEllipse.__init__Ds^ø€ô( ÑÑ"˜ˆŒ Ø$)¨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%)rHrGr=r>s rKÚ_recompute_transformzEllipse._recompute_transformgð×% d§l¡l°1¡oÓ×% d§l¡l°1¡oÓ8ˆà×# D§K¡KÓØ×$ T§\¡\Óð!¤
× 3Ñ 3Ó 5ß
‰U5˜3‘; ¨¡ ¨t×/LÑ/LÑ LÓ
‰Z˜Ÿ
Ó
‰U1a˜$×
‰Y˜ð ! ˆÕrLcó|jS)zReturn the path of the ellipse.rr‰s rKrOzEllipse.get_pathzr¿rLcó:|j«|jSr`)rJr‰s rKrzEllipse.get_patch_transform~sØ ××$rLcó ||_d|_y)zs
Set the center of the ellipse.
Parameters
----------
xy : (float, float)
TN)rEr{s rKzEllipse.set_centersðˆŒ Øˆ
rLcó|jS)z!Return the center of the ellipse.©rEr‰s rKrczEllipse.get_centerrlrLcó ||_d|_y)zl
Set the width of the ellipse.
Parameters
----------
width : float
TNr~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)rGrxs rKryzEllipse.set_angle·rQrLcó|jS)z Return the angle of the ellipse.©rGr‰s rKrozEllipse.get_angleÂrLcóD|j«jgd¢«S)
Return the corners of the ellipse bounding box.
The bounding box orientation is moving anti-clockwise from the
lower left corner defined before rotation.
)))rr^)rr`r‰s rKrazEllipse.get_cornersÈs#ð×)×  2rLcóö|j|jkr"|j«jddg«}n!|j«jddg«}|Dcgc]
}t |«Œc}Scc}w)
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>rrR©rHÚretrbs rKÚ get_verticeszEllipse.get_verticesÒóhð :‰:˜Ÿ Ò ×ÀÐ7HÓI‰Cà×6¸ÀÐ7HÓIˆCØ"%Ö&˜Q”a•Ò&ùÒÁ!A6cóö|j|jkr"|j«jddg«}n!|j«jddg«}|Dcgc]
}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/rJrOrrcr
rGrrgr=r„rkr>ryror2rar_rcr
rs@rKrCrC;ø„Ùòð ×ÑØ34õ ð ?òD ò&ò òñj 
-€Fò òñ
Y  Ó *€Eò òñj 
-€Fò òñ
Y  Ó *€Eò  'rLrCcóÞeZdZdZej
dˆfd„ «ZdZdZdZ e
e e«Z dZ dZ
e
e
e «ZdZd „Ze
ee«Zd
Zd Zd Zd
Ze
ee«ZdZdZdZˆ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=r2rIrJs €rKr/zAnnulus.__init__ôs=ø€ô2 ÑÑ"˜ ؈Œ ؈Œ
؈Œ
؈
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©rHs rKrzAnnulus.__str__s]Ø 6‰6T—V‘VÒ Ø‰Aà˜ŸÐ ˆAà9$—+‘+Ð9˜9 $§*¡*Ð9¨d¯j©jÑ :rLcó.||_d|_d|_y)zs
Set the center of the annulus.
Parameters
----------
xy : (float, float)
NT)rEr™r{s rKzAnnulus.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)
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)Úminrirr0r™s rKrzAnnulus.set_width0sDð ”3t—vv˜tŸv™vÓ ØRð
RðˆŒ ØˆŒ
؈
rLcó|jS)z1Return the width (thickness) of the annulus ring.rfr‰s rKrgzAnnulus.get_widthBrLcó.||_d|_d|_y)zq
Set the tilt angle of the annulus.
Parameters
----------
angle : float
NT)rGr™rxs rKryzAnnulus.set_angleHsðˆŒ ØˆŒ
؈
rLcó|jS)z Return the angle of the annulus.rWr‰s rKrozAnnulus.get_angleTrLcó@t|«|_d|_d|_y)zv
Set the semi-major axis *a* of the annulus.
Parameters
----------
a : float
NT)rir™)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™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)rkrirr™rjs rKrgzAnnulus.set_radiirs]ô 8‰8A;˜ ؉NˆDŒFD•FÜ
X‰Xa[˜
Ü# A &ˆDŒFT•VäÐ ˆŒ
؈
rLcó2|j|jfS)z:Return the semi-major and semi-minor radii of the annulus.)rir‰s rKÚ get_radiizAnnulus.get_radiiˆsàv‰vt—vvˆrLcótj«j|j||f«Žj |j
«j |j|j«Žj|«Sr`) rrrKrrLr2r%rG)rHris rKÚ_transform_vertszAnnulus._transform_vertsŽslððŒz×
‰UD×*¨A¨q¨6Ó
‰Z˜Ÿ
Ó
‰Y˜×.¨t¯{©{Ó‰Y
ð  rLcótjdd«}|j|j|j}}}|j |j ||«}|j |j ddd||z
||z
«}tj|||dddfdg«}tj|jtj|jddtjtjg«}t||«|_
y)Nrr\r)rrir=r{rjrkÚvstackÚhstackrirmr™) rHris rKzAnnulus._recompute_path•äh‰hq˜#Óˆð—&&˜$Ÿ&™& $§*¡*ˆaˆ1ˆØ
×
" 3§<¡<°°AÓ
6ˆØ
×
" 3§<¡<±°"°Ñ#5°q¸1±u¸aÀ!¹eÓ
DˆÜ I‰Ir˜2˜r !¢Q $™x¨Ð Ü I‰Is—y‘y¤$§+¡+Ø—y‘y  }¤d§k¡kÜ—~
(ˆô˜!˜Q“Zˆ
rLcóR|j|j«|jSr`rr‰s rKrOzAnnulus.get_path¤rrL©r6)rrrrr
r r/rrcr
rGrrgr=ryror2rsrvrgryÚradiir{rOr
rs@rKrereïø„ñð×Ñôóðò@
òñj 
-€Fòò$ñ
Y  Ó *€Eò
òñ
Y  Ó *€Eò
ò
òò,ñ
Y  Ó *€Eòò
 örLrecófeZdZdZdZej dˆfd„ «ZdZdZ 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 óDt|||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ó4d|zx|_|_d|_y)zm
Set the radius of the circle.
Parameters
----------
radius : float
rQTN)r=r>s rKzCircle.set_radiusÂsð$% v¡:Ð-ˆŒ
T”[؈
rLcó |jdz S)z Return the radius of the circle.rHr‰s rKÚ
get_radiuszCircle.get_radiusÍsàz‰z˜B‰ÐrLrA)
rrrrrr
r r/rˆr
r[r
rs@rKªs?ø„ñòð
×Ñô óð ò òñj *Ó
-„FrLcó€eZdZdZdZej ddddœˆfd
«Zejd«Z
dZ 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>r2r3s rKrz Arc.__str__ÛsOØ ˜A‘ § ¡ ¨A¡°·
±
Ø ˜TŸZ™Z¨¯©°d·k±kðCˆð<ˆàT‰zÐrLr6g€v@)r2c ó8|jdd«}|r td«t‰ | |||fd|i|¤Ž||_||_|j
«\|_|_|_ |_
tj|j|j«|_
y)
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/Ú_theta_stretchÚ_theta1Ú_theta2Ú_stretched_widthÚ_stretched_heightrr™)
rHrr=r>r2rIr)rJs
€rKr/z Arc.__init__âø€ðH× Ñ  ¨ÓÙ ÜÐ 
ј˜U FÑB°%ÐB¸6ÒˆŒ ؈Œ à#'×#6Ñ#6Ó#8ñ !ˆŒt”| TÔ%:Ø
Ô Ü—X‘X˜dŸl™l¨D¯L©LÓ
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)

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\rtjd|«}
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,) rBrCrDrEr r
Údr2ÚD2ÚdiscrimÚsign_dyÚ sqrt_discrims rKÚline_circle_intersectz'Arc.draw.<locals>.line_circle_intersectWsØbˆb‘ˆBØr'˜B ™GÑ#ˆR˜"˜r™'Ñ!ˆQˆBؘB‘hˆGؘ#Š~ÜŸ+™+ a¨Ó,Ü!Ÿw™w wÓ/ Ü—x˜2v ¨"¡ ¨|Ñ ;Ñ;¸r˜B ¨<Ñ!7Ñ7¸@à˜2v ¨"¡ ¨|Ñ ;Ñ;¸r˜B ¨<Ñ!7Ñ7¸@ðAóBðBô —xx Ó'rLcóÀd}||kr||}}n||}}||kr||}}n||}} ||||«} | j\}
} | ||z
|
k|
||zkz||z
| kz| ||zkzS)Ng•Ö&è .>)ÚT)
rBrCrDrEÚepsilonÚx0eÚx1eÚy0eÚy1eÚxysÚxsÚysrs
€rKÚsegment_circle_intersectz*Arc.draw.<locals>.segment_circle_intersectis ø€ØˆBŠwؘrS‘à˜rSØBŠwؘrSà˜rSÙ¨B°°BÓ7ˆCØ—U‘U‰FˆBØØw‘ Ñ¨S°7©]Ñ(:ј= 'Ø*,¨s°W©}Ñ*<ñð
rLÚrootr¶réT)#rórJrrrr'rrJÚaxesÚ
get_figurerMrNrr@Ú transformedÚsetÚziprjrkÚrad2degrrrrÚsortedÚdeg2radraÚcosÚsinr™)rHÚdata_to_screen_transÚpwidthÚpheightÚ inv_errorr¨Úbox_path_transformÚbox_pathÚthetasÚp0Úp1rrbrcÚthetaÚ
last_thetaÚ
theta1_radrsÚ
path_originalrs @rKzArc.drawslø€ð\×ÑÔ à × ×ÑÔðà × *¨D×,AÑ,AØ,0×,BÑ,Bð,Dó
Eà × *¨6Ó 
 ˆð-ˆ à   '¨IÒ"5Ü—::˜d   (ô$ ô*
× ¯ © Ò(P°T·_±_È%°_Ó5P×'VÑ'VÓ × Ñ Ó
 ô×(×4Ð5GÓHˆäˆä˜(×+¨C¨RÐ0°(×2CÑ2CÀAÀBÐ2GÓ H‰FˆBÙ3¨2ÐÒ3ˆBØ—4‘4‰DˆAˆqô—Z‘Z¤§
¡
¨1¨aÓ 0Ó1°CÑ7¸>ˆ M‰MØt—|| eѸ¿ ¹ Ñ0DÑ
Hð
 Hô˜ 4§<¡< 0ˆØ—\\ˆ
Ü—ZZ § ¡ Ó-ˆ
Ø×
V‰V
¤§¡¨
Ó!3Ð 
ˆð
Ÿ
ˆ
Øò ˆEÙÜ!ŸX™X j°%¸Ó;
Ü
˜4 ÔàØ‰Jð ð
rLc
óJ|j«}tdt||j|j|j
|j f«D««rK|\|_|_|_|_tj|j|j«|_ yy)Nc3ó,K|] \}}||k7Œy­wr`r:)rdris rKrgz#Arc._update_path.<locals>.<genexpr>¤sèø€ò6™$˜!˜QˆqA6ùs)
rprrrrrr™)rHÚ stretcheds rKzArc._update_path¡à×)ˆ Ü ñ6¤#ؘDŸL™L¨$¯,©,¸×8MÑ8MØ ×#5ô (1ñ
%ˆTŒ\˜4œ<¨Ô)>Ø
Ô
Ÿ $§,¡,°· ± Ó=ˆD  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¿rKrbrcÚsthetas rKÚ
theta_stretchz)Arc._theta_stretch.<locals>.theta_stretch®sVÜ—JJ˜uÓ%ˆEÜu“
ˆu“
ˆ—Z§
¡
¨5°1©9°aÓ 8Ó9ˆ˜SL  'rL)rr=rr>)rHr=r>s rKzArc._theta_stretch«s´ò×# D§J¡JÓØ×$ T§[¡[Óð
VŠOð—[[ D§K¡KÒ—[[ &¨$¯+©+¸Ñ*;Ò" 4§;¡;°¸±Ó?ˆ" 4§;¡;°¸±Ó?ˆ˜6 5¨&Ð {‰{˜DŸK™K¨°Ð6rL)rrrrrr
r r/r
r r
rs@rKÔsVø„ñò ð×Ñà 3¨uõ-ð-:ð^ ×ÑñL ðL#ò\7rLcó˜|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.
padérQF)rr=r>r)Úclip_on)
ÚcopyÚpopr#rÿr,rBrCr=r>rrr)r
Úpropsr)rMs rKÚ bbox_artistrÑÊs¸ð
€}ØˆØ J‰J‹L€EØ
)‰)E˜
€CØ
×
# 
(€CØ #ˆ6× #  -€DÜØ G‰Gc˜A‘gÑ ˜tŸw™w¨¨q©Ñ j‰j˜ t§{¡{°SÑ'8Ø
œZ×;ÀUô L€Að‡HHˆU„O؇FFˆrLcóªt|j|j|j|dd¬«}||j |«|j |«y)
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)N)r,r=r>r)rMr(rQs rKÚ draw_bboxrÓásEô T—W‘W D§J¡J°t·{±{ذuô >€Aà ÐØ ˜Ô؇FFˆ8ÕrLcó|eZdZdZdZdZed«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|jd|j «|jd|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˜ # S×%6Ñ%6Ó%8Ø|‰|ˆ ×—(‘(œ3˜xŸ°·±ÓBðñð'
ó rLc ó¸|jdd«jd«}|dj«} |j|} |ddDcgc]}|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µú,rzUnknown style: Nrú=zIncorrect style argument: r:)ÚreplaceroÚlowerrÝÚKeyErrorr) Ú stylenamerIÚ_listÚ_nameÚ_clsÚerrrÃÚ
_args_pairÚkrñÚ_argss rKÚ__new__z_Style.__new__ sð×! # rÓÓØa‘Ó ˆð GØ—?‘? 5Ñ)ˆDð EØ27¸¸°)Ö<¨B˜"Ÿ(™( 3<ˆ<Ø-7×8¡T ˜a‘[Ð8ˆEÑÑ)˜Ð) *øôò 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.)s rKÚ
get_stylesz_Style.get_styles sðÐrLc
óldg|jj«Dcgc];\}}|jd|dtt j
|««ddxsdfŒ=c}}¢}t
|ŽDcgc]}td|D««Œ}}djd|D««}d jd
|djd t
|d |«D««|g|dd
Dcgc]$}djdt
||«D««Œ&c}¢|«}tj|d¬«Scc}}wcc}wcc}w)z5Return the available styles as pretty-printed string.)ÚClassÚNameÚ
Parametersz``rc3ó2K|]}t|«Œy­wr`)rF)rdÚcells rKrgz'_Style.pprint_styles.<locals>.<genexpr>* sèø€Ò4 T”s˜4—yÑ4ùsz c3ó&K|] }d|zŒ y­w)Nr:)rdÚcls rKrgz'_Style.pprint_styles.<locals>.<genexpr>+ sèø€Ò#?° C¨"¥HÑ#?ùsr9c3óDK|]\}}|j|«Œy­wr`©Úljust©rds rKrgz'_Style.pprint_styles.<locals>.<genexpr>/ sèø€Ò¨¨rd—j‘j —nÑLùó rNc3óDK|]\}}|j|«Œy­wr`s rKrgz'_Style.pprint_styles.<locals>.<genexpr>1 sèø€ÒI©8¨4°˜Ÿ
 ÑIùrþz )Úprefix) ÚitemsrÚstrÚinspectÚ signaturer°ÚmaxrÛÚtextwrapÚindent)ÚtableÚcolumnÚcol_lenÚtable_formatstrÚrowÚ rst_tables rKz_Style.pprint_styles sKð %(§O¡O×$9Ñ$9Ó$;÷ 
!t˜Sð —L‘Là˜˜˜bœ×)¨#Ó°"Ð?¸ò Aó>ˆôDGÈÀ;ÖO¸”3Ñ4¨VÔП)™)Ñ#?°wÔ#?ÓØ—I‘IØ Ø Ø I‰IÑL´S¸¸q¹À7Ó5KÔ ð 
ð ˜q˜r˜öði‰iÑI´s¸3ÀÓ7HÔ 
ð
ð
ó ˆ ô˜y°Ô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Ú_Baser)Ústyles rKz_Style.register7 s;ô˜% §¡Ô ˜wÐ&=¸c¿i¹i¸ JØ %ˆ˜ÒrLN) rrrrÚ classmethodrñr Ú
deprecatedrÙr:rLrKîsiñò  ò&+ð$ñóððñð:ð.Ø€T‡_Øñ
 óñ &rL©có„|tjt||¬«S|||xs|jj «<|S)z=Class decorator that stashes a class in a (style) dictionary.r)Ú functoolsÚpartialÚ_register_styler)Ú
style_listrßs rKrrD s=à
€{Ü× Ñ ¤°*À4ÔHØ/2€JˆtÒ+s—||× €JrLcó¼eZdZdZiZee«Gdd««Zee«Gdd««Zee«Gdd««Zee«Gdd ««Z ee«Gd
d e ««Z
ee«Gd d
««Z ee«Gdd««Z ee«Gdd««Z
ee«Gdd««Zee«Gdde««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óeZdZdZddZdZy)úBoxStyle.Squarez
A square box.có||_y©z 
Parameters
----------
pad : float, default: 0.3
The amount of padding around the original box.
©rHs rKr/zBoxStyle.Square.__init__p ó ðˆDHrLcóª||jz}|d|zz|d|zz}}||z
||z
}}||z||z}}tj||f||f||f||fg«S©NrQ©rr) rHrBrCr=r>Ú
mutation_sizerËrDrEs rKÚ__call__zBoxStyle.Square.__call__y s{Ø $§(¡(Ñ*ˆCà! A¨¡G™O¨V°a¸#±gÑ-=6ˆ˜#X˜r C™xˆBؘ%Z  ˆ×b˜B ˜8 b¨" °B¨xÐ
:rLr©rrrrr/r)r:rLrKÚSquarerl sáó ó :rLr,cóeZdZdZddZdZy)ú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Úcircler)rHrBrCr=r>r(s rKr)zBoxStyle.Circle.__call__ srØ $§(¡(Ñ*ˆCØ! A¨¡G™O¨V°a¸#±gÑ-=6ˆ˜#X˜r C™xˆBÜ—;‘;  U¨Q¡Y¡°°V¸a±Z±Ð@Ü # E¨6Ó 2°QÑ 6ó
8rLNr*r+r:rLrKr.ƒ sáó ó 8rLcóeZdZdZddZdZy)ú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ËÚmathrrrKr%Útransform_pathrrH)
rHrBrCr=r>r(rirQs
rKr)zBoxStyle.Ellipse.__call__© Ø $§(¡(Ñ*ˆCØ! A¨¡G™O¨V°a¸#±gÑ-=6ˆ˜#‘X˜r C™xˆBØœŸ ™  !› Ñ$ˆAØœŸ 1›Ñ%ˆAÜ“J×$ Q¨Ó4°R¸%À!¹)±^Ø57¸&À1¹*±_óFˆ××(8Ñ(8Ó(:Ó ;rLNr*r+r:rLrKrCr3˜ sñ ó  ó <rLrCcóeZdZdZddZdZy)ú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(rDrEr Údxxs rKr)zBoxStyle.LArrow.__call__Á à $§(¡(Ñ*ˆCà! A¨¡G™O¨V°a¸#±gÑ-=6ˆ˜#X˜r C™xˆBؘ%Z  ˆr'˜Qˆq&ˆc˜Ciˆ×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óeZdZdZdZy)úBoxStyle.RArrowz-A box in the shape of a right-pointing arrow.có¨tjj||||||«}d|z|z|jdddfz
|jdddf<|S)NrQr)rr?r)rj)rHrBrCr=r>r(Úps rKr)zBoxStyle.RArrow.__call__Ø sTÜ×b˜"˜e V¨]ó<ˆ  2™v¨™~°·
±
º1¸a¸4Ñ0@Ñ@ˆAJ‰Jq˜! ؈HrLrrrrr)r:rLrKÚRArrowrAÔ s
á rLrEcóeZdZdZddZdZy)ú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  ˆr'˜Qˆq&ˆc˜Ciˆ×c˜2  R ØR˜#‘X  b¡¨3¡°°R±Ð 8ØR˜#‘XØR˜™8 R˜c‘˜2 ™8Ð$ r¨B¡w°°R±Ð&8Øc˜2 ™8Ðc‘˜2ð( ó
!rLNr*r+r:rLrKÚDArrowrGÞ sá ó !rLrJcóeZdZdZddZdZy)úBoxStyle.RoundzA box with round corners.Ncó ||_||_y)
Parameters
----------
pad : float, default: 0.3
The amount of padding around the original box.
rounding_size : float, default: *pad*
Radius of the corners.
Ú
rounding_size©rHrOs 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&)rOrrmÚCURVE3rí© rHrBrCr=r>r(ÚdrrDrEÚcpÚcoms rKr)zBoxStyle.Round.__call__
srð  $§(¡(Ñ*ˆ×" T×%7Ñ%7Ñ7àà! ¡G™O¨V°a¸#±gÑ-=6ˆ˜#X˜r C™xˆBؘ%‘Z  f¡ˆBð˜‘7˜B˜‘7˜Br(˜ ˜r˜Bwr(˜R "™W b˜˜7˜Br(˜R  ˜r˜Bwr(˜R "™W b˜˜7˜B !ˆBô—;‘;Ü—;‘;Ü—;‘;¤§ ¡ Ü—;‘;Ü—;‘;¤§ ¡ Ü—;‘;Ü—;‘;¤§ ¡ Ü—;‘;Ü—;‘;¤§ ¡ Ü—>‘>ð #ˆ˜˜C“=Ð rL©rNr+r:rLrKÚRoundrL
sá
( !rLrYcóeZdZdZddZdZy)úBoxStyle.Round4zA box with rounded edges.Ncó ||_||_y)
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)rOrrmÚCURVE4rírTs rKr)zBoxStyle.Round4.__call__M
ð  $§(¡(Ñ*ˆ×" T×%7Ñ%7Ñ7à˜2Xà˜A ™GO a¨"¡fÑ,ˆ˜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“=Ð rLrXr+r:rLrKÚRound4r[=
sá
 !rLr_có$eZdZdZddZdZdZy)úBoxStyle.SawtoothzA box with a sawtooth outline.Ncó ||_||_y)
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)Ú
tooth_size)rHrcs rKr/zBoxStyle.Sawtooth.__init__r
sðˆDŒHØ(ˆDOrLcó`||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|dfS)NrrQrr)rcÚroundrkÚlinspacer°)rHrBrCr=r>r(rcÚhszÚdsx_nÚdsy_nrDrEs rKÚ_get_sawtooth_verticesz(BoxStyle.Sawtooth._get_sawtooth_vertices~
suð  $§(¡(Ñ*ˆÐ!ŸX™X¨™]¨]Ñ:
à!Ÿ_™_¨}Ñ<
à˜q‘.ˆCؘA ™G‘O jÑ0ˆEؘa #™gÑ
Ñ2ˆFô˜5 :Ñ-°*¸q±.ÑBÀQÑFˆ˜6 .°:À±>ÑCÀaÑGˆ˜#‘^ R¨#¡X°¡^ˆBؘ%‘Z  f¡ˆBððÜ—[‘[  c¡¨2°©8°Q¸±YÀ±]Óàr˜C‘x  R¨#¡XÐÑ
¸¸5¹À¹Ðððô—[‘[  c¡¨2°©8°Q¸±YÀ±]Óðr˜C‘x  R¨#¡XÐÑ
¸¸5¹À¹ÐˆBð Ør˜C‘x  R¨#¡XÐÑ
¸¸5¹À¹Ðàðä—[‘[  c¡¨2°©8°Q¸±YÀ±]Óðr˜C‘x  R¨#¡XÐÑ
¸¸5¹À¹Ððð ô—[‘[  c¡¨2°©8°Q¸±YÀ±]ÓˆBð2”S˜˜R“[Ð1 2 a¡5¨"¨Q©%  1rLcóF|j|||||«}t|d¬«S)NTrÐ)rjr)rHrBrCr=r>r(Ú saw_verticess rKr)zBoxStyle.Sawtooth.__call__¤
s+Ø×6°r¸2¸uØ7=¸}óNˆ˜ ¨TÔ 2rLrX)rrrrr/rjr)r:rLrKÚSawtoothran
sá
$ 2óL 3rLrmcóeZdZdZdZy)úBoxStyle.Roundtoothz&A box with a rounded sawtooth outline.có&|j|||||«}tj||dgg«}tjgtj
tj
gt
|«dz
dzzztjgz}t||«S)NrrrQ)rjrkrrmrSrF)rHrBrCr=r>r(rlris rKr)zBoxStyle.Roundtooth.__call__­
Ø×6°r¸2Ø7<¸fØ7DóFˆŸ>™>¨<¸,Àq¹/Ð9JÐ*KÓLˆ—kk—k‘k¤4§;¡;Ð/´C¸ Ó4EÀaÑ4GÈ!Ñ3KÑMä—n&ˆ˜   ,rLNrDr:rLrKÚ
Roundtoothro©
s
á -rLrqN)rrrrrr,rCr?rErJrYr_rmrqr:rLrKrrL s@ñð8€Ká:ñ,8ñ(<ñ6"ñ>óóñ"""!ñH777!ñr...!ñ`8883ñt -  -rLrcóeZdZdZiZGdd«Zee«Gdde««Zee«Gdde««Zee«Gdd 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ó&eZdZdZdZdZ ddZy)ú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óˆfdS)zw
Return a predicate function testing whether a point *xy* is
contained in *patch*.
cóNjt|d|d¬««dS)Nrr)rbrc)rtr)rs €rKú<lambda>z1ConnectionStyle._Base._in_patch.<locals>.<lambda>ò
s*ø€˜eŸn™nÜ " Q¡%¨2¨a©5Ô3Ø34ñ6€rLr:)rHs `rKÚ _in_patchzConnectionStyle._Base._in_patchí
s
ø€ó

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Ó>GAðÜ.¨t°WÓ=‘GD˜!ðˆK4ˆKøôÙðûô
ØØˆús)8© 5´5¸ AÁANc ó>|j||«}|j||r|j|«nd|r|j|«nd«}|j||rtg|jd¢|­Žnd|r tg|jd¢|­Ž«}|Sd«}|S)
Call the *connect* method to create a path between *posA* and
*posB*; then clip and shrink the path.
Nr)Úconnectr}ryrrj)rHÚposAÚposBÚshrinkAÚshrinkBÚpatchAÚpatchBrRs rKr)zConnectionStyle._Base.__call__ ð —<<  +ˆ—:Ù*0˜&°dÙ*0˜&°dóˆ
—:Ù=D”
Ð9˜tŸ}™}¨QÑÓ9È$Ù>E”
Ð:˜tŸ}™}¨RÑ:°'Òˆ
ˆKðLPóˆDð
ˆKrL)rHrHNN)rrrrryr}r)r:rLrKrruá
sñ
ò ð*BFô rLrcóeZdZdZddZdZy)ú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€rrDrEÚx2Úy2Úx12Úy12r r
Úfr6Úcyrjris rKrzConnectionStyle.Arc3.connect/ ؉FˆB؉FˆBؘR™ 2‘~¨¨R©°2¡~ˆ˜"‘W˜b 2™gˆˆAà˜1˜r™6‘\ 3¨¨R©¡<ˆBà˜R˜Ø˜R˜Ø˜R˜ð"ˆHô—[‘[Ü—[—[‘[ð"ˆ˜  (rLNr€©rrrrr/rr:rLrKÚArc3r‡ sñ ó ó )rLrcóeZdZdZddZdZy)ú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)
Parameters
----------
angleA : float
Starting angle of the path.
angleB : float
Ending angle of the path.
N)ÚangleAÚangleB)rHrr—s rKr/zConnectionStyle.Angle3.__init__K sð!ˆDŒKØ ˆDKrLc
ó\|\}}|\}}tjtj|j««}tjtj|j««}tjtj|j
««} tjtj|j
««}
t
||||||| |
«\} } ||f| | f||fg}
tjtjtjg}t|
|«Sr`)
r6r´Úradiansrr—rrrmrS)rHr€rrDrErÚcosAÚsinAÚcosBÚsinBr6rrjris rKrzConnectionStyle.Angle3.connectY ؉FˆB؉FˆBä—8‘8œDŸL™L¨¯©Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó6ˆ% b¨"¨d°DØ&(¨"¨d°Dó:‰FˆBð˜R˜ 2 r (¨R°¨HÐ5ˆHÜ—[‘[¤$§+¡+¬t¯{©{Ð;ˆ˜  (rLN)éZrrr:rLrKÚAngle3r”B sñ ó  )rLcóeZdZdZddZdZy)ú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)rr—r‰)rHrr—r‰s rKr/zConnectionStyle.Angle.__init__t sð!ˆDŒKØ ˆDŒKàˆDHrLc
ó˜|\}}|\}}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™rr—rrrmr‰rkrÚextendrS)rHr€rrDrErrrr6rrjriÚdx1Údy1Úd1Úf1Údx2Údy2Úd2Úf2s rKrzConnectionStyle.Angle.connect‡ ؉FˆB؉FˆBä—8‘8œDŸL™L¨¯©Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó6ˆDÜ—8‘8œDŸL™L¨¯©Ó6ˆ% b¨"¨d°DØ&(¨"¨d°Dó:‰FˆBð˜R˜zˆHÜ—[‘[MˆEàx‰x˜2Š~Ø  R Ô œTŸ[™[Õ ™7 B¨¡GSÜ—XX˜c 'Ø—XX ]Ø ™7 B¨¡GSÜ—XX˜c 'Ø—XX ]Ø " s¨R¡x¡-°°c¸B±h±Ð!?Ø"$ b Ø"$ s¨R¡x¡-°°c¸B±h±Ð!?ð!AôBð œdŸk™k¬4¯;©;¼¿ ¹ Ð O‰O˜R ˜HÔ L‰LœŸÔ ˜  (rLN)rr6rr:rLrKÚAngler¡j sñ ó ó&! )rLr­cóeZdZdZddZdZy)ú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)
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)rr—ÚarmAÚarmBr‰)rHrr—r‰s rKr/zConnectionStyle.Arc.__init__´ s'ð(!ˆDŒKØ ˆDŒK؈DŒI؈DŒIàˆDHrLcóÎ|\}}|\}}||fg}g}tjg} |jrÇtjtj
|j ««}
tjtj
|j ««} |j|jz
} |j|| |
zz|| | zzf«|j} |j|| |
zz|| | zzf«|jr|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)rrmr6r´r™rr‰r—rS)rHr€rrDrErrjÚroundedrirÚ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™[FB˜Ø# b™[¨&°2©+˜˜r™' ¡GÑÑ2—N‘N B¨¯©°B©¸Ñ);Ñ$;Ø$&¨¯©°B©¸Ñ);Ñ$;ð$=ô—OO —LL¤$§+¡+Ü"&§+¡+Ü"&§+¡+ð"/õ& b™\FB˜Ø# b™[¨&°2©+˜˜r™' ¡GÑÑ2˜Ÿ‘MØ  R¡¨"¡Ñ,¨b°1°r±6¸B±;Ñ.>Ð" -ñØ  ˜b™ " r¡'Bؘ2g  Ñ'¨BÑ.à  T§X¡X°¡]°RÑ%7Ñ 7Ø " T§X¡X°¡]°RÑ%7Ñ 7ð Ô œdŸk™kÜ"Ÿk™kÜ"Ÿk™kð
O‰O˜R ˜HÔ L‰LœŸÔ ˜  (rL)rrNNr6rr:rLrKª sñ ó ó69 )rLcóeZdZdZddZdZy)ú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)Úfractionr2)rHr2s rKr/zConnectionStyle.Bar.__init__ s ð"ˆDŒI؈DŒIØ$ˆDŒM؈DJrLcó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±r2rkr´rrrm)rHr€rrDrEÚx20Úy20rr r
ÚddxÚddyr±Útheta0ÚdthetaÚdlÚdLÚdd2ÚarmrÚcx1Úcy1Úcx2Úcy2rjris rKrzConnectionStyle.Bar.connect) ؉FˆBØ $Ð $‰HˆC‘vr˜2ä—Z‘Z  R¡¨¨b©Ó1ˆ˜"W˜b 2™gˆr'˜B ™GÑÑ*ˆ˜B‘w  R¡ˆCàŸ D§I¡I$ˆDàz‰zП D§J¡JÓ/Ø &™Øœ$Ÿ(™( *Øœ$Ÿ(™( 6Ó*ؘb¤4§8¡8¨FÓ#3Ñ3°R¸"¼t¿x¹xÈÓ?OÑ:OÑ5OBؘbyð˜b™ " r¡'BؘBw  Ñ(¨RÑ/Ø ™8 R¨#¡XSäd˜D“/ˆ
 Ñ" (ˆ˜A ™G| R¨!¨c©'¡\ˆ˜A ™G| R¨!¨c©'¡\ˆ˜R˜Ø˜
ؘc˜
ؘc˜
ð$ˆHô—[‘[Ü—[‘[Ü—[—["ˆ
˜  (rL)r6r6rNrr:rLrKÚBarr¼
sñ ó ó,' )rLN) rrrrrrrr­r:rLrKrsrs¹
ñ"ðH€K÷9ñ9ñv#)ˆ##)ñJ%)ó%%)ñN=)ó==)ñ~])ˆ]])ñ~E)ˆEE)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
Úffrs
rKÚ_point_along_a_linerÒS sSð
"‰Wb˜2gˆ€BØ
ˆb2‰g˜˜R™Ñ 
&Ñ &€BØ
"r'‰\˜2  ™<ˆ€Bà
ˆrˆ6€MrLcó2eZdZdZiZGdd«ZGdde«Zeed¬«Gdd e««Zeed
¬«Gd d e««Z eed
¬«Gdde««Z
eed¬«Gdde««Z eed¬«Gdde««Z eed¬«Gdde««Z
eed¬«Gdde««Zeed¬«Gdde««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ó0eZdZdZed«ZdZ ddZy)ú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|ô˜1ˆHÜH“
 Ò" h¨q¡k°!¡n¼¿ ¹ Ò&CؘQ‘K ‘N¤d§k¡kÒ ØDðDà5X˜a[ 5 h¨q¡k°!¡nÐ 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.
)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)rjrrirkÚiterable) rHrRr(r%Ú aspect_ratiorjÚ path_shrunkÚ path_mutatedÚfillablerCÚ path_lists rKr)zArrowStyle._Base.__call__¿ ðП=™=¨A¨|Ð+<Ñ<Ü" 8¨T¯Z©ZÓ8 à)-¯©¸ Ø8EØ8Aó*CÑ& ˜—;;˜+7ö!8Ø%&ô"& a§j¡j°A°|Ð3DÑ&DÀaÇgÁgÕ!Nð!8!8à$ Ð—~~ d¨M¸9ÓEùò
!8sÁ,B"N)r9)rrrrÚ staticmethodrÛr)r:rLrKr s+ñ ð
ñ

ð
 #%ô FrLrcóHeZdZdZdZdxZZ dˆfd„ ZdZdZ dZ
ˆ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 )

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×ú>z|>)ú[r×N)rrÚwidthAÚwidthBÚlengthAÚlengthBrr—ÚscaleAÚscaleBÚ_beginarrow_headÚ_beginarrow_bracketÚ_endarrow_headÚ_endarrow_bracketÚarrowrroÚ fillbeginÚfillendr.r/)rHrrr–r—Ú
beginarrowÚendarrowrJs €rKr/zArrowStyle._Curve.__init__ä sYø€ð*1<¸ -ˆ ˜dœoØ'-¨vÐ $ˆDŒK˜œØ)0°'Ð &ˆDŒL˜$œ,Ø'-¨vÐ $ˆDŒK˜œØ'-¨vÐ $ˆDŒK˜œà$)ˆ !Ø',ˆ $Ø"'ˆ Ø%*ˆ ˜$Ÿ*™*Ñ ð"1ó$(§:¡:×#3Ñ#3°C¸Ó#;Ñ ˆJ˜à˜SÒ Ø(,Ô%Ø+0Õ˜#Ø(,Ô%Ø+0Ô(Ø!%ؘ)Ø(-Ô%Ø+/Ô˜Ø&*Ô#Ø).Õ˜!Ø&*Ô#Ø).Ô# ؘ'Ø&+Ô#Ø)-Ô ‰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)rkrrrm)rHrBrCrDrEÚ head_distÚcos_tÚsin_tr%r r
Ú cp_distanceÚ
pad_projectedrÃÚvertices_arrowÚ codes_arrows rKÚ_get_arrow_wedgez"ArrowStyle._Curve._get_arrow_wedge"
sCð˜"W˜b 2™gˆŸ(™( 2 *ˆKð  )™^¨eÑ3ˆMð˜Ø ð  $ 2ˆ $ 2ˆ! -ˆ! -ˆ˜r‘z E¨B¡JѰ¸± ¸eÀb¹jÑ0HˆCؘr‘z E¨B¡JѸ±
¸UÀR¹ZÑ0Gˆ! C™x¨#™~¨r°C©x¸#©~Ð! C™x¨¨c©Ð! C™x¨#™~¨r°C©x¸#©~Ð@ˆNô Ÿ;™;ÜŸ;™;ÜŸ;™;ð(ˆ" °SÐ 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.bezierrrrmrrÚrotate_deg_aroundrö)rHrBrCrDrEr=r/r2rÿrrr r
rrrQs rKÚ _get_bracketzArrowStyle._Curve._get_bracketL
ô' r¨2¨r°2Ó6‰LˆE
.¨r°2°u¸eÀUÓK‰NˆBà˜e‘^ V¨e¡^ˆBà! B™w¨¨R©Ð! 2˜! 2˜hØ! B™w¨¨R©Ð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|¢dg|¢tj««|jd«nÇ|jt||««|jd«nš|j rŽ|jd\} } |jd\}
}|j#| | |
||j$| z|j&| z|j(«\}}|jt||««|jd«|r|j*rF|jd«|jtg|¢dg|¢tj««||fS|jd«|jt||««||fS|j,rŽ|jd\} } |jd\}
}|j#| | |
||j.|
z|j0|
z|j2«\}}|jt||««|jd«||fS)Nrrr+Fr\T)rrrkrrjrrrir rr—)rHrRr(r%rrrÿrBrCrDrEÚhas_begin_arrowÚ verticesAÚcodesAÚddxAÚddyArÚx3Úy3Ú
has_end_arrowÚ verticesBÚcodesBÚddxBÚddyBÚpathsÚfillss rKzArrowStyle._Curve.transmutef
à××(;Ò(;Ø"×Ñ> Ø!Ÿ_™_¨}Ñ<
ÜŸH™H [°*Ó= Ø*¨YÑ6¸
ÀYÑ8Nuà&*§k¡kÐ&9]¸t¿{¹{ˆFØ&*§k¡kÐ&9]¸t¿{¹{ˆ—]] %‰FˆBØ—]‘] 1Ñ%‰FˆBð¸R¸ÀRÈÀHÑ8LˆOñ×% b¨"¨b°"Ø&/°¸¸Jð˜"˜a 
*ˆIv˜t —]] &‰FˆBØ—]] &‰FˆBð!×H°R¸°HÀÀRÀÑ4HˆMñ×% b¨"¨b°"Ø&/°¸¸Jð˜"˜a 
*ˆIv˜t œ"Ÿ.™.¨B°©I°r¸D±yÐ+AÐ*BØ*.¯-©-¸¸"Ð*=Ø,.°©I°r¸D±yÐ+AÐ*Bð*DóEðŸ*™*ó'ˆGˆØ—>—LÐ1˜1¨&Ð1Ð3L°VÐ3L¼T¿^¹^Ð3LÓOà—LL Õ—L Ó!8Ô—LL Õן qÑ)‘Ÿ )BØ$(×$5Ñ$5°b¸"¸bÀ"Ø6:·k±kÀFÑ6JØ6:·l±lÀVÑ6KØ6:·k±kó%CÑ! ˜
 œT )¨VÓ ˜Ø—<—LL Ô—LÐ1˜1¨&Ð1Ð3L°VÐ3L¼T¿^¹^Ð3LÓOð ˜% ð—LL Ô—L Ó!8Ô˜% ðן *‘Ÿ *BØ$(×$5Ñ$5°b¸"¸bÀ"Ø6:·k±kÀFÑ6JØ6:·l±lÀVÑ6KØ6:·k±kó%CÑ! ˜
 œT )¨VÓ ˜˜% rL)
çš™™™™™Ù?çš™™™™™É?r9r9rrrrNN) rrrrr/rr r
rs@rKÚ_CurverçØ s9ø„ñ ðˆØ#ˆ GàLNØJNØ õ< ò|( 9òT /ö4S rLrrcó"eZdZdZˆfdZˆ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ø„á <rLrú<-cóeZdZdZdZy)úArrowStyle.CurveAz(An arrow with a head at its start point.r rrrrr:rLrKÚCurveAr"Ä
s
árLr$ú->cóeZdZdZdZy)úArrowStyle.CurveBz&An arrow with a head at its end point.r%Nr#r:rLrKÚCurveBr'É
s
árLr(ú<->cóeZdZdZdZy)úArrowStyle.CurveABz8An arrow with heads both at the start and the end point.r)Nr#r:rLrKÚCurveABr+Î
s
á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©
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.
)rNr@©rHrrJs €rKr/zArrowStyle.BracketA.__init__ç
óø€ô
‰GÑ  F°GÀFÐ Õ KrL©r9rr©rrrrr/r
rs@rKÚBracketAr;â
sø„áˆ÷ Lñ LrLrBú-[có(eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.BracketBz3An arrow with an outward square bracket at its end.rCcó*t||||¬«y©
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—Nr@©rHr—rJs €rKr/zArrowStyle.BracketB.__init__ú
r?rLr@rArs@rKÚBracketBrEõ
sø„áˆ÷ Lñ LrLrIú]-[có,eZdZdZdZ dˆfd„ ZˆxZS)úArrowStyle.BracketABz3An arrow with outward square brackets at both ends.rJcó0t|||||||¬«y)
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—Nr@)rHrr—rJs €rKr/zArrowStyle.BracketAB.__init__
s%ø€ô
‰GÑ  F°GÀFØ$*°GÀFð
õ
LrL)r9rrr9rrrArs@rKÚ BracketABrLsø„áˆð56Ø45÷ Lñ LrLrOú|-|có(eZdZdZdZdˆfd„ ZˆxZS)úArrowStyle.BarABz/An arrow with vertical bars ``|`` at both ends.rPcó0t||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@)rHrr—rJs €rKr/zArrowStyle.BarAB.__init__#s%ø€ô
‰GÑ  F°A¸fØ$*°A¸
õ
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„ ZdZˆ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.
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|Dcgc]\}}|Œ c}}|Dcgc]\}}|Œ c}}«}|dfS#t$r3t || |||
«\}}d||zzd|| zz}}||f||f|| fg}d}
YŒ9wxYwcc}}wcc}}w)NrrH©ÚwmrrrQT)rrrrrrrerrrmrS)rHrRr(r%rBrCrDrErrÚin_fÚ
arrow_pathÚ arrow_outÚarrow_inÚx1nÚy1nrÚ head_leftÚ
head_rightreÚ tail_leftÚ
tail_rightÚ
patch_pathr«rCs rKzArrowStyle.Simple.transmuteqà%)×%AÑ%AÀ$Ó%GÑ "ˆBB˜˜B ð×*¨]Ñ:ˆKÜ   R¨Ó5ˆDؘr˜( R¨ H¨r°2¨hÐ7ˆ
=¸jÈ$Ó$ ˜8ðŸ¨=Ñ8ˆJÜ$7¸Ø8BÀR¹ÈBô%PÑ !ˆIÑ!Ÿ_™_¨}Ñ<
Ü(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Ð#Ÿ{™{¨I°a©LÐ#Ÿ{™{¨I°a©LÐ#Ÿ{™{¨I°a©LÐ#Ÿ{™{¨I°a©LÐ#Ÿ{™{¨J°q©MÐ#Ÿ~™~¨z¸!©}Ð

ô $Ÿ{™{¨J°q©MÐ#Ÿ{™{¨J°q©MÐ#Ÿ{™{¨J°q©MÐ#Ÿ{™{¨I°a©LÐ#Ÿ{™{¨I°a©LÐ#Ÿ~™~¨y¸©|Ð 
ô z×2™t˜q Ó2À:×4N¹4¸1¸a²QÓ4NÓOˆDà˜ øôY
-¨R°°R¸¸I " r¡'™?¨C°2¸±7©OSØ ˜H s¨C j°2°r°(Ð;Ø “ ð

!üóT3ùÓ4NsÁIÈ" J
È6 J É8J
Ê J
)rrr©rrrrr/r
rs@rKÚSimplerb\sø„á ö"8 rLrwcó*eZdZdZdˆfd„ ZdZˆ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|Dcgc]\}}|Œ c}}|Dcgc]\}}|Œ c}}«}|d
fS#t$r3t || |||
«\}}d||zzd|| zz}}||f||f|| fg} | }YŒwxYwcc}}wcc}}w)NrrrHg333333ã?rir9r)Úw1rjÚw2r¶rrrQT)rrrrrrrerrmrS)rHrRr(r%rBrCrDrErrrlrkÚpath_outÚpath_inÚ path_headrorpÚ path_tailrÚhead_lÚhead_rrersrtÚ
tail_startrrrqrurCs rKzArrowStyle.Fancy.transmuteÀs´à%)×%AÑ%AÀ$Ó%GÑ "ˆBB˜˜B ð×*¨]Ñ:ˆKؘr˜( R¨ H¨r°2¨hÐ7ˆJô Ó5ˆ
$Ü$MØ ó%&Ñ!˜$ ô!  °rÑ)9Ó:ˆDÜ Iؘ!"Ñ ˆH ˆŸ¨=Ñ8ˆJÜØ1;¸b±Ø46ô8‰NˆF
Ÿ¨=Ñ8ˆJÜ$7¸ Ø8BÀR¹Ø;=À#È#ô%OÑ !ˆI
 R¨°b©Ó9ˆDÜ Iؘ!"Ñ ˆG  ˆJà$*¨F˜ ˆJÜŸ;™;¨
П;™;¨
°1©
П;™;¨
°1©
П;™;¨
°1©
П;™;¨
°1©
П;™;¨
°1©
П;™;¨
°1©
П;™;¨ °!© П;™;¨ °!© П;™;¨ °!© П;™;¨ °!© П;™;¨ °!© П;™;¨
П>™>¨:Ј 2™t˜q Ó2À:×4N¹4¸1¸a²QÓ4NÓOˆDà˜ øôi
-¨R°°R¸¸I " r¡'™?¨C°2¸±7©OSØ! 2˜¨c¨
°R¸°HÐ=
Ø&“ ð

'üód3ùÓ4NsÁH*Ç> I)
È I/ È*8I&É%I&)rrrrvrs@rKÚFancyry«sø„á ö"A rLr…có*eZdZdZdˆfd„ ZdZˆ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)
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 |
Dcgc]\}}|Œ c}}|
Dcgc]\}}|Œ c}}«}|dfScc}}wcc}}w)NrHrirrrQT) rÛrrer‰rrmrS)rHrRr(r%rBrCrDrErrlÚb_plusÚb_minusrurCs rKzArrowStyle.Wedge.transmutesà%)×%AÑ%AÀ$Ó%GÑ "ˆBB˜˜B à˜r˜(  H¨r°2¨hÐ7ˆ1Ø$.Ø$(§O¡O°mÑ$CÀbÑ$HØ'+×'9Ñ'9ô;‰OˆF
 Ÿ;™;¨¨q© П;™;¨¨q© П;™;¨¨q© П;™;¨°©
П;™;¨°©
П;™;¨°©
П>™>¨7°1©:Ð
ˆJô z×2™t˜q Ó2À:×4N¹4¸1¸a²QÓ4NÓOˆDà˜ ùó3ùÓ4Ns Ã' D
Ã; D )rrrvrs@rKr‡sø„ñ õ ö rLN)rrrrrrrrr$r(r,r0r4r8rBrIrOrTrZr`rwr…r:rLrK_ sañ,ð\€K÷EFñEFôNa ôa ñF[ <ó[ óóñ[ tÔóóñ[ óñ[ uÔóñ[ uÔóñ[ wÔ˜óóñ[ tÔLLóLñ$[ LLóLñ$[ LLóLñ*[ FóFóFñ"[ LLóLñ*[ LLóLñ*LóLóLñ\UóUóUñn)ó)ó)rLcóÚeZdZdZdZdZejddddœˆfd «Zejdd«Z dZ
d „Z d
Z d Z
d Zd
ZdZdZdZdZdZdZdZdZdZdZˆ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—GG˜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>ÚboxstylerrrIrJs €rKr/zFancyBboxPatch.__init__@sWø€ôV ÑÑ"˜ÑˆŒØˆŒ ؈Œ Ø ×ј(ÔÔØ /ˆÔ؈
rLc ó„|tj«St|t«r t|fi|¤Žn||_d|_y)
Set the box style, possibly with further attributes.