+
     ]ii6  c                   s   ^ RI t ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RI	H
t
 ^ RIHt R tR tR tR tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%R t&R t'R  t(R! t)R" t*R# )#    N)Path)subprocess_run_for_testing)pyplotc                 s   \         P                  ! R RR7       \        \        P                  4      P
                  ^,          R,          pVP                  4       '       g   \         P                  ! R4       \        \        P                  4      P                  4       pV R,          pVP                  VR4       \        \        P                  \        V4      \        V4      .RR7       VP                  R4      pW$8w  di   R	P                  \         P"                  ! VP%                  R	4      VP%                  R	4      R
R^ RR7      4      p\         P&                  ! RV,          4       R# R# )Zblackz24.1)Z
minversionztools/boilerplate.pyzboilerplate.py not foundz	pyplot.pyzutf-8T)Zcheck
zfound pyplot.pyzexpected pyplot.pyZ )ZfromfileZtofileZnZlinetermzpyplot.py is not up-to-date. Please run 'python tools/boilerplate.py' to update pyplot.py. This needs to be done from an environment where your current working copy is installed (e.g. 'pip install -e'd). Here is a diff of unexpected differences:
%sN)pytestimportorskipr   mpl__file__Zparentsexistsskipplt	read_textZ
write_textr   sysZ
executablestrjoindifflibZunified_diffsplitZfail)Ztmp_pathZ
gen_scriptZorig_contentsZplt_fileZnew_contentsZdiff_msgs   &     C/usr/lib64/python3.14/site-packages/matplotlib/tests/test_pyplot.pytest_pyplot_up_to_dater      s   
F3cll#++A.1GGJ./&002M+%Hw/	Z#h-8 %%g.L$99  ##D)<+=+=d+C*+b	"# 	< ?G	G	
 %    c                 s   \         P                  P                  \         P                  R R4      \         P                  P	                  \         P                  R4      R
R l4       4       p\
        P                  ! V4      R
R l4       pV! R4       V! RR7       V! RRR7       V! RRR7       V '       d   Q h\        P                  ! \         P                  4      ;_uu_ 4        V! RR	7       RRR4       \        P                  ! \         P                  4      ;_uu_ 4        V! RR4       RRR4       R#   + '       g   i     LP; i  + '       g   i     R# ; i)oldnewkwoNc                     R # N r   r      &&r   funcZ1test_copy_docstring_and_deprecators.<locals>.func.   s     	r   c                 r   r   r   r   r   r   wrapper_funcZ9test_copy_docstring_and_deprecators.<locals>.wrapper_func3   s    r   )r   )r   r   )r   r   )
r   Z_apiZrename_parameterZ__version__Zmake_keyword_onlyr   Z_copy_docstring_and_deprecatorsr   warnsZMatplotlibDeprecationWarning)Zrecwarnr   r   s   &  r   #test_copy_docstring_and_deprecatorsr    -   s    XXsu=XX7 8 > 	((. / T4 Tt$;	c66	7	7 
8	c66	7	7T4  
8	7 
8	7	7	7	7s   "
D4 
E4E	E	c                  s   \         P                  ! 4       w  r\         P                  ! R 4       VP                  4       '       d   Q h\         P                  ! R4       VP                  4       '       g   Q h\         P                  ! 4        VP                  4       '       d   Q h\         P                  ! 4        VP                  4       '       g   Q hR# )FTN)r   subplotsZboxZget_frame_on)figax     r   test_pyplot_boxr%   B   s    llnGCGGEN    GGDM??GGI    GGI??r   c                  s<    \         P                  ! . RO. RO4       R# )   N)r&      i   )r   Z	stackplotr   r   r   test_stackplot_smoker(   N   s    MM)Y'r   c                  s\   \         P                  ! \        4      ;_uu_ 4        \        P                  ! ^R7       RRR4       \         P                  ! \        4      ;_uu_ 4        \        P                  ! ^R7       RRR4       R#   + '       g   i     LT; i  + '       g   i     R# ; i)r&   )ZnrowsN)Zncols)r   raises	TypeErrorr   subplotr   r   r   test_nrows_errorr,   S   sX    	y	!	!! 
"	y	!	!! 
"	! 
"	!	!	!	!s   B%BB	B+	c                  s   \         P                  ! 4        \        P                  ! 4       '       g   Q h\         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       d   Q h R R R 4       \        P                  ! 4       '       g   Q h\         P                  ! 4        \        P                  ! 4       '       d   Q h\         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       d   Q h R R R 4       \        P                  ! 4       '       d   Q hR #   + '       g   i     L; i  + '       g   i     LB; ir   )r   ionr   is_interactiveioffr   r   r   	test_ioffr0   Z   s    GGI	%%''''' 
HHJ!!####	%%''''' 
!!##### 
 
   D)#D<)D9	<E	c                  s   \         P                  ! 4        \        P                  ! 4       '       d   Q h\         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       g   Q h R R R 4       \        P                  ! 4       '       d   Q h\         P                  ! 4        \        P                  ! 4       '       g   Q h\         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       g   Q h R R R 4       \        P                  ! 4       '       g   Q hR #   + '       g   i     L; i  + '       g   i     LB; ir   )r   r/   r   r.   r-   r   r   r   test_ionr2   h   s    HHJ!!####	!!#### 
