+
    iA                        ^ 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_offsetsoffsetbox_clippingT)remove_textc            
         \         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clip#CCCCCCNone	facecolor	edgecolor	linewidth      ?      ?blackcolorr   center        Flocchildpadframeonbbox_to_anchorbbox_transform	borderpadNr   r   r    r    )r      )pltsubplotsr   clip_childrenmpatches	RectanglemlinesLine2Dr	   	transAxes
add_artistset_xlimset_ylimfigaxsizedabglineanchored_boxs          /Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/tests/test_offsetbox.pytest_offsetbox_clippingrF      s     llnGCD	Td	+B			FD&/&,&'
)B ==4%(DH-QQ/?&#%'D %||L MM"MM$MM,KKKK    c            
      .   \         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/   r0   )r2   r3   r   r5   r6   r7   r8   r	   r9   r:   canvasdrawstaler4   r=   s          rE   test_offsetbox_clip_childrenrL   7   s     llnGCD	Td	+B			FD&/&,&'
)B ==4%(DH-QQ/?&#%'D %||L MM"MM$MM,JJOOyyy=B9999rG   c                      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)r2   r3   r   r	   r:   rI   rJ   )codesr>   r?   rA   coderD   s         rE   test_offsetbox_loc_codesrV   \   s    A11AaAQQQr
E llnGC	S#	B(T<
l#  JJOOrG   c                      \         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# )r1   zseries 1)labelzseries 2expand)ncolsmodeN)r2   r3   plotlegendtight_layout)r>   r?   d1d2s       rE   test_expand_with_tight_layoutra   q   s]    llnGC
QB
QBGGBjG!GGBjG!IIAHI%rG   widths皙?totalsepr[   c                      \        WW#R 7       R# )r[   N)r   )rb   rd   re   r[   s   &&&&rE   test_get_packed_offsetsrh   ~   s     s6rG   _Paramszwd_list, total, sep, expectedzwidths, total, sep, expected)rd   re   expectedc                     \        WVR R7      pV^ ,          V^ ,          8X  g   Q h\        V^,          V^,          4       R# )fixedrg   Nr   r   rb   rd   re   rj   results   &&&& rE   test_get_packed_offsets_fixedrp      s:     !'BF!9###F1Ix{+rG   c                     \        WVR R7      pV^ ,          V^ ,          8X  g   Q h\        V^,          V^,          4       R# )rY   rg   Nrm   rn   s   &&&& rE   test_get_packed_offsets_expandrr      s:     !(CF!9###F1Ix{+rG   c                     \        WVR R7      pV^ ,          V^ ,          8X  g   Q h\        V^,          V^,          4       R# )equalrg   Nrm   rn   s   &&&& rE   test_get_packed_offsets_equalru      s:     !'BF!9###F1Ix{+rG   c            	          \         P                  ! \        4      ;_uu_ 4        \        . RORRRR7       RRR4       R#   + '       g   i     R# ; i)r1   Nrt   )rd   re   r[   )r1   r1   r1   )pytestraises
ValueErrorr    rG   rE   1test_get_packed_offsets_equal_total_none_sep_noner{      s.    	z	"	"ITt'J 
#	"	"	"s	   ?A	
child_type	boxcoordsc           	        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# )rJ   )r   imagetextu   ■fontsize)	textpropszUnknown picking child type r    )r}   T
pick_eventc                 &   < SP                  V 4      # )N)append)eventcallss   &rE   <lambda>test_picking.<locals>.<lambda>   s    u||E7JrG   axes pointsaxes pixelsbutton_press_eventNr/   )   r   )   r   r0   )r   r:   r5   r6   nponesr   r   r2   r3   r
   
set_pickerrI   mpl_connectr9   transform_pointdpirJ   clearr   r   LEFT_processlenartistr;   r<   )
r|   r}   picking_childimr>   r?   abxyr   s
   &&       @rE   test_pickingr      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:??rG   zanchoredtext_align.pngmpl20)r   stylec                      \         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 textrR   皙?haleft)r(   r*   propr%   rS   rQ   N)r2   r3   r   r:   )r>   r?   text0text1text2s        rE   &test_anchoredtext_horizontal_alignmentr      s|    llnGC/] f~7EMM%/X h'79EMM%/^ g8EMM%rG   extent_kindwindow_extent	tightbboxc                    \         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# )%   )figsizer   
