+
    i.                        ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RIH
t
 R t]P                  P                  ] P                  ! 4       R8g  RR7      R	 4       t]P                  P                  ] P                  ! 4       R8g  RR7      R
 4       tR tR tR tR t]	! R.4      R 4       t]	! R.4      R 4       t]	! R.RR7      R 4       tR t]	! R.RR7      R 4       t]	! R.RR7      R 4       t]	! R.RR7      R 4       t]	! R.RR7      R 4       t]	! R .RR7      R! 4       tR" tR# tR$ t ]	! R%.RR7      R& 4       t!R' t"R( t#R) t$R* t%R1R+ lt&R1R, lt']P                  PQ                  R-. R2O4      ]
! R..R/7      R0 4       4       t)R# )3    N)pyplot)image_comparison)check_figures_equalc                 b   \         P                  ! \         P                  ! ^ ^\         P                  ,          ^4      \         P                  ! ^ ^\         P                  ,          ^4      4      w  r#\         P                  ! V4      p\         P
                  ! V4      pV P                  ! WE3/ VB pV# )r   )npmeshgridarangepicossinquiver)axkwargsXYUVQs   &,     |/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/matplotlib/tests/test_quiver.pydraw_quiverr      ss    ;;ryyAIq1yyAIq13DA
q	A
q	A
		!!&!AH    CPythonzRequires CPython)reasonc                      \         P                  ! 4       w  r\        V4      pVP                  p\        P
                  ! V4      pVP                  4        ?\        P
                  ! V4      V8  g   Q hR # N)pltsubplotsr   r   sysgetrefcountremove)figr   r   ttXorig_refcounts        r   test_quiver_memory_leakr$      sT     llnGCBA
##COOC(MHHJ	??3-///r   c            
         \         P                  ! 4       w  r\        V4      pVP                  VR R^RRRR/R7      p\        P
                  ! V4      pVP                  4        \        P
                  ! V4      V8  g   Q hR# )      ?q=
ףp?$2 \frac{m}{s}$WweightboldlabelposfontpropertiesN)r   r   r   	quiverkeyr   r   r    )r!   r   r   qkr#   s        r   test_quiver_key_memory_leakr1   %   ss     llnGCBA	adA'9"&.%7 
 
9B OOB'MIIK??2...r   c            
      l   ^^.p \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! V 4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W W W 4       RRR4       R#   + '       g   i     LW; i  + '       g   i     R# ; i)   z7takes from 2 to 5 positional arguments but 1 were givenmatchNz7takes from 2 to 5 positional arguments but 6 were given)pytestraises	TypeErrorr   r   )r   s    r   test_quiver_number_of_argsr9   4   s    	
AA	K
M 
M 	

1
M 
K
M 
M 	

1q$
M 
M	
M 
M
M 
M 
Ms   B,B"B	"B3	c            	         ^^.p . ROp\         P                  ! \        RR7      ;_uu_ 4        \        P                  ! WW 4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W W4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W W4       RRR4       \         P                  ! \        RR7      ;_uu_ 4        \        P                  ! W W V4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L}; i  + '       g   i     R# ; i)r3   z?X and Y must be the same size, but X.size is 2 and Y.size is 3.r4   NzMArgument U has a size 3 which does not match 2, the number of arrow positionszMArgument V has a size 3 which does not match 2, the number of arrow positionszMArgument C has a size 3 which does not match 2, the number of arrow positions)r3         )r6   r7   
ValueErrorr   r   )X2X3s     r   test_quiver_arg_sizesr@   @   s   
QB	B	  >
@ 
@ 	

22"
@ 
  B
D 
D 	

22"
D 
  B
D 
D 	

22"
D 
  B
D 
D 	

222&
D 
D
@ 
@
D 
D
D 
D
D 
D 
Ds/   D1D/5E9ED,	/D?	E	E&	c                     \         P                  ! 4       w  r\        P                  ! \        P                  ! ^4      \        P                  ! ^
4      4      w  r#\        P
                  ! V4      ;rE\        P                  P                  ^^
4      R,
          ^,          pVP                  W#WEVR7       V P                  P                  4        R# )   r&   anglesN)r   r   r   r   r	   	ones_likerandomrandr   canvasdrawr!   r   r   r   r   r   phis          r   test_no_warningsrL   U   s    llnGC;;ryy}biim4DALLOA99>>"b!B&#
-CIIaAI%JJOOr   c                  h   \         P                  ! 4       w  r\        P                  ! \        P                  ! ^
4      \        P                  ! ^
4      4      w  r#\        P
                  ! V4      \        P                  ! V4      rTVP                  WE^ ^ R7       V P                  P                  4        R# )
   )