!!####GGI	!!#### 
 
 
r1   c            	      sl   \         P                  ! 4        \         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       d   Q h\         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       g   Q h R R R 4       \        P                  ! 4       '       d   Q h R R R 4       \        P                  ! 4       '       g   Q h\         P                  ! 4       ;_uu_ 4        \         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       d   Q h R R R 4       R R R 4       \        P                  ! 4       '       g   Q h\         P                  ! 4       ;_uu_ 4        \         P                  ! 4        R R R 4       \        P                  ! 4       '       g   Q h\         P                  ! 4        \         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       g   Q h\         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       d   Q h R R R 4       \        P                  ! 4       '       g   Q h R R R 4       \        P                  ! 4       '       d   Q h\         P                  ! 4       ;_uu_ 4        \         P                  ! 4       ;_uu_ 4        \        P                  ! 4       '       g   Q h R R R 4       R R R 4       \        P                  ! 4       '       d   Q h\         P                  ! 4       ;_uu_ 4        \         P                  ! 4        R R R 4       \        P                  ! 4       '       d   Q hR #   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELn; i  + '       g   i     ELz; i  + '       g   i     EL6; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL(; i  + '       g   i     L; ir   )r   r-   r/   r   r.   r   r   r   test_nested_ion_ioffr3   v   sm   GGI 
%%''''WWYY%%'''' %%'''''	 

  
XXZZ))+++++  
 	
 
 HHJ 
!!####XXZZ))+++++ !!####	 

 !!#### 
WWYY%%''''  
 !!####		 
!!#####E YY 
 ZZ 

 
 ZZ 
 YY 

 