Annotation->)
arrowstyleFbaseliner   )xyxytext
arrowpropsclip_onvar   Tr   r    dataaxes fractionxyboxxycoordsr}   box_alignmentr   )zoom333333?zoffset points)r   r   r}   r*   r   get_)atoltight)bbox_inchesN)r      )r   r1   r   r1   )?r   )皙?r   )i   皙ɿr    r&   r    )r    g333333ӿ)r   K   )gffffft@gYn@g     0}@gfffffr@)g1g      `@gfffffi@gd@)g     f@g      @g     l@g9W@)i^  i  r   )r2   rcParamsupdatercParamsDefaultr3   axisannotatedictr   r5   Circler:   r
   r   r   randomrandr   axesgetattrr   extentsioBytesIOsavefigseekimreadshaperI   rJ   r^   )r   r>   r?   an1rA   pab3r   ab6bb1target1bb3target3bb6target6bufr   targetshapes   &                 rE   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rG   c                  @    \        ^*R7      P                  ^*8X  g   Q hR# )*   )zorderN)r   r   rz   rG   rE   test_zorderr   ?  s    B&&",,,rG   c            
          \        ^^^ ^ 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   r   r   relposr    r   r   r   N)r   gffffff?r   r   )r   r
   r   )rA   r   r   s      rE   test_arrowprops_copiedr   C  sg    	RQ	-Bh9J	RHK&"1#-
/B =="""h8+++rG   alignc           
      ^   \         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 )H   )r   )childrenr   r%   N)r   r   bottom)rQ   top)r2   figurerI   get_rendererr   r   rJ   get_bbox
get_offsetr   boundsmaxget_childrenr   )r   r>   rendererx1y1x2y2r1r2hpackerbboxpxpyy_heightr)   vpackerx_heights   &                rE   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                      \         P                  ! 4       w  r\        R R4      p\        VRR/RR7      pVP	                  V4       V P                  4        R# )foorO   r   rT)patch_attrs
draw_frameN)r2   r3   r   r   r:   draw_without_rendering)r>   r?   atpbs       rE   test_paddedbox_default_valuesr  ~  sF    llnGC	el	+B	2K#5$	GBMM" rG   c            
         \        \        ^^^ ^ 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}   Nr0   )r   g?)r
   r   xyann	anncoords)r   s    rE   test_annotationbbox_propertiesr    s    	BAqt<j!'
)B88z!!!<<6!!!	BAqt<j)F"1
3B 88{"""<<?***rG   c                     \        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   get_textget_multilinebaselineset_textset_multilinebaseline)tas    rE   test_textarea_propertiesr'    sw    	%B;;=E!!!''))))KKT";;=E!!!##%%%%rG   png)
extensionsc                     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   rO   r!  N)add_subplotr   r:   txtr$  )fig_testfig_refax_refr   ax_testr   s   &&    rE   test_textarea_set_textr1    sd      "F-E
e""$G-Eu	IIurG   zpaddedbox.pngc                     \         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  rO   )r)   barb)r*   r  rN   foobar)r*   r  rP   N)r2   r3   r   r   r	   r:   )r>   r?   r&  r  r   s        rE   test_paddedboxr6    s    llnGC	%B	21;*<	NB	<r	2BMM"	%B	22K+=	>B	=	3BMM"	(	B	22$	/B	=	3BMM"rG   c                      \         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_eventNr0   )r2   r3   r   	draggableremover   rI   r   )r>   r?   ans      rE   test_remove_draggabler<    sP    llnGC	UH	%BLLIIK%szz1a8AACrG   c                  l   \         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  Tr   r8  scroll_eventN)r   r   r1   r1   r/   )r2   r   
subfiguresadd_axesr   r9  rI   rJ   r   r   
_draggable
got_artistget_window_extentr  r  )r>   annr  s      rE   test_draggable_in_subfigurerE    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~~((((((rG   )   rF  rF  )   r   r   r   N)rG  r1   r   r   )rY   rl   rt   )r   r1   r   )r   r      )rc   rc   rc   )r   g?r   )r   r      )r   g      @r   )r   r   r1   )r   r   r   )r   r   r1   r    )r   r    r1   r!   )r    r1   r   )rJ   r   r   )r   r   r   r   )r   r   r   r   rQ   r%   )<collectionsr   r   numpyr   numpy.testingr   rw   matplotlib.testing.decoratorsr   r   matplotlib.pyplotpyplotr2   matplotlib.patchespatchesr5   matplotlib.lineslinesr7   matplotlib.backend_basesr   r   matplotlib.offsetboxr	   r
   r   r   r   r   r   r   r   r   r   rF   rL   rV   ra   markparametrizerh   ri   rp   rr   ru   r{   r   r   r   r   r   r  r  r  r'  r1  r6  r<  rE  rz   rG   rE   <module>rX     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)rG   