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

125 lines
12 KiB
Plaintext
Raw Normal View History

Ë
†Rjª'ãójdZddlmZmZmZddlmZmZmZddl m
Z
dZ Gddej«Z
y )
The inset module defines the InsetIndicator class, which draws the rectangle and
connectors required for `.Axes.indicate_inset` and `.Axes.indicate_inset_zoom`.
é)Ú_apiÚartistÚ
transformsé)ÚConnectionPatchÚ PathPatchÚ Rectangle)ÚPath)ÚalphaÚ edgecolorÚ linestyleÚ linewidthcó²eZdZdZdZdˆfd„ ZdZdZdZdZ dZ
d „Z d
Z d Z
ed «Zed
«ZdZej&dd¬«d«ZˆxZS)ÚInsetIndicatora
An artist to highlight an area of interest.
An inset indicator is a rectangle on the plot at the position indicated by
*bounds* that optionally has lines that connect the rectangle to an inset
Axes (`.Axes.inset_axes`).
.. versionadded:: 3.10
gö(\Âõ@c ón|
| td«||_|d|_|j«}nd|_|\}}}}t ||f||fddi|¤Ž|_g|_t
|!«|j|«tD]0} t|d| tj|j
| ««Œ2y)aN
Parameters
----------
bounds : [x0, y0, width, height], optional
Lower-left corner of rectangle to be marked, and its width
and height. If not set, the bounds will be calculated from the
data limits of inset_ax, which must be supplied.
inset_ax : `~.axes.Axes`, optional
An optional inset Axes to draw connecting lines to. Two lines are
drawn connecting the indicator box to the inset Axes on corners
chosen so as to not overlap with the indicator box.
zorder : float, default: 4.99
Drawing order of the rectangle and connector lines. The default,
4.99, is just below the default level of inset Axes.
**kwargs
Other keyword arguments are passed on to the `.Rectangle` patch.
Nz3At least one of bounds or inset_ax must be suppliedTFÚclip_onÚ_)Ú
ValueErrorÚ _inset_axÚ_auto_update_boundsÚ_bounds_from_inset_axr Ú
_rectangleÚ _connectorsÚsuperÚ__init__Ú
set_zorderÚ_shared_propertiesÚsetattrrÚgetp) ÚselfÚboundsÚinset_axÚzorderÚkwargsÚwidthÚheightÚpropÚ __class__s €úS/home/antigravity/intellecton/venv/lib/python3.12/site-packages/matplotlib/inset.pyrzInsetIndicator.__init__ø€ð* ˆ>˜hÐÐ !ˆŒà ˆ>à'+ˆ ×1‰Fà',ˆ ˆˆ1ˆe# Q¨ F¨E°6ÑSÀ5ÐSÈFÑŒðˆÔä
ÑÔØ ˜Ôô Jˆ D˜A˜d˜V˜*¤f§k¡k°$·/±/À4Ó&HÕ  Jócó€t|d||«tj|jg|j¢||«y)z`
Helper function to set the same style property on the artist and its children.
rN)rrÚsetprr)r r)Úvals r+Ú_shared_setterzInsetIndicator._shared_setterJs8ô ˜˜$˜j  T—_8 t×'7Ñ'7Ð8¸ÕDr,có(|jd|«y)Nr ©r0)r r s r+Ú set_alphazInsetIndicator.set_alphaRsà ×јG +r,có(|jd|«y)z™
Set the edge color of the rectangle and the connectors.
Parameters
----------
color : :mpltype:`color` or None
r Nr2)r Úcolors r+Ú
set_edgecolorzInsetIndicator.set_edgecolorVsð
×јK¨Õ/r,cóL|jd|«|jd|«y)
Set the edgecolor of the rectangle and the connectors, and the
facecolor for the rectangle.
Parameters
----------
c : :mpltype:`color`
r Ú facecolorNr2)r Úcs r+Ú set_colorzInsetIndicator.set_color`s$ð
×јK¨Ô ×јK¨Õ+r,có(|jd|«y)z“
Set the linewidth in points of the rectangle and the connectors.
Parameters
----------
w : float or None
rNr2)r Úws r+Ú
set_linewidthzInsetIndicator.set_linewidthlsð
×јK¨Õ+r,có(|jd|«y)
Set the linestyle of the rectangle and the connectors.
========================================== =================
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.
r
Nr2)r Úlss r+Ú
set_linestylezInsetIndicator.set_linestylevsð2
×јK¨Õ,r,có¦|jj«}|jj«}|d|d|d|dz
|d|dz
fS)Nrr)rÚget_xlimÚget_ylim)r ÚxlimÚylims r+rz$InsetIndicator._bounds_from_inset_axsWØ~‰~×(ˆØ~‰~×(ˆØQ˜˜a™ $ q¡'¨D°©GÑ"3°T¸!±W¸tÀA¹wÑ5FÐGr,c óT|jj«\}}|jj«}|jj«}|jxsdgdz}t gd¢|«D]7\}}|\}} |j jj«rd|z
}|j jj«rd| z
} |||zz|| |zzf}
|€„t||jj|
|j jd|j|j«|j |j"¬« } |jj%| «Œô||_|
|_|jj|_|j j|_Œ:€w|jj/«} | j1|j3d¬«j4«}
t6j8j;||||«j1|jj=««}|j>|
j>k}|j@|
j@k}|jB|
jBk}|jD|
jDk}|jdjG||z «|jdjG||k(«|jd jG||k(«|jd
jG||z «yy) ))rr)rr)rr)rrrú-) ÚxyAÚcoordsAÚxyBÚcoordsBÚ
arrowstyler r r
rF)Úrootréé)$rÚget_xyÚ get_widthÚ
get_heightrÚzipÚaxesÚxaxisÚ get_invertedÚyaxisrrÚ transAxesÚ transDataÚ
_edgecolorÚ get_alphaÚ
_linestyleÚ
_linewidthÚappendÚxy1Úxy2Úcoords1Úcoords2Ú get_positionÚ transformedÚ
get_figureÚtransSubfigurerÚBboxÚ from_boundsÚ
get_transformÚx0Úx1Úy0Úy1Ú set_visible)r r%r&r'r(Úexisting_connectorsÚ xy_inset_axÚexistingÚexÚeyÚxy_dataÚposÚbboxinsÚrectbboxrkrlrmrns r+Ú_update_connectorsz!InsetIndicator._update_connectorssØ×)‰ˆˆ×Ø×-ˆà"×<°4°&¸1±*Ðô&)Ò)IØ)<ó&>ó !ˆK˜ð
!‰FˆBØy‰yט‘VØy‰yט‘Vؘ"˜u™*n a¨"¨v©+¡oÐ5ˆÐô#¨T¯^©^×-EÑ-Eب¯©×)<Ñ)<Ø"Ÿo™o°T·^±^Ó5EØ"Ÿo™o¸¿¹ô Jð × Ñ ×Õ + Ø& Ø#'§>¡>×#;Ñ#;Ô Ø#'§9¡9×#6Ñ#6Ö ð7 7ð: Ñ à—.‘.×/ˆCØ—oo d§o¡o¸5 oÓ&A×&PÑ&PÓQˆ!—×2°1°a¸ÀÓ×1ˆHà˜wŸz™zÑ)ˆBؘwŸz™zÑ)ˆBؘwŸz™zÑ)ˆBؘwŸz™zÑ)ˆBØ × Ñ ˜QÑ × +¨B°©GÔ × Ñ ˜QÑ × +¨B°"©HÔ × Ñ ˜ × +¨B°"©HÔ × Ñ ˜QÑ × +¨B°©GÕ  r,có|jS)z"`.Rectangle`: the indicator frame.)r©r s r+Ú rectanglezInsetIndicator.rectangleÊsðÐr,cóÐ|jy|jr)|jj|j ««|j «t
|j«S)ai
4-tuple of `.patches.ConnectionPatch` or None
The four connector lines connecting to (lower_left, upper_left,