s   ;N.M/	"N0N5N+N	2N+<N?);O'$O	"O'&O'+P	O;	(P2P#/N :	NN	N("	N++N<	?O	O$	O''O8	;P	PP 	#P3	c                  s     \         P                  ! R 4       R#   \         d   p \        T 4      R8X  g   Q h Rp ? R# Rp ? ii ; i)g?zQclose() argument must be a Figure, an int, a string, or None, not <class 'float'>N)r   closer*   r   )Ze    r   
test_closer6      sD    B		# B1v B B 	B BBs    A=Ac                  s:   \         P                  ! ^y4      p V \         P                  ! 4       J g   Q h\         P                  ! ^z4      pV\         P                  ! 4       J g   Q h\         P                  ! ^y4      pV \         P                  ! 4       J g   Q hWJ g   Q hR# )iy   N)r   r+   gcaax1ax2ax3      r   test_subplot_reuser=      sr    
++c
C#'')
++c
C#'')
++c
C#'')::r   c                  s~   \         P                  ! 4        \         P                  ! 4       p \         P                  ! 4       pV f   Q hWJg   Q h\         P                  ! 4        \         P                  ! 4        \         P                  ! RR7      p \         P                  ! RR7      pV f   Q hWJg   Q h\         P                  ! 4        \         P                  ! 4        \         P                  ! RR7      p \         P                  ! 4       pV f   Q hVP                  R8X  g   Q hWJg   Q h\         P                  ! 4        R # )Npolar
projectionrectilinear)r   figureaxesr4   namer#   r9   r$   r   test_axes_kwargsrF      s    JJL	B
((*C>>==IIKJJL	W	%B
((g
&C>>==IIKJJL	W	%B
((*C>>88}$$$==IIKr   c                  sJ   \         P                  ! 4       p \         P                  ! ^^^4      p\         P                  ! ^^^4      p\         P                  ! ^^^4      p\         P                  ! ^^^RR7      p\         P                  ! ^^^RR7      pVf   Q hW!J g   Q hW1Jg   Q hWAJg   Q hWEJ g   Q hWP                  9   g   Q hW0P                  9   g   Q hW@P                  9   g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hR# )r&   r>   r?   NrA   )r   rB   r+   rC   rD   )r"   r#   r9   r:   r;   Zax4s         r   test_subplot_replace_projectionrG      s     **,C	Q1	B
++aA
C
++aA
C
++aA'
2C
++aA'
2C>>99====::>>((??((??77m###88}$$$88wr   c                  s   \         P                  ! R ^ R7      p \         P                  ! R ^ R7      pWJ g   Q hV P                  4        \         P                  ! R ^R7      pWJg   Q hV \         P                  ! 4       P                  9  g   Q hR# )r>   )r@   Ztheta_offsetN)r   r+   removegcfrC   r8   r<   r   test_subplot_kwarg_collisionrJ      sg    
++q
9C
++q
9C::JJL
++q
9C>>cgginn$$$r   c                  s    \         P                  ! 4        \         P                  ! 4       p \         P                  ! 4       pV f   Q hWJ g   Q h\         P                  ! 4        R # r   )r   rB   r7   r4   rE   r$   r   test_gcarK      s>    JJL	B
'')C>>99IIKr   c                  s   \         P                  ! ^o4      p V \         P                  ! 4       J g   Q hV \         P                  ! ^o4      J g   Q hV P                  4        \         P                  ! ^oRR7      pV\         P                  ! 4       J g   Q hV \         P                  ! 4       P
                  9  g   Q hV\         P                  ! ^o4      J g   Q hVP                  4        \         P                  ! ^oRR7      pV\         P                  ! 4       J g   Q hW!Jg   Q hV\         P                  ! 4       P
                  9  g   Q hR# )o   r>   r?   rA   N)r   r+   r7   rH   rI   rC   r8   r<   r   test_subplot_projection_reuserM      s    
++c
C#'')#++c""""JJL
++cg
.C#'')cgginn$$$#++c""""JJL ++cm
4C#'')>>cgginn$$$r   c                  sh   \         P                  ! ^oRR7      p \         P                  ! ^oRR7      p\         P                  ! ^oRRR7      pWJ g   Q hWJ g   Q h\        P                  ! \        RR7      ;_uu_ 4        \         P                  ! ^oRRR7      pR	R	R	4       R	#   + '       g   i     R	# ; i)
rL   r>   r?   T)r>   )r>   r@   zpolar=True, yet projection='3d'Zmatch3dN)r   r+   r   r)   Z
ValueErrorr8   r<   r    test_subplot_polar_normalizationrP     s    
++cg
.C
++c
&C
++c'
:C::::	z>
@ 
@kk#Td;
@ 
@ 
@ 
@s   <B  B1	c                  s   \        4       p \        P                  ! 4       pV P                  V4       RpV Fi  pVP	                  4        \        P                  ! VR7      pV\        P                  ! 4       J g   Q hVP
                  V8X  g   Q hV P                  V4       Kk  	  \        V 4      ^\        V4      ,           8X  g   Q hR# )aitoffr?   N)rQ   ZhammerZlambertZ	mollweider>   rA   rO   )setr   r+   ZaddrH   rD   len)Zcreated_axesr#   ZprojectionsZproj       r   test_subplot_change_projectionrU     s    5L	BR1K
		[[D)S[[]"""ww$  |C$4 4444r   c                  sV   \         P                  ! R RR4      w  p \        V \        P                  P
                  4      '       g   Q h\         P                  ! RRR4      w  p\        V\        P                  P
                  4      '       g   Q hV P                  VP                  J g   Q hR# )g        g      ?ZrogQ?      ?ZboN)r   r>   Z
isinstancer   linesZLine2DrC   )Zln1Zln2r$   r   test_polar_second_callrX   .  sz    99RT"DCc399++,,,,99T2t$DCc399++,,,,88sxxr   c                  s   \         P                  ! . RO4      p \         P                  ! . ROR7      p\        P                  P	                  VP
                  P                  4       V P
                  P                  4       4       \         P                  ! . RO4      p \         P                  ! . RO. ROR7      p\        P                  P	                  VP
                  P                  4       V P
                  P                  4       4       R# )皙?)ZpositionN)rY   rY   rV   rV   )皙?rZ   皙?r[   )r   rC   nptestingZassert_allcloseZbboxZ
get_points)ZaxrefZaxtestr$   r   test_fallback_positionr^   8  s    HH)*EXX34FJJv{{557$zz4468 HH)*EXX*5IJFJJv{{557$zz4468r   c                  s6   \         P                  ! 4       p V P                  ^4      p\         P                  ! 4        \         P                  ! 4       V 8w  g   Q h\         P                  ! V^,          4      p\         P                  ! 4       V 8X  g   Q hW 8X  g   Q hR# )r'   N)r   rB   
subfiguresrI   )fig1subfigsZcurrentr<   r   %test_set_current_figure_via_subfigurerb   F  sh    ::<Dooa GJJL779jj$G779??r   c                  sV   \         P                  ! 4       p V P                  ^4      pV^ ,          P                  ^RR7      pV^,          P                  ^RR7       \         P                  ! 4       V8w  g   Q h\         P
                  ! V4       \         P                  ! 4       V8X  g   Q hR# )r'   T)ZsqueezeN)r   rB   r_   r!   r7   Zsca)r"   ra   r#   r<   r   "test_set_current_axes_on_subfigurerc   R  sz    
**,CnnQG			Q		-BAJ4(779??GGBK779??r   c                  s    \         P                  ! R 4      p \        P                  P	                  V P
                  RRRP                  R4      ^<R7       R# )IPythonz--pylabz-cZ;)ZtimeoutN)zimport matplotlib.pyplot as pltz<assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON)r   r   r   r]   Zsubprocess_run_helperZstart_ipythonr   )rd   r5   r   test_pylab_integrationre   ^  sN    !!),GKK%% 
 	  & 	r   c                 s   \        \        4      P                  R,          p V P                  4       '       g   \        P
                  ! R4       R pV P                  4       P                  R4      p\        V! V4      4      p\        \        P                  ! 4       4      pVP                  V4      pV'       d   \        RV: 24      hVP                  V4      pV'       d   \        RV: 24      hR# )z6Test that pyplot_summary lists all the plot functions.z#../../../doc/api/pyplot_summary.rstz#Documentation sources not availablec                s,   . pRpV  F  pV'       g   VP                  R4      '       d   RpK&  K(  V'       d   VP                  R4      '       d   KI  V^ ,          P                  4       '       g   RpKj  VP                  VP                  4       4       K  	  V# )a  
Return a list of all the functions that are mentioned in the
autosummary blocks contained in *lines*.

An autosummary block looks like this::

    .. autosummary::
       :toctree: _as_gen
       :template: autosummary.rst
       :nosignatures:

       plot
       plot_date

Fz.. autosummary::Tz   :)Z
startswithZisspaceZappendZstrip)rW   Z	functionsZin_autosummaryZlines   &   r   extract_documented_functionsZ=test_doc_pyplot_summary.<locals>.extract_documented_functionsr  s      	D!??#566%)N 7 tv66Aw((%*N  .  r   r   zsThe following pyplot functions are not listed in the documentation. Please add them to doc/api/pyplot_summary.rst: zThe following functions are listed in the pyplot documentation, but they do not exist in pyplot. Please remove them from doc/api/pyplot_summary.rst: N)r   r   Zparentr	   r   r
   r   r   rR   r   Z_get_pyplot_commandsZ
differenceZAssertionError)Zpyplot_docsrf   rW   Zdoc_functionsZplot_commandsZmissingZextras          r   test_doc_pyplot_summaryrg   l  s    x.''*OOK9:B !!#))$/E4U;<M0023M&&}5GMk 	 $$]3ECCH)MN 	N r   c                  s   \         P                  ! 4        \         P                  ! \        P                  ! ^^
4      4       \         P
                  ! RR7      w  r\        P                  ! V\        P                  ! . \        P                  R7      8H  4      '       g   Q hV. 8X  g   Q h\         P                  ! RR.RR.RR7       \         P                  ! 4       pVP                  RR7      p VP                  RR7      p\        P                  ! V \        P                  ! RR.4      8H  4      '       g   Q hV Uu. uF  q3P                  4       NK  	  upRR.8X  g   Q hR	# u upi )
r&   T)minor)Zdtypeg      @g      @ZaZb)ZticksZlabelsrh   N)r   rB   Zplotr\   ZarangeZxticksallarrayZfloat64Zyticksr7   Z
get_yticksZget_yticklabelsZget_text)Ztick_posZtick_labelsr#   ZlrT   r   test_minor_ticksrk     s    JJLHHRYYq"JJT2H66+"BJJ!??@@@@"JJc3Zc
$?	B}}4}(H$$4$0K66(bhhSz223333"-.+QJJL+.3*<<<.s   9Ec                  s   \         P                  ! R 4       \         P                  ! 4       p \         P                  ! 4       p \        \         P                  ! 4       4      ^8X  g   Q h\         P                  ! R 4       \        \         P                  ! 4       4      ^8X  g   Q h\         P                  ! R4       \        \         P                  ! 4       4      ^8X  g   Q hR# )ZaggZsvgN)r   Zswitch_backendrB   rS   Zget_fignums)r"   r5   r   test_switch_backend_no_closerl     s    u
**,C
**,Cs !Q&&&us !Q&&&us !Q&&&r   c                 s    R V n         R# )TN)_test_was_here)rB   s   &r   figure_hook_examplern     s
     Fr   c                  s    R R./p \         P                  ! V 4      ;_uu_ 4        \        P                  ! 4       pRRR4       XP                  '       g   Q hR#   + '       g   i     L&; i)zfigure.hooksz0matplotlib.tests.test_pyplot:figure_hook_exampleN)r   Z
rc_contextr   rB   rm   )Ztest_rcr"   r$   r   test_figure_hookro     sR     	KLG 
	 	 jjl 
!  
!	 s   AA(	c            	      s8   \         P                  ! ^RR7      p \        P                  ! \        RR7      ;_uu_ 4        \         P                  ! ^\
        P                  ! ^^.4      R7      pRRR4       \        P                  ! \        RR7      ;_uu_ 4        \         P                  ! V \
        P                  ! ^^.4      R7       RRR4       V XJ g   Q h\         P                  ! ^4      pWJ g   Q hR#   + '       g   i     L; i  + '       g   i     LJ; i)r&   )Zfigsizez)Ignoring specified arguments in this callrN   N)r&   r'   )r   rB   r   r   UserWarningr\   rj   )r"   fig2Zfig3r<   r   test_multiple_same_figure_callsrr     s    
**Q
'C	k)T	U	Uzz!RXXq!f%56 
V	k)T	U	U

3!Q 01 
V$;;::a=D;; 
V	U	U	Us   /C6/D	6D		D	c                  s    \         P                  ! 4       p \        P                  ! \        R R7      ;_uu_ 4        \         P                  ! R4      pRRR4       R#   + '       g   i     R# ; i)zcloses all existing figuresrN   ri   N)r   rB   r   r   rp   )r`   rq   r$   r   test_close_all_warningrs     s?    ::<D 
k)F	G	Gzz%  
H	G	G	Gs   AA,	c                  s    \         P                  ! 4       p ^ ^.^^..p\         P                  ! WP                  R7       R# )r    )ZfignumN)r   rB   ZmatshowZnumber)r"   Zarrr$   r   test_matshowrt     s1    
**,Cq6Aq6
C KKJJ'r   )+r   Znumpyr\   r   Zpathlibr   r   Z
matplotlibr   Zmatplotlib.testingr   r   r   r   r    r%   r(   r,   r0   r2   r3   r6   r=   rF   rG   rJ   rK   rM   rP   rU   rX   r^   rb   rc   re   rg   rk   rl   rn   ro   rr   rs   rt   r   r   r   <module>ru      s      
    9 $
>!*	(
$ )$XB20%%2	<5  8		5Np='!!(r   