headlengthheadaxislengthN)
r   r   r   r   r	   r   r   r   rH   rI   )r!   r   r   r   r   r   s         r   test_zero_headlengthrQ   ^   sj     llnGC;;ryy}biim4DA66!9bffQiqIIaqI3JJOOr   zquiver_animated_test_image.pngc            
          \         P                  ! 4       w  r\        VR R7      pVP                  VRR^RRRR/R7       R	# )
T)animatedr&   r'   r(   r)   r*   r+   r,   N)r   r   r   r/   r!   r   r   s      r   test_quiver_animaterU   h   sD     llnGCB&ALLCq"4x.@  Br   zquiver_with_key_test_image.pngc                      \         P                  ! 4       w  rVP                  R 4       \        V4      pVP	                  VRR^RRRRRRRR	/R
7	       R# )皙?r&   gffffff?z"$2\, \mathrm{m}\, \mathrm{s}^{-1}$figurer)   r*   r+   sizelarge)anglecoordinatesr-   r.   Ni)r   r   marginsr   r/   rT   s      r   test_quiver_with_keyr^   q   sU    llnGCJJsOBALLCq6%!)667 C  Er   zquiver_single_test_image.pngT)remove_textc                      \         P                  ! 4       w  rVP                  R 4       VP                  ^.^.^.^.4       R# )rW   N)r   r   r]   r   r!   r   s     r   test_quiver_singlerb   ~   s4    llnGCJJsOIIqcA3aS!r   c                  6   \         P                  ! 4       w  r\        \        P                  ! R .4      \        P                  ! R.4      R7      pVP                  ^.^.VR,          VR,          4      p^ VR,          ^ &   VP                  ^ ,          R8X  g   Q hR# )皙?g       @)uvre   rf   N)r   r   dictr   arrayr   r   )r!   r   uvq0s       r   test_quiver_copyrk      sp    llnGC	#288SE?	3B	A3RWbg	.BBsGAJ447c>>r   zquiver_key_pivot.pngc            	      >   \         P                  ! 4       w  r\        P                  ^ ^\        P                  ,          R1^ ^\        P                  ,          R13,          w  r#VP                  \        P                  ! V4      \        P                  ! V4      4      pVP                  R	^4       VP                  R	^4       VP                  VR^^RRR7       VP                  V^R^RRR7       VP                  VR^ ^RRR7       VP                  V^ R^RRR7       R# )
r   y              $@r&   N)r-   ESr)   N)r   r   r   mgridr
   r   r   r   set_xlimset_ylimr/   )r!   r   re   rf   qs        r   test_quiver_key_pivotru      s    llnGC88AagcM1QruuWS=01DA
		"&&)RVVAY'AKKBKKBLLCAsSL1LLAsAsSL1LLCAsSL1LLAsAsSL1r   zquiver_key_xy.pngc                  0   \         P                  ! ^4      p \         P                  ! ^4      pV \         P                  ^,          ,          p\         P                  ! RV,          4      pVP
                  pVP                  p\        P                  ! ^4      w  rg\        VR4       Fn  w  rVP                  R^4       VP                  RR4       VP                  WWERRR^RV	R7
      p
