+
     ]iA  c                   s   ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIt^ RIH	t	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHtHtHtHtHtHtHtHtH t H!t!H"t" ]
! R.RR	7      R
 4       t#R t$R t%R t&]PN                  PQ                  R^.. R5OR.RR.34      ]PN                  PQ                  RR64      ]PN                  PQ                  RR74      ]PN                  PQ                  RR84      R 4       4       4       4       t)]! RR4      t*]PN                  PQ                  R]*! . R9OR^^. R:O3R7      ]*! . R9O^
^^
. R:O3R7      ]*! . R9O^^^. R:O3R7      .4      R 4       t+]PN                  PQ                  R]*! . R;ORR^. R<O3R7      ]*! . R9O^
^^
. R=O3R7      ]*! . R9O^^^. R>O3R7      .4      R 4       t,]PN                  PQ                  R]*! . R?O^R^. R@O3R7      ]*! . RAO^R^. RBO3R7      ]*! . RCOR^^. R@O3R7      .4      R 4       t-R t.]PN                  PQ                  R. RDO4      ]PN                  PQ                  R. REO4      R 4       4       t/]
! R.RR R!7      R" 4       t0]PN                  PQ                  R#R$R%.4      R& 4       t1R' t2R( t3]PN                  PQ                  R). RFO4      R* 4       t4R+ t5R, t6R- t7]	! R..R/7      R0 4       t8]
! R1.RR R!7      R2 4       t9R3 t:R4 t;R# )G    )
namedtupleN)assert_allclose)check_figures_equalimage_comparison)MouseButton
MouseEvent)AnchoredOffsetboxAnnotationBboxAnchoredTextDrawingAreaHPacker	OffsetBoxOffsetImage	PaddedBoxTextAreaVPacker_get_packed_offsetsZoffsetbox_clippingT)remove_textc            
      s   \         P                  ! 4       w  r^dp\        W"RR7      pVP                  '       g   Q h\        P
                  ! RW"RR^ R7      p\        P                  ! V) R,          VR,          .V^,          V^,          .R^
R	7      p\        R
VRRRVP                  RR7      pVP                  V4       VP                  V4       VP                  V4       VP                  R4       VP                  R4       R# )d   TZclip#CCCCCCNone	facecolorZ	edgecolor	linewidth      ?      ?blackZcolorr   center        FlocchildpadZframeonZbbox_to_anchorZbbox_transformZ	borderpadNr    r    r   r   )r       )pltsubplotsr
   clip_childrenmpatches	RectanglemlinesLine2Dr   	transAxes
add_artistset_xlimset_ylimfigaxZsizedaZbgZlineanchored_box          F/usr/lib64/python3.14/site-packages/matplotlib/tests/test_offsetbox.pytest_offsetbox_clippingr9      s     llnGCD	Td	+B			FD&/&,&'
)B ==4%(DH-QQ/?&#%'D %||L MM"MM$MM,KKKK    c            
      s.   \         P                  ! 4       w  r^dp\        W"RR7      p\        P                  ! RW"RR^ R7      p\
        P                  ! V) R,          VR,          .V^,          V^,          .R^
R	7      p\        R
VRRRVP                  RR7      pVP                  V4       VP                  V4       VP                  V4       V P                  P                  4        V P                  '       d   Q hRVn        V P                  '       g   Q hR# )r   Tr   r   r   r   r   r   r   r   r   r   Fr    Nr$   r%   )r'   r(   r
   r*   r+   r,   r-   r   r.   r/   canvasdrawZstaler)   r2   r7   r8   test_offsetbox_clip_childrenr=   7   s     llnGCD	Td	+B			FD&/&,&'
)B ==4%(DH-QQ/?&#%'D %||L MM"MM$MM,JJOOyyy=B9999r:   c                  s    R ^R^R^R^R^R^R^R^R^	R	^
/
p \         P                  ! 4       w  r\        ^d^d4      pV  F   p\        WCR
7      pVP	                  V4       K"  	  VP
                  P                  4        R# )upper right
upper leftz
lower leftlower rightrightcenter leftcenter rightzlower centerzupper centerr   )r!   r"   N)r'   r(   r
   r   r/   r;   r<   )Zcodesr3   r4   r5   Zcoder6   s         r8   test_offsetbox_loc_codesrD   \   s    A11AaAQQQr
