+
     ]i'  c                   sl    R t ^RIHtHtHt ^ RIHtHtHt ^ RI	H
t
 Rt ! R R]P                  4      tR# )z
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)Pathc                   s   a a ] tR t^t oRtRtRV 3R lltR tR tR t	R t
R tR	 tR
 tR t]R 4       t]R 4       tR t]P(                  ! RRR7      R 4       tRtVtV ;t# )InsetIndicatorz
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           	     sx  < Vf   Vf   \        R4      hW n        Vf   RV n        V P                  4       pMRV n        Vw  rVrx\	        WV3Wx3RR/VB V n        . V n        \        S
V `!  4        V P                  V4       \         F2  p	\        V RV	 2\        P                  ! V P
                  V	4      4       K4  	  R# )a  
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 suppliedTFZclip_on_)Z
ValueError	_inset_ax_auto_update_bounds_bounds_from_inset_axr   
_rectangle_connectorsZsuper__init__Z
set_zorder_shared_propertiessetattrr   getp)selfZboundsZinset_axzorderZkwargsxywidthheightprop	__class__s   &&&&,     7/usr/lib64/python3.14/site-packages/matplotlib/inset.pyr   ZInsetIndicator.__init__   s    * >h.RSS!>'+D$//1F',D$$e#QFES5SFS  'DDAdV*fkk$//4&HI '    c                s    \        V RV 2V4       \        P                  ! V P                  .V P                  OW4       R# )zP
Helper function to set the same style property on the artist and its children.
r   N)r   r   Zsetpr   r   )r   r   Zvals   &&&r   _shared_setterZInsetIndicator._shared_setterJ   s6     	$j#&T__8t'7'78$Dr   c                s*    V P                  R V4       R# )alphaNr   )r   r      &&r   	set_alphaZInsetIndicator.set_alphaR   s    GU+r   c                *    V P                  RV4       R# )zq
Set the edge color of the rectangle and the connectors.

Parameters
----------
color : :mpltype:`color` or None
	edgecolorNr   )r   Zcolorr   r   set_edgecolorZInsetIndicator.set_edgecolorV   s     	K/r   c                sN    V P                  RV4       V P                  RV4       R# )z
Set the edgecolor of the rectangle and the connectors, and the
facecolor for the rectangle.

Parameters
----------
c : :mpltype:`color`
r"   Z	facecolorNr   )r   Zcr   r   	set_colorZInsetIndicator.set_color`   s$     	K+K+r   c                r!   )zk
Set the linewidth in points of the rectangle and the connectors.

Parameters
----------
w : float or None
	linewidthNr   )r   Zwr   r   set_linewidthZInsetIndicator.set_linewidthl   s     	K+r   c                r!   )aS  
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.
	linestyleNr   )r   Zlsr   r   set_linestyleZInsetIndicator.set_linestylev   s    2 	K,r   c                s    V P                   P                  4       pV P                   P                  4       pV^ ,          V^ ,          V^,          V^ ,          ,
          V^,          V^ ,          ,
          3# )    )r	   Zget_xlimZget_ylim)r   ZxlimZylims   &  r   r   Z$InsetIndicator._bounds_from_inset_ax   sW    ~~&&(~~&&(Qa$q'DG"3T!WtAw5FGGr   c                s   V P                   P                  4       w  rV P                   P                  4       pV P                   P                  4       pV P                  ;'       g    R .^,          p\        . ROV4       EFX  w  rgVw  rV P                  P                  P                  4       '       d
   ^V,
          pV P                  P                  P                  4       '       d
   ^V	,
          p	WV,          ,           W)V,          ,           3p
