+
     ]iX  c                   s   ^ RI t ^ RIHtHt ^ RIHtHtHtHtH	t	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIt^ RItRtR tR	 tR
 tR t]P:                  P=                  R4      R 4       tR t ]P:                  PC                  R. R6O4      R 4       t"R t#R t$R t%R t&]P:                  PC                  RRR.4      ]P:                  PC                  RRR.4      ]P:                  PC                  RR]PN                  R73R]PP                  R83R]PN                  R93R]PP                  R:3.4      R 4       4       4       t)R t*R  t+]P:                  PC                  R!R"R#R]PX                  ! R$]R%7      .4      R& 4       t-]P:                  PC                  R'. R;O4      R( 4       t.R) t/R* t0R+ t1]P:                  PC                  R,RR.4      ]P:                  PC                  R-]PN                  ]PP                  .4      ]P:                  PC                  R.R/R0.4      ]P:                  PC                  R1. R<O4      ]P:                  PC                  R2R3R4.4      R5 4       4       4       4       4       t2R# )=    N)path
transforms)FigureCanvasBaseKeyEventLocationEventMouseButton
MouseEventNavigationToolbar2RendererBase)RubberbandBaseFigure)needs_pgf_xelatexzTreat the new Tool classes introduced in v[0-9]*.[0-9]* as experimental for now; the API and rcParam may change in future versions.c            	      s   \         P                  ! 4       p \        ^^4       Uu. uF"  p\        P                  P                  V4      NK$  	  pp\        ^^4       Uu. uF/  qP                  V4      P                  4       P                  4       NK1  	  pp\        P                  ! ^4      P                  R4      pRR.pRR.pR pV! WW4WV4       V! WR,          W4WV4       V! V . W4WV4       V! WVR,          WEV4       V! W. WEV4       \        ^ VP                  ^ ,          4       F  pV! WW4^ V1R3,          WV4       K  	  V! WW4. V4       V! WW4V. 4       V! WW4. . 4       V! WW4VR,          V4       R# u upi u upi )   ZredZgreenc                 s   \        4       p\        VP                  WV4      4      pVP                  4       pVP	                  V\        \        V4      4      V\        P                  ! V 4      WE. . R .. R4       U	U
UUUu. uF  w  rrqNK
  	  pppp
p	pVP                  WW4V4      pV'       d$   \        P                  ! V\        V4      R7      pR# R# u upppp
p	i )FZscreen)Z	minlengthN)r	   ZlistZ_iter_collection_raw_pathsZnew_gcZ_iter_collectionrangelenr   ZAffineDeltaTransformZ_iter_collection_uses_per_pathnpZbincount)Zmaster_transformpathsZall_transformsoffsets
facecolors
edgecolorsZrbZ	raw_pathsZgcZxoZyoZpath_idZgc0ZrgbFaceZidsZusesZseens   &&&&&&           J/usr/lib64/python3.14/site-packages/matplotlib/tests/test_backend_bases.pycheckZ!test_uses_per_path.<locals>.check   s    ^66^5 6	YY[""uS^,g223CD2rE7x	!"! 927w! 	 " 007
D;;sc)n=D "s   =C:r       N:NNNN)
      )r   ZAffine2Dr   r   ZPathZunit_regular_polygonZrotateZ