E llnGC	S#	B(T<
l#  JJOOr:   c                  s    \         P                  ! 4       w  r^^.p^^.pVP                  VRR7       VP                  VRR7       VP                  ^RR7       V P	                  4        R# )r&   zseries 1)Zlabelzseries 2expand)ZncolsmodeN)r'   r(   ZplotZlegendtight_layout)r3   r4   Zd1Zd2       r8   test_expand_with_tight_layoutrI   q   s]    llnGC
QB
QBGGBjG!GGBjG!IIAHI%r:   widths皙?totalseprF   c                 s     \        WW#R 7       R# )rF   N)r   )rJ   rL   rM   rF   s   &&&&r8   test_get_packed_offsetsrO   ~   s     s6r:   _Paramszwd_list, total, sep, expectedzwidths, total, sep, expected)rL   rM   expectedc                     \        WVR R7      pV^ ,          V^ ,          8X  g   Q h\        V^,          V^,          4       R# )fixedrN   Nr   r   rJ   rL   rM   rQ   Zresult   &&&& r8   test_get_packed_offsets_fixedrW      s:     !'BF!9###F1Ix{+r:   c                 rR   )rE   rN   NrT   rU   rV   r8   test_get_packed_offsets_expandrX      s:     !(CF!9###F1Ix{+r:   c                 rR   )equalrN   NrT   rU   rV   r8   test_get_packed_offsets_equalrZ      s:     !'BF!9###F1Ix{+r:   c            	      s    \         P                  ! \        4      ;_uu_ 4        \        . RORRRR7       RRR4       R#   + '       g   i     R# ; i)r&   NrY   )rL   rM   rF   )r&   r&   r&   )pytestZraisesZ
ValueErrorr    r:   r8   1test_get_packed_offsets_equal_total_none_sep_noner]      s.    	z	"	"ITt'J 
#	"	"	"s	   ?A	
child_type	boxcoordsc           	      s  a	 V R 8X  d7   \        ^^4      pVP                  \        P                  ! R^^^ R7      4       MOV R8X  d(   \        P
                  ! R4      p^ VR&   \        V4      pM!V R8X  d   \        RR^/R7      pM
Q RT  24       h\        P                  ! 4       w  rE\        VRVR	7      pVP                  R
4       VP                  V4       . o	VP                  P                  RV	3R l4       VR8X  da   VP                  P                  R4      w  rxVRVP                   ,          ^H,          ,          pVRVP                   ,          ^H,          ,          pMTVR8X  d1   VP                  P                  R4      w  rxVR,          pVR,          pMVP                  P                  R4      w  rxVP                  P#                  4        S	P%                  4        \'        RVP                  Wx\(        P*                  4      P-                  4        \/        S	4      ^8X  d   S	^ ,          P0                  V8X  g   Q hVP3                  R^ 4       VP5                  R^ 4       VP                  P#                  4        S	P%                  4        \'        RVP                  Wx\(        P*                  4      P-                  4        \/        S	4      ^ 8X  g   Q hR# )r<   )r   imagetextu   ■Zfontsize)Z	textpropszUnknown picking child type r   )r_   TZ
pick_eventc                 s&   < SP                  V 4      # )N)Zappend)Zeventcallss   &r8   Z<lambda>Ztest_picking.<locals>.<lambda>   s    u||E7Jr:   axes pointsaxes pixelsbutton_press_eventNr$   )   rf   )   rg   r%   )r
   r/   r*   r+   npZonesr   r   r'   r(   r   Z
set_pickerr;   Zmpl_connectr.   Ztransform_pointdpir<   Zclearr   r   ZLEFT_processZlenZartistr0   r1   )
r^   r_   Zpicking_childimr3   r4   abZxZyrb   s
   &&       @r8   test_pickingrn      s-    V#Aq)  !3!3FAqA!NO	w	WWV_4#B	v	 !3