\        RR4       F  w  rVP                  WR^VRR	R
7       K  	  Kp  	  R# )   y              ?xy皙?middleg?)pivotunitswidthscalescale_unitsrD   皙? b)r   r   r   r[   labelcolorN)ri   rx   gɿ)ry   r&   r   )r   -   Z   )r   r	   zerosr
   exprealimagr   r   ziprr   rs   r   r/   )r   r   rD   ri   r   r   r!   axsr   	angle_strrt   xr[   s                r   test_quiver_key_xyr      s     			!A
A"%%!)_F	V	B
A
A||AHCS,/
B
D#IIaA 4&  ( O[9HALL3!5#LN : 0r   zbarbs_test_image.pngc                  &   \         P                  ! R
^^4      p \         P                  ! W 4      w  r^V,          ^V,          rC\        P                  ! 4       w  rVVP                  WW4\         P                  ! W44      RR\        RRRR7      RR7	       R	# )   TF      ?ry   333333?	emptybarbspacingheightviridis)
fill_emptyroundingsizescmapN)r   linspacer   r   r   barbshypotrg   r   r   r   r   r   r!   r   s          r   
test_barbsr      sr    
B1A;;qDAa4AqllnGCHHQ1!D5$C@  r   zbarbs_pivot_test_image.pngc                  $   \         P                  ! R^^4      p \         P                  ! W 4      w  r^V,          ^V,          rC\        P                  ! 4       w  rVVP                  WW4RRR\        RRRR7      R7       VP                  W^1R	R
7       R# )r   TF333333?r   ry   r   r   )r   r   r{   r   black)scNr   )r   r   r   r   r   r   rg   scatterr   s          r   test_barbs_pivotr      sz    
B1A;;qDAa4AqllnGCHHQ1D5$C@  BJJqrWJ%r   zbarbs_test_flip.pngc                    \         P                  ! R
^^4      p \         P                  ! W 4      w  r^V,          ^V,          rC\        P                  ! 4       w  rVVP                  WW4RRR\        RRRR7      V^ 8  R7	       R	# )z'Test barbs with an array for flip_barb.TFr   r   ry   r   r   )r   r   r{   r   	flip_barbNr   )r   r   r   r   r   r   rg   r   s          r   test_barbs_flipr      sp     	B1A;;qDAa4AqllnGCHHQ1D5$C@1u  r   c                  6   \         P                  ! 4       w  r\        P                  ! R .4      p\        P                  ! R.4      pVP	                  ^.^.W#4      p^ V^ &   VP
                  ^ ,          R 8X  g   Q h^ V^ &   VP                  ^ ,          R8X  g   Q hR# )rd   g@N)r   r   r   rh   r   re   rf   )r!   r   re   rf   b0s        r   test_barb_copyr      s}    llnGC
#A
#A	1#sA	!BAaD447c>>AaD447c>>r   c                    \         P                  ! ^4      p \         P                  ! ^4      p\         P                  P                  R\         P                  ! R4      ,          4      p\         P                  P                  R\         P
                  ! V4      ,          4      p\         P                  P                  V^&   \         P                  P                  V^&   \        P                  ! 4       w  rE\        P                  ! \        4      ;_uu_ 4        VP                  WW#4       RRR4       R#   + '       g   i     R# ; i)z=Test error handling when given differing sized masked arrays.g      .@N)   )r   r	   marh   onesrE   maskedr   r   r6   r7   r=   r   )r   yre   rf   r!   r   s         r   test_bad_masked_sizesr      s    
		!A
		!A
C"''$-'(A
C",,q/)*A55<<AaD55<<AaDllnGC	z	"	"
q 
#	"	"	"s   D11E	c            	      j   \         P                  ! 4       w  r\        P                  ! \        P                  ! ^4      \        P                  ! ^
4      4      w  r#\        P
                  ! V4      ;rE\        P                  P                  ^^
4      R,
          ^,          pVP                  W#WEVRR7       R# )rB   r&   rx   )rD   r   N)	r   r   r   r   r	   rE   rF   rG   r   rJ   s          r   test_angles_and_scaler      ss    llnGC;;ryy}biim4DALLOA99>>"b!B&#
-CIIaA$I7r   zquiver_xy.pngc            
          \         P                  ! \        R R7      R7      w  rVP                  ^ ^ ^^RR^R7       VP	                  ^ R4       VP                  ^ R4       VP                  4        R# )equal)aspect)
subplot_kwrx   )rD   r   r~   rd   N)r   r   rg   r   rr   rs   gridra   s     r   test_quiver_xyr      sX     lld'&:;GCIIaAq4qIAKK3KK3GGIr   c                     \         P                  ! 4       w  r\        P                  ! \        P                  ! ^4      \        P                  ! ^4      4      w  r#\        P
                  ! V4      ;p;rVVP                  W#WEVR7      pVP                  V^^^R4      pV P                  P                  4        \        VP                  4      ^8X  g   Q hR# )r;   rC   LabelN)r   r   r   r   r	   rE   r   r/   rH   rI   lenverts)	r!   r   r   r   r   r   rD   rt   r0   s	            r   test_quiverkey_anglesr     s     llnGC;;ryy|RYYq\2DA\\!_$A$
		!V	,A	aAq'	*BJJOOrxx=Ar   c                  h   R R/R RRR/RR/.p V  EF  p\         P                  ! \         P                  ) \         P                  ^4      p\         P                  ! V4      \         P                  ,          ^,          p\         P                  ! V4      p\         P                  ! V4      p\
        P                  ! 4       pVP                  RR7      pVP                  ! W#WE3/ VB pVP                  V^ ^ ^R4      p	VP                  P                  4        \        V	P                  4      ^8X  d   EK  Q h	  R# )rD   rx   r   aitoff)