Vf   \        W`P                  P                  WP                  P                  RV P                  V P                  4       V P                   V P"                  R7	      pV P                  P%                  V4       EK  Wgn        Wn        V P                  P                  Vn        V P                  P                  Vn        EK[  	  XEf   V P                  P/                  4       pVP1                  V P3                  RR7      P4                  4      p\6        P8                  P;                  WW44      P1                  V P                   P=                  4       4      pVP>                  VP>                  8  pVP@                  VP@                  8  pVPB                  VPB                  8  pVPD                  VPD                  8  pV P                  ^ ,          PG                  VV,          4       V P                  ^,          PG                  VV8H  4       V P                  ^,          PG                  VV8H  4       V P                  ^,          PG                  VV,          4       R # R # )NZ-)	ZxyAZcoordsAZxyBZcoordsBZ
arrowstyler"   r   r'   r%   F)Zroot))r)   r)   )r)      )r*   r)   )r*   r*   )$r   Zget_xyZ	get_widthZ
get_heightr   ZzipZaxesZxaxisZget_invertedZyaxisr   r	   Z	transAxesZ	transDataZ
_edgecolorZ	get_alphaZ
_linestyleZ
_linewidthappendZxy1Zxy2Zcoords1Zcoords2Zget_positionZtransformedZ
get_figureZtransSubfigurer   ZBboxZfrom_boundsget_transformx0x1y0y1Zset_visible)r   r   r   r   r   Zexisting_connectorsZxy_inset_axZexistingZexZeyZxy_datapZposZbboxinsZrectbboxr-   r.   r/   r0   s   &                  r   _update_connectorsZ!InsetIndicator._update_connectors   s   '')))+++-"..<<4&1* &))I)<&>!K
 !FByy++--Vyy++--Vu*nav+o5G $#^^-E-E)<)<""ooT^^5E"ooJ   ''*  +&#'>>#;#; #'99#6#6 7&>: ..--/Coodoo5o&A&P&PQG!221GSS--/1Hwzz)Bwzz)Bwzz)Bwzz)BQ++BG4Q++B"H5Q++B"H5Q++BG4 r   c                s    V P                   # )z"`.Rectangle`: the indicator frame.)r   r      &r   	rectangleZInsetIndicator.rectangle   s     r   c                s    V P                   f   R# V P                  '       d*   V P                  P                  V P	                  4       4       V P                  4        \        V P                  4      # )a9  
4-tuple of `.patches.ConnectionPatch` or None
    The four connector lines connecting to (lower_left, upper_left,
    lower_right upper_right) corners of *inset_ax*. Two lines are
    set with visibility to *False*,  but the user can set the
    visibility to True if the automatic choice is not deemed correct.
N)r	   r
   r   Z
set_boundsr   r2   Ztupler   r3   r4   r   
connectorsZInsetIndicator.connectors   sU     >>!###OO&&t'A'A'CD!T%%&&r   c                s6   . pV P                   ;'       g    .  F  pVP                  4       '       g   K  R p\         FR  p\        P                  ! V P
                  V4      \        P                  ! W54      8w  g   K?  VP                  V4       Rp M	  V'       d   K  VP                  V4       K  	  V'       d   V P
                  .V,           pV Uu. uF/  qwP                  4       P                  VP                  4       4      NK1  	  pp\        P                  ! V!  p	\        V	4      p
V
P                  V P
                  4       V
P                  \         P"                  ! 4       4       V
P                  V4       R# V P
                  P                  V4       R# u upi )FTN)r6   Zget_visibler   r   r   r   drawr+   r,   Ztransform_pathZget_pathr   Zmake_compound_pathr   Zupdate_fromZset_transformr   ZIdentityTransform)r   ZrendererZconn_same_styleZconnZdrawnZsZartistsZaZpathsZpathr1   s   &&         r   r7   ZInsetIndicator.draw   s4    OO))r)D!!+A{{4??A6&++d:NN		(+ $ , u#**40 *  '/9GMTUW__&55ajjlCWEU**E2D $AMM$//*OOJ88:;FF8 	X& Vs   5Fz3.10zSince Matplotlib 3.10 indicate_inset_[zoom] returns a single InsetIndicator artist with a rectangle property and a connectors property.  From 3.12 it will no longer be possible to unpack the return value into two elements.)Zmessagec                s@    V P                   V P                  .V,          # )N)r   r6   )r   Zkeyr   r   __getitem__ZInsetIndicator.__getitem__  s     1#66r   )r
   r   r	   r   )NNN)Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r   r   r   r    r#   r$   r&   r(   r   r2   Zpropertyr5   r6   r7   r    Z
deprecatedr8   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   r   r      s      F.J`E,0
,,-6H
25h   ' ' $'L 
__35757 7r   r   N)r   r"   r'   r%   )r9   Z r    r   r   Zmatplotlib.patchesr   r   r   Zmatplotlib.pathr   r   ZArtistr   ) r   r   <module>r:      s6   
 ' & D D   F 7V]] 7r   