AO@3J<@@ullnGC	zY	GBMM$MM"EJJ<)JK M!||++F3	S377]R	S377]R	m	#||++F3	S	S||++J7JJOO	KKMcjj!0@0@BBJ(*u:?uQx"444 KKAKKAJJOO	KKMcjj!0@0@BBJ(*u:??r:   zanchoredtext_align.pngZmpl20)r   Zstylec                  s    \         P                  ! 4       w  r\        R RRRR/R7      pVP                  V4       \        R RRRR/R7      pVP                  V4       \        R RRRR/R7      pVP                  V4       R	# )
ztest
test long textrB   皙?haleft)r!   r#   Zpropr   rC   rA   N)r'   r(   r	   r/   )r3   r4   text0text1Ztext2        r8   &test_anchoredtext_horizontal_alignmentru      s|    llnGC/] f~7EMM%/X h'79EMM%/^ g8EMM%r:   extent_kindZwindow_extentZ	tightbboxc                 s   \         P                  P                  \         P                  4       \         P                  ! R^dR7      w  rVP                  . RO4       VP                  RRR\        RR7      RRRR7      p\        ^^^ ^ R	R
7      p\        P                  ! R^ 4      pVP                  V4       \        VRR.RRRR\        RR7      R7      pVP                  V4       \        \        P                  P!                  ^
^
4      ^R7      pW'P"                  n        \        VRR RRR\        RR7      R7      pVP                  V4       \'        VRV  24      ! 4       p	. R!Op
\)        V	P*                  V
^R7       \'        VRV  24      ! 4       p. R"Op\)        VP*                  V^R7       \'        VRV  24      ! 4       p. R#Op\)        VP*                  V^R7       \,        P.                  ! 4       pVP1                  VRR7       VP3                  ^ 4       \         P4                  ! V4      P6                  pR$p\)        VV^R7       VP8                  P;                  4        VP=                  4        VP8                  P;                  4        R# )%   )Zfigsizerj   Z
Annotation->)
arrowstyleFbaselinerq   )ZxyZxytext
arrowpropsZclip_onZvarp   Tr   r   dataaxes fractionxyboxxycoordsr_   Zbox_alignmentr{   )Zzoom333333?zoffset points)r   r   r_   r#   r{   Zget_)ZatolZtight)Zbbox_inchesN)rw      )r    r&   r    r&   )?r   )皙?r   )ii   皙ɿr   r   r   )r   g333333ӿ)r    iK   )gffffft@gYn@g     0}@gfffffr@)g1g      `@gfffffi@gd@)g     f@g      @g     l@g9W@)i^  i  rw   )r'   ZrcParamsZupdateZrcParamsDefaultr(   ZaxisannotateZdictr
   r*   ZCircler/   r   r   ri   ZrandomZrandr`   ZaxesZgetattrr   ZextentsioZBytesIOZsavefigZseekZimreadshaper;   r<   rG   )rv   r3   r4   Zan1r5   ZpZab3rl   Zab6Zbb1Ztarget1Zbb3Ztarget3Zbb6Ztarget6Zbufr   Ztargetshapes   &                 r8   test_annotationbbox_extentsr     s   LL++,ll6s3GCGGL
++lx
!%!6#  0C 
RQ	-B	2&AMM!
b"X[6#2($(D$9;C MM#	RYY^^B+!	4BHHM
Zw"1#2$(D$9;C MM# #k]+
,
.C*GCKKq1 #k]+
,
.C*GCKKq1
#k]+
,
.C)GCKKq1 **,CKKK)HHQKJJsO!!EKE;Q/ JJOOJJOOr:   c                  s@    \        ^*R7      P                  ^*8X  g   Q hR# )i*   )zorderN)r   r   r\   r:   r8   test_zorderr   ?  s    B&&",,,r:   c            
      s    \        ^^^ ^ RR7      p RRRR/p\        V RR.RRRRVR	7      pVP                  VJg   Q hVR,          R8X  g   Q hR
# )   Tr   ry   rx   Zrelposr   r|   r}   r~   N)r   gffffff?r   r   )r
   r   r{   )r5   r{   rm         r8   test_arrowprops_copiedr   C  sg    	RQ	-Bh9J	RHK&"1#-
/B =="""h8+++r:   alignc           
      s^   \         P                  ! ^HR7      pVP                  P                  4       p^
^rC^^<re\	        W44      p\	        WV4      p\        Wx.V R7      p	V	P                  V4       V	P                  V4      p
V	P                  W4      w  r\        V
P                  ^ ^ W5,           \        WF4      34       V R9   d   ^ pM&V R9   d
   Wd,
          pMV R8X  d   Wd,
          ^,          p\        V	P                  4        Uu. uF  qP                  4       NK  	  upWX,           3W,           V3.4       \        Wx.V R7      pVP                  V4       VP                  V4      p
VP                  W4      w  r\        V
P                  ^ \        WF4      ) \        W54      WF,           34       V R9   d   ^ pM&V R9   d
   WS,
          pMV R8X  d   WS,
          ^,          p\        VP                  4        Uu. uF  qP                  4       NK  	  upVX,           V3WV,
          3.4       R# u upi u upi )iH   )rj   )Zchildrenr   r   N)rz   rq   bottom)rA   top)r'   figurer;   Zget_rendererr
   r   r<   Zget_bboxZ
get_offsetr   ZboundsZmaxZget_childrenr   )r   r3   Zrendererx1y1Zx2Zy2Zr1Zr2ZhpackerbboxZpxZpyZy_heightr"   ZvpackerZx_heights   &                r8   test_packersr   M  s    **
Czz&&(H	R	B	R	B xu5GLLH%D/FBDKK!QR!=>..	"	"7	(	Gq=W5I5I5KL5KE%%'5KLx-(27B-8: xu5GLLH%D/FBDKK!c"k\3r;!HI..	"	"7	(	Gq=W5I5I5KL5KE%%'5KL8mR(2Bw-8:% M$ Ms   H%0H*c                  s    \         P                  ! 4       w  r\        R R4      p\        VRR/RR7      pVP	                  V4       V P                  4        R# )foor?   r   rT)patch_attrs
draw_frameN)r'   r(   r	   r   r/   Zdraw_without_rendering)r3   r4   ZatpbrH   r8   test_paddedbox_default_valuesr   ~  sF    llnGC	el	+B	2K#5$	GBMM" r:   c            
      s   \        \        ^^^ ^ RR7      RRR7      p V P                  R8X  g   Q hV P                  R8X  g   Q h\        \        ^^^ ^ RR7      RR	RRR7      p V P                  R	8X  g   Q hV P                  R8X  g   Q hR# )
r   Tr   r|   )r   r}   )r   r   r_   Nr%   )r   g?)r   r
   ZxyannZ	anncoords)rm       r8   test_annotationbbox_propertiesr     s    	BAqt<j!'
)B88z!!!<<6!!!	BAqt<j)F"1
3B 88{"""<<?***r:   c                  s   \        R 4      p V P                  4       R 8X  g   Q hV P                  4       '       d   Q hV P                  R4       V P	                  R4       V P                  4       R8X  g   Q hV P                  4       '       g   Q hR# )FooBarTN)r   Zget_textZget_multilinebaselineset_textZset_multilinebaseline)tar   r8   test_textarea_propertiesr     sw    	%B;;=E!!!''))))KKT";;=E!!!##%%%%r:   Zpng)Z
extensionsc                 s    VP                  4       p\        R R4      pVP                  V4       V P                  4       p\        RR4      pVP                  V4       VP                  P	                  R 4       R# )r   r?   r   N)Zadd_subplotr	   r/   Ztxtr   )Zfig_testZfig_refZax_refrr   Zax_testrs   s   &&    r8   test_textarea_set_textr     sd      "F-E
e""$G-Eu	IIur:   zpaddedbox.pngc                  s   \         P                  ! 4       w  r\        R 4      p\        V^RR/RR7      p\	        RVR7      pVP                  V4       \        R4      p\        V^
RR/R	7      p\	        R
VR7      pVP                  V4       \        R4      p\        V^RR7      p\	        RVR7      pVP                  V4       R# )r   r   r   T)r#   r   r   r?   )r"   ZbarZb)r#   r   r>   Zfoobar)r#   r   r@   N)r'   r(   r   r   r   r/   )r3   r4   r   r   rm   rt   r8   test_paddedboxr     s    llnGC	%B	21;*<	NB	<r	2BMM"	%B	22K+=	>B	=	3BMM"	(	B	22$	/B	=	3BMM"r:   c                  s    \         P                  ! 4       w  rVP                  R R4      pVP                  R4       VP	                  4        \        RV P                  ^^4      P                  4        R# )r   Tbutton_release_eventNr%   )r'   r(   r   	draggableZremover   r;   rk   )r3   r4   Zanr   r8   test_remove_draggabler     sP    llnGC	UH	%BLLIIK%szz1a8AACr:   c                  sl   \         P                  ! 4       p V P                  4       P                  . RO4      P	                  RR4      pVP                  R4       V P                  P                  4        \        RV P                  ^^4      P                  4        VP                  P                  '       g   Q h\        RV P                  ^^4      P                  4        VP                  P                  '       d   Q h\        RV P                  ^^4      P                  4        VP                  P                  '       d   Q hVP                  4       p\        RV P                  VP                  ^,           VP                  ^,           4      P                  4        VP                  P                  '       d   Q hR# )	r    r   Tre   r   Zscroll_eventN)r    r    r&   r&   r$   )r'   r   Z
subfiguresZadd_axesr   r   r;   r<   r   rk   Z
_draggableZ
got_artistZget_window_extentr   r   )r3   Zannr   r   r8   test_draggable_in_subfigurer     s3   
**,C
..

#
#L
1
:
:5&
ICMM$JJOO#SZZA6??A>>$$$$$%szz1a8AAC~~(((((~szz1a099;~~(((((  "D#SZZDGGAIFOOQ~~((((((r:   )   r   r   )   r   r    rh   N)r   r&   r    rh   )rE   rS   rY   )r   r&   rg   )r    rw   i   )rK   rK   rK   )r    g?r   )r    rf   i   )r    g      @r   )r   rg   r&   )r    rg   rw   )r   rg   r&   r   )r    r   r&   r   )r   r&   ro   )r<   r`   ra   )r}   rd   rc   r|   )rz   r   r   rq   rA   r   )<Zcollectionsr   r   Znumpyri   Znumpy.testingr   r[   Zmatplotlib.testing.decoratorsr   r   Zmatplotlib.pyplotZpyplotr'   Zmatplotlib.patchesZpatchesr*   Zmatplotlib.linesZlinesr,   Zmatplotlib.backend_basesr   r   Zmatplotlib.offsetboxr   r   r	   r
   r   r   r   r   r   r   r   r9   r=   rD   rI   ZmarkZparametrizerO   rP   rW   rX   rZ   r]   rn   ru   r   r   r   r   r   r   r   r   r   r   r   r\   r:   r8   <module>r      sl   " 	  )  O  % ! <O O O O
 '(d;  < F"J*
 %3%#sDF"9:0!=>7 ? 1 ;F
7 Y ?
@ 719~?b)_>Q	N<: ,, 7Dda5FHb)_>Q,<>: ,, 79~?QDA7G3HJ4Q!YA: ,,K
 '@A"#/# B/d +,$gN O +(FG7 H7t-,  #> ?,:?,:^!
+& ( ) ?#WE F&D)r:   