get_matrixZcopyr   arangereshapeZshape)	ZidZir   Ztforms_matricesr   r   r   r   Zns	            r   test_uses_per_pathr      sf   				B8=aD1TYY++A.EDAFq!MAyy|..0557OMiim##G,G!J!J8$ 
"_zF	"Cj/JK	"b/JC	"_S)7
K	"Rj91gmmA&'b!A#q&/	& ( 
"_r:>	"_z2>	"_r26	"_z#
KG EMs   (E45E9c                      R # N r        r   test_canvas_ctorr"   >   s    r!   c                  sz    \         P                  ! 4       p V P                  P                  P	                  R 4       R# )z0:1/2<3N)pltfigurecanvasmanagerZset_window_titlefig    r   test_get_default_filenamer*   B   s%    
**,CJJ''	2r!   c                  sr    \         P                  ! 4       p \        V 4      p\         P                  ! V 4       R # r   )r#   r$   r   Zclose)r(   r%        r   test_canvas_changer,   I   s"    
**,Cc"FIIcNr!   Zpdfc                 s   \         P                  ! 4        V P                  R R4       \        P                  ! \
        4      ;_uu_ 4       p\         P                  ! 4        RRR4       \        P                  ! \
        4      ;_uu_ 4       p\         P                  ! 4       P                  4        RRR4       R#   + '       g   i     L`; i  + '       g   i     R# ; i)ZDISPLAYz:999N)r#   subplotsZsetenvpytestwarnsUserWarningZshowgcf)ZmonkeypatchZrecs   & r   test_non_gui_warningr2   R   sz    LLNy&)	k	"	"c
 
# 
k	"	"c	 
#	" 
#	" 
#	"	"s   
B8
$C8C	C	c                  s    \         P                  ! 4       w  rV P                  P                  V4       V P	                  4        R # r   )r#   r-   r%   Z
grab_mouseZclearr(   axr+   r   test_grab_clearr5   e   s,    llnGCJJ" IIKr!   zx, yc                 s    \         P                  ! 4       w  r#\        V4      p\        R W@V4      pV f    Vf    V e   Ve   R ;Vn        Vn        R# R# R# )Z
test_eventNc                 r   )foor    )xs   &r   Z<lambda>Z.test_location_event_position.<locals>.<lambda>   s    r!   )r#   r-   r   r   Z	fmt_xdataZ	fmt_ydata)r7   yr(   r4   r%   events   &&    r   test_location_event_positionr:   o   sW     llnGCc"F,15Ey
 	y
 	} '65r| '}r!   c                  s    \         P                  ! 4       w  rVP                  RRR7       VP                  4       P                  RR7       VP	                  4       P                  RR7       R# )	r    )xlimylim)r<   )r;   Nr    r   )r    i   )r    i(   )r       )r#   r-   settwinxZtwinyr3   r+   r   !test_location_event_position_twinrA      sG    llnGCFFgF&HHJNNN HHJNNNr!   c            	      s  a \         P                  ! 4       p V P                  R R RRRRR7       V P                  P	                  4        . oV3R lpV P                  P                  RV4       \        RV P                  R4      P                  4        \        R	V P                  .V P                  P                  R4      O\        P                  N5!  P                  4        \        R
V P                  R4      P                  4        R# )      ?ZhelloZcenterT)ZhaZvaZpickerc                 s*   < SP                  V 4       R # r   )Zappend)r9   pickss   &r   handle_pickZtest_pick.<locals>.handle_pick   s    Ur!   Z
pick_eventkey_press_eventZabutton_press_eventZkey_release_eventNrB   rB   )r#   r$   Ztextr%   drawZmpl_connectr   _processr   ZtransFigure	transformr   LEFT)r(   rD   rC   s     @r   	test_pickrL      s    
**,CHHRWhtHDJJOOE JJ<5

C099;#SZZ !))(3!!!) #**c2;;=r!   c                  s   \         P                  ! 4       w  rVP                  R R7       \        V P                  4      pVP                  4        VP                  4       pVP                  4       pRpRpVP                  P                  V4      P                  \        4      pVP                  P                  V4      P                  \        4      p\        RV P                  .VO\        P                  N5!  p	V P                  P                  P!                  V	P"                  V	4       \        RV P                  .VO\        P                  N5!  p
V P                  P                  P!                  V
P"                  V
4       \        RV P                  .VO\        P$                  N5!  p	V P                  P                  P!                  V	P"                  V	4       \        RV P                  .VO\        P$                  N5!  p
V P                  P                  P!                  V
P"                  V
4       VP                  4        R# )Zlogit)ZxscalerF   button_release_eventN)gư>皙?)gwJ?皙?)r#   r-   r?   r   r%   zoomZget_xlimZget_ylim	transDatarJ   astypeintr   r   rK   Z	callbacksZprocessZnameRIGHT)r(   r4   tbZxlim0Zylim0d0d1s0s1start_event
stop_events              r   test_interactive_zoomr\      s   llnGCFF'F 
CJJ	'BGGI KKMEKKME 
B	B 
			#	*	*3	/B				#	*	*3	/B cjjA+-A/:/?/?AKJJ  !1!1;?