projection1 unitsN)r   r   r
   rE   
zeros_liker   rX   add_subplotr   r/   rH   rI   r   r   )
kwargs_listkwargs_dictr   r   vxvyr!   r   rt   r0   s
             r   test_quiverkey_angles_xy_aitoffr     s     
4	4-	K #KKr*LLObee#a']]1\\!_jjl___1IIaB2k2\\!Q1i0

288}!!! #r   c            
      l   R R/R RRR/RR/.p V  F  p. R
Op. R
Op. ROp. ROp\         P                  ! 4       w  rgVP                  ! W#WE3/ VB pVP                  VRR^RRR7       VP                  V^ ^ ^R4      p	VP                  P                  4        \        V	P                  4      ^8X  d   K  Q h	  R	# )rD   rx   r   r   rd   zQuiver key, length = 1rn   )r   r   r   r   r-   r   N)r   r   r   )r3   r   r3   )r3   r   r   )r   r   r   r/   rH   rI   r   r   )
r   r   r   r   r   r   r!   r   rt   r0   s
             r   +test_quiverkey_angles_scale_units_cartesianr   -  s     
4	4-	K #,,.IIaA0K0
Q#3c 	 	C\\!Q1i0

288}!!! #r   c                 ,   \         P                  ! 4       w  r\        P                  ! \        P                  ! ^4      \        P                  ! ^4      4      w  r#\        P
                  ! V4      ;rEVP                  W#WE4      pVP                  ^ ^4       R# )zBCheck that it is possible to set all arrow UVC to the same numbersN)r   r   r   r   r	   rE   r   set_UVC)r!   r   r   r   r   r   rt   s          r   test_quiver_setuvc_numbersr   H  s`     llnGC;;ryy|RYYq\2DALLOA
		!AIIaOr   c                    \         P                  ! ^^^4      p\         P                  ! ^^^4      p\         P                  ! W#4      w  rE^^rvV P                  4       pVP	                  WEWgRR7      p	VP                  RR4       VP                  RR4       Vf4   VP                  V	^^^RRRR	7       VP                  V	R^^RR
R^ZR7       R# VP                  V	^^^RRRVR7       VP                  V	R^^RR
R^ZVR7	       R# )z/Draw Quiver and QuiverKey using zorder argumentrz   r{   r&         @Ndatar   bluer\   r   r   r   r\   r   r   r[   )r\   r   r   zorder)r\   r   r   r[   r   )r   r	   r   r   r   rr   rs   r/   )
r!   r   r   r   r   r   r   r   r   rt   s
   &&        r   draw_quiverkey_zorder_argumentr   T  s   
		!QA
		!QA;;qDAaq	B
		!H	-AKKSKKS~
Q1bff 	 	.
QQfB 	 	8 	Q1bffV 	 	=
QQfBv 	 	Gr   c                   \         P                  ! ^^^4      p\         P                  ! ^^^4      p\         P                  ! W#4      w  rE^^rvV P                  4       pVP	                  WEWgRR7      p	VP                  RR4       VP                  RR4       VP                  V	^^^RRRR7      p
VP                  V	R^^RR	R^ZR
7      pVe%   V
P                  V4       VP                  V4       R# R# )z*Draw Quiver and QuiverKey using set_zorderrz   r   r&   r   r   r   r   r   r   r   N)	r   r	   r   r   r   rr   rs   r/   
set_zorder)r!   r   r   r   r   r   r   r   r   rt   qk1qk2s   &&          r   draw_quiverkey_setzorderr   k  s    
		!QA
		!QA;;qDAaq	B
		!H	-AKKSKKS
,,q!Q   0C
,,q#q"& b  :Cvv r   r   png)
extensionsc                 6    \        WR 7       \        WR 7       R# ))r   N)r   r   )fig_testfig_refr   s   &&&r   test_quiverkey_zorderr     s     #8;W4r   r   )r   r;   r   N)*platformr   numpyr   r6   
matplotlibr   r   matplotlib.testing.decoratorsr   r   r   markskipifpython_implementationr$   r1   r9   r@   rL   rQ   rU   r^   rb   rk   ru   r   r   r   r   r   r   r   r   r   r   r   r   r   r   parametrizer    r   r   <module>r      s*    
   $ : = H224	A-  /
0/
0 H224	A-  /
//
/	%'* 345B 6B 345	E 6	E 12E" F" )*=2 >2 &'T:O ;O. )*= > /0dC& D& ()t< =
8 ?#6 7":"6	G.( ?3(5 ) 45r   