C-/C1<1A1ACJJJ  *=
 cjjB+-B/:/@/@BKJJ  !1!1;?

D-/D1<1B1BDJJJ  *=
 GGIr!   c                  s    \         P                  ! 4       w  rVP                  ^ ^.^ ^.4       V P                  P	                  V4       \        V P                  4      pVP                  4        VP                  4        R# )r    N)r#   r-   plotr%   Z
widgetlockr   rP   pan)r(   r4   rU   s      r   test_widgetlock_zoompanr_      sW    llnGCGGQFQFJJ"	CJJ	'BGGIFFHr!   	plot_funcZimshowcontourforientationverticalZ
horizontalztool,button,expectedrP   r^   c                 s   \         P                  ! 4       w  rV\        P                  ! ^4      P	                  R
4      p^ ^
r\        W`4      ! WxV	R7      p
VP                  WVR7      pV R8X  d   R# ^^rVR3pVR3pVR8X  d   VRRR1,          pVRRR1,          pVP                  P                  P                  V4      P                  \        4      pVP                  P                  P                  V4      P                  \        4      p\        RVP                  .VOVN5!  p\        RVP                  .VOVN5!  p\        VP                  4      pVR	8X  dF   VP                  4        VP!                  V4       VP#                  V4       VP%                  V4       R# VP'                  4        VP)                  V4       VP+                  V4       VP-                  V4       R# )i   )vminvmax)r4   rb   ra   NrB   rc   rF   rM   rP   )   r   i)r#   r-   r   r   r   ZgetattrZcolorbarr4   rQ   rJ   rR   rS   r   r%   r   rP   
press_zoom	drag_zoomrelease_zoomr^   	press_pandrag_panrelease_pan)r`   rb   toolbuttonZexpectedr(   r4   ZdataZvmin0Zvmax0ZcollZcbrd   re   rV   rW   rX   rY   rZ   r[   rU   s   &&&&&                r   test_interactive_colorbarro      s    llnGC99R=  (Db52!$?D	d{	;BJ 	
 A$
 B
Bj "X"X 
	"	"2	&	-	-c	2B		"	"2	&	-	-c	2B cjj7+-7/57K

9-/9179J 
CJJ	'Bv~
	
k"
Z 

#

[!
J
z"r!   c                  s   \         P                  ! \        \        R 7      ;_uu_ 4        R\        P
                  R&   RRR4       \        P                  ! 4       p V P                  4       pVP                  P                  P                  P                  R4       VP                  P                  P                  P                  R4       R#   + '       g   i     L; i)ZmatchtoolmanagertoolbarNrP   r^   )r.   r/   r0   _EXPECTED_WARNING_TOOLMANAGERr#   rcParamsZgcaZ
get_figurer%   r&   rq   Ztrigger_tool)r4   r(   r+   r   test_toolbar_zoompanru     s    	k)F	G	G"/Y 
H	B
--/CJJ""//7JJ""//6 
H	Gs   C

C	c                  s   \         P                  ! 4       w  rVP                  \        ^4      \        ^4      4       \	        V P
                  4      pVP                  4        \        RV P
                  R^d^d4      P                  4        \        RV P
                  R^d^d4      P                  4        \        RV P
                  R^d^d4      P                  4        \        RV P
                  R^d^d4      P                  4        VP                  P                  RR	.4      w  r4\        RV P
                  .VO\        P                  N5!  P                  4        \        RV P
                  .VO\        P                  N5!  P                  4        \        RV P
                  R4      P                  4        \        RV P
                  R^d^d4      P                  4        \        RV P
                  R^d^d4      P                  4        R# )
i   rE   ZkZlrF   rM   ZhN)r   r   )r>   r>   )r#   r-   r]   r   r   r%   rP   r   rI   rQ   rJ   r   r   rK   )r(   r4   rU   ZstartZstops        r   $test_toolbar_home_restores_autoscalerv   )  s}   llnGCGGE"IuRy!	CJJ	'BGGI 

Cc:CCE

Cc:CCE 

Cc:CCE

Cc:CCE ,,((&&)9:KE#SZZJ%J9I9IJSSU%szzKDK+:J:JKTTV

C099; 

Cc:CCE

Cc:CCEr!   backendZsvgZpsZpgf)Zmarksc                 s   ^ RI Hp ^ RIHp \        P
                  ! RV  24      pVP                  pV! RR7      pV! V4       VP                  ^^4      pV! RR7      pV! V4       VP                  ^^4      pVP                  4        U	u. uF  qP                  4       NK  	  p
p	VP                  P                  4        VP                  P                  4        VP                  4        U	u. uF  qP                  4       NK  	  pp	VP                  4        U	u. uF  qP                  4       NK  	  pp	\        W4       F  w  rK  	  \        W4       F(  w  pp\        P                  P                  VVRR7       K*  	  R# u up	i u up	i u up	i )	r    r   )FigureCanvaszmatplotlib.backends.backend_T)Zconstrained_layoutg{Gzt?)ZatolN)matplotlib.figurer   Zmatplotlib.backends.backend_aggrx   	importlibZimport_moduler-   ZravelZget_positionr%   rH   Zzipr   ZtestingZassert_allclose)rw   r   rx   Ztest_backendZ
TestCanvasZfig_testZ	axes_testZfig_aggZaxes_aggr4   Zinit_posZlayed_out_pos_testZlayed_out_pos_aggZinitZplacedZrefZtests   &                r   	test_drawr{   G  sN   
 )<**-I'+STL**J.Hx!!!Q'I -G1%H,5OO,=>,=b!,=H>OONN6?oo6GH6G//+6GH5=^^5EF5Er*5EFH9f9 *?	T


""35"9 @ ?
 IFs   
E=*FFz&key,mouseend,expectedxlim,expectedylimc                 s   \         P                  ! 4       w  rEVP                  \        P                  ! ^
4      4       VP                  R4       RpVP                  P                  V4      P                  \        4      pVP                  P                  V4      P                  \        4      p\        RVP                  .VO5R\        P                  RV / p	\        RVP                  .VO5R\        P                  RV / p
\        VP                  4      pVP                  4        VP!                  V	4       VP#                  V
4       VP%                  V
4       R# )r   ZequalrF   rn   keyrM   NrG   )r#   r-   r]   r   r   Z
set_aspectrQ   rJ   rR   rS   r   r%   r   rK   r   r^   rj   rk   rl   )r|   ZmouseendZexpectedxlimZexpectedylimr(   r4   Z
mousestartZsstartZsendrZ   r[   rU   s   &&&&        r   test_interactive_panr}   i  s   , llnGCGGBIIbM MM' J \\##J/66s;F<<!!(+2237D cjj+1:E:J:JK 

-1:E:J:JJ 
CJJ	'BFFHLLKK
NN:r!   c                  s   \         P                  ! \        \        R 7      ;_uu_ 4        R\        P
                  R&   RRR4       \        P                  ! 4       p \        V P                  P                  P                  P                  4      pV P                  P                  P                  P                  R4       R#   + '       g   i     L; i)rp   rq   rr   Nforward)r.   r/   r0   rs   r#   rt   r1   r   r%   r&   rq   ZtoolsZremove_tool)r(   Zinitial_lenr+   r   test_toolmanager_remover     s{    	k)F	G	G"/Y 
H
'')Ccjj((44::;KJJ""..y9 
H	Gs   B>>C	c                  s>   \         P                  ! \        \        R 7      ;_uu_ 4        R\        P
                  R&   RRR4       \        P                  ! 4       p V P                  P                  P                  P                  R4      p\         P                  ! \        RR 7      ;_uu_ 4        RRR4       \         P                  ! \        RR 7      ;_uu_ 4        RRR4       R#   + '       g   i     L; i  + '       g   i     LR; i  + '       g   i     R# ; i)rp   rq   rr   N
rubberbandz'ToolManager does not control tool 'foo')r.   r/   r0   rs   r#   rt   r1   r%   r&   rq   Zget_tool)r(   r   r+   r   test_toolmanager_get_toolr     s    	k)F	G	G"/Y 
H
'')C##//88FJ 
kE
G 
G 
G
 
kE
G 
G 
G 
G 
H	G
G 
G

G 
G 
Gs#   C%-C8D%C5	8D	D	c                  s   \         P                  ! \        \        R 7      ;_uu_ 4        R\        P
                  R&   RRR4       \        P                  ! 4       p \         P                  ! \        RR 7      ;_uu_ 4        V P                  P                  P                  P                  RR4       RRR4       \         P                  ! \        RR 7      ;_uu_ 4        V P                  P                  P                  P                  RR4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R# ; i)	rp   rq   rr   Nz"Key c changed from back to forwardr~   Zcz'foo' not in Toolsr6   )r.   r/   r0   rs   r#   rt   r1   r%   r&   rq   Zupdate_keymapZraisesZKeyErrorr'   r)   r   test_toolmanager_update_keymapr     s    	k)F	G	G"/Y 
H
'')C	k@
B 
B

&&44YD
B 
x';	<	<

&&44UC@ 
=	< 
H	G
B 
B 
=	<	<s#   D>1D)1D<D&	)D9	<E	rm   rn   	patch_visTFforward_navt_stwinsharec                 s
   \         P                  ! 4       w  rVVP                  ^^cR7      pVP                  V4       VP                  P                  V4       VR8X  dh   VP                  ^4      pVP                  V4       VP                  V4       VP                  ^4      p	V	P                  V4       V	P                  V4       M'VR8X  d!   VP                  4       pVP                  4       p	VP                  R4       VP                  P                  R4       XP                  R4       VP                  P                  R4       VP                  R4       VP                  P                  R4       X	P                  R4       V	P                  P                  R	4       RRrWv3 F#  pVP                  ! V
!   VP                  ! V!   K%  	  Rw  rppVP                  P                  W34      P                  \         4      pVP                  P                  VV34      P                  \         4      pVP                  P#                  4       P                  V4      w  ppVP                  P#                  4       P                  V4      w  pp\%        R
VP&                  .VOVN5!  p\%        RVP&                  .VOVN5!  p\)        VP&                  4      pV R8X  d   V^8X  d   RMRpVP+                  . VOVOV4      w  ppVP-                  4       RJ d   VP+                  . VOVOV4      w  ppMWVP-                  4       RJ d   T
pTpM>VP                  P/                  4       '       g   VP+                  . VOVOV4      w  ppMT
pTpVP1                  4        VP3                  V4       VP5                  V4       VP7                  V4       R# VP8                  ! . VOVN5!   VP:                  ! VR.VO5!  P<                  P                  \>        4      w  ppVPA                  4        VP-                  4       RJ d\   VP8                  ! . VOVN5!   VP:                  ! VR.VO5!  P<                  P                  \>        4      w  ppVPA                  4        MVP-                  4       RJ d   T
pTpMVP                  P/                  4       '       g\   VP8                  ! . VOVN5!   VP:                  ! VR.VO5!  P<                  P                  \>        4      w  ppVPA                  4        MT
pTpVPC                  4        VPE                  V4       VPG                  V4       VPI                  V4       R# )i   )Zzorderr   r   ax_t	ax_t_twinZrax_b	ax_b_twinZbrF   rM   rP   ZinZoutTFN)r   r    r    rB   )r    r    r   rB   r=   )r   r   r   r   )%r#   r-   Zadd_subplotZset_forward_navigation_eventsZpatchZset_visibleZsharexZshareyr@   Z	set_labelZset_facecolorZset_xlimZset_ylimrQ   rJ   rR   rS   Zinvertedr   r%   r   Z_prepare_view_from_bboxZget_forward_navigation_eventsZget_visiblerP   rg   rh   ri   Z	start_panZ_get_pan_pointsZTZfloatZend_panr^   rj   rk   rl   )rm   rn   r   r   r   r(   r   r   r   r   Z	init_xlimZ	init_ylimr4   Zxstart_tZxstop_tZystart_tZystop_trX   rY   Zxstart_bZystart_bZxstop_bZystop_brZ   r[   rU   Z	directionZxlim_tZylim_tZxlim_bZylim_bs   &&&&&                          r    test_interactive_pan_zoom_eventsr     s    IC??3r?*D&&{3JJ9% g~OOC(	OOC(		JJL	JJL	 	NN6JJ^,$OO!!#&NN6JJ^,$OO!!#&
 #Gyl
Y
Y 
 ,6(Hx 
	!	!8"6	7	>	>s	CB		!	!7G"4	5	<	<S	AB 002<<R@Hh~~..0::2>GW 13::KKFKK2CJJLLVLJ	CJJ	'Bv~#q[Te	55jjRj)L--/47!99*B**iPNFF//1U:FF::))++!%!=!=jjRj)!T""
	
k"
Z 

# 	##F#--fd@R@BBII%P--/47NN'B''!11&$DDFFMMeTNFFLLN//1U:FF::))++++F+!%!5!5fd!HR!H!J!J!Q!QRW!X""

[!
J
z"r!   ))*   i   )Nr   )NN)i   gq=
ף Y@)g     i@g       @)rf   i   )ii   )ii   )gQ?gQ@))N皙?r   gQ@g{G(@g@gffffff'@)N)r   rB   r   r    i	   )N)rB   r   r   r   )NrG   r   r   )NrO         ?g(\gQ@g      @g     &@)Nr   r   r   r   )N)rO   333333?r   gQ	gq=
ףp@)Nr   r   r   r   )shift)r   皙?r   r   )r   r   r   r   r   )r   r   r   r   )r   r   r   )g(\@gq=
ף(@)r   )rO   g?gp=
ףgp=
ף@r   )r   r   r   )gQg
ףp=
@)r7   )r   rN   r   r   )r8   )rN   r   r   r   )controlr   r   r   )r   r   g(\@gq=
ףp'@r   )TFZauto)3rz   Z
matplotlibr   r   Zmatplotlib.backend_basesr   r   r   r   r   r   r	   Zmatplotlib.backend_toolsr
   ry   r   Zmatplotlib.testing._markersr   Zmatplotlib.pyplotZpyplotr#   Znumpyr   r.   rs   r   r"   r*   r,   Zmarkrw   r2   r5   Zparametrizer:   rA   rL   r\   r_   rK   rT   ro   ru   rv   Zparamr{   r}   r   r   r   r   r    r!   r   <module>r      s    '& & & 4 $ 9   9 %LP9>- U( ($, 
NP>P>,F&-E`* x&<=\(BC/!;#3#3V<!;#4#4i@ +"2"2G< +"3"3\BDE
3CE D >3Cl	+5< tUU*;<>:	:< ,*I+*IBAJ"
A &%1K$4$4k6G6G#HItUm4(=> 12}P 3 ? 5 J 2
}Pr!   