+
     ]i  c                   s   R t ^ 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IHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHtHt ^ RIt^ RIHt ^ RIHt RR lt ]PB                  PE                  RRRRRRR]PF                  ! RRR]].R7      RR]PF                  ! RRR]R7      .
4      R 4       t$]PB                  PE                  RRR .4      R 4       t%R# )!z
Test output reproducibility.
N)pyplot)get_sample_data)PathCollection)	BboxImage)AnchoredOffsetboxAuxTransformBox)Circle	PathPatch)Path)subprocess_run_for_testing)needs_ghostscriptneeds_usetex)TextPath)IdentityTransformmhipc           
      s
   \         P                  ! V4       \         P                  P                  R RRV/4       \        P
                  ! 4       pRV 9   d   VP                  ^^^4      p\        ^
4      pVP                  V^.^
,          RR7       VP                  V^.^
,          RR7       VP                  V^.^
,          RR7       VP                  V^.^
,          RR7       VP                  V^.^
,          R	R7       R
V 9   d   VP                  ^^^4      pVP                  \        ^^4      \        ^^4      4      VP                  \        ^^4      ^.^,          \        ^^4      R7      ,           pVP                  . R,O4       R-p\        Wx4       F  w  rV	P                  V
4       K  	  RV 9   d   . R.O. R/O. R0O.pVP                  ^^^4      P                  VRR7       . R1O. R.O. R0O.pVP                  ^^^4      P                  VRR7       . R/O. R.O. R2O.pVP                  ^^^4      P                  VRR7       RV 9   Ed    ! R R\        4      pVP                  RR7      pVP                  ^..4      pVP                  \!        R3RR7      4       VP#                  ^4      w  rF\        P$                  ! \'        R4      4      p\)        R4R^R7      pV! VVRR7      p\+        \-        4       4      pVP/                  V4       \1        RVRR R!7      pVP/                  V4       \2        P4                  ! 4       P7                  4       pV;P8                  ^,          un        V;P8                  ^,          un        \2        P:                  ! 4       P7                  4       pVP8                  R"R"R51,          Vn        \2        P<                  ! VV4      p\2        P>                  ! ^4      P7                  4       pV;P8                  R#,          un        VP#                  ^^RRR$7      w  ppVV3 F  pVw  rF\A        V.^R%R&R'RR(7      pVP                  VVPB                  4       VPE                  V4       \        V^R%R&R'RR(7      pVP                  VVPB                  4       VPG                  V4       VPI                  R6^.4       VPK                  R6^.4       K  	  \        ^4      pVP                  ^^^4      pVP                  WU4       VPM                  R)4       VPO                  R)4       VPQ                  R)4       \S        \T        PV                  R*\T        PV                  4      pVPY                  VVR+7       R"# )7zsvg.hashsaltZasdfztext.usetexmZD)ZmarkerxZ^ZHZvh)Zbottom*iZnearest)ZinterpolationZbilinearZbicubicpc                   sR   a a ] tR t^@t oRtV 3R ltV 3R ltRV 3R lltRtVt	V ;t
# )+_save_figure.<locals>.PathClippedImagePatchz
The given image is used to draw the face of the patch. Internally,
it uses BboxImage whose clippath set to the path of the patch.

FIXME : The result is currently dpi dependent.
c                s   < \         SV `  ! V3/ VB  \        V P                  R R R7      V n        V P                  P                  V4       R # )N)ZnormZorigin)super__init__r   Zget_window_extent
bbox_imageZset_data)selfZpathr   Zkwargs	__class__s   &&&,H/usr/lib64/python3.14/site-packages/matplotlib/tests/test_determinism.pyr   Z4_save_figure.<locals>.PathClippedImagePatch.__init__H   sA     00"+**d#D((4    c                s&   < \         SV `  R4       R# )zSimply ignore facecolor.ZnoneN)r   set_facecolor)r   Zcolorr      &&r   r   Z9_save_figure.<locals>.PathClippedImagePatch.set_facecolorN   s    %f-r   c                s   < V P                   P                  V P                  V P                  4       4       V P                   P	                  V4       \
        SV `  V4       R # N)r   set_clip_pathZ_pathZget_transformdrawr   )r   Zrendererr   r   r   r!   Z0_save_figure.<locals>.PathClippedImagePatch.drawR   sB    --djj$:L:L:NO$$X.X&r   )r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno____doc__r   r   r!   Z__static_attributes__Z__classdictcell__Z__classcell__)r   Z__classdict__s   @@r   PathClippedImagePatchr   @   s     5.' 'r   r#   Zpolar)Z
projectiongioT?)Zradiuszgrace_hopper.jpgz!?)ZsizeZk)Zecz
upper leftTg?)ZlocZchildZframeonZ	borderpadNg@)ZsharexZshareyZblueZredgffffff?)ZlwZ	edgecolorZ	facecolorZalphaZhatchzA string $1+2+\sigma$Zbuffer)Zformat)g      ?g      @g      @g      @)Z-Z+r   Z\r   ZoZOZ.)         )r%   r&   r$   )r&   r$   r%   )r$   r&   r%   )r%   r$   r&   )    r$   )r'   r'   ii)-mplZuseZrcParamsZupdatepltZfigureZadd_subplotrangeZplotbarZ
set_xticksZzipZ	set_hatchZimshowr   r    r   ZsubplotsZimreadr   r   r   r   Z
add_artistr   r   Zunit_rectangleZdeepcopyZverticesZunit_circleZmake_compound_pathZunit_regular_starr   Z	transDataZadd_collectionZ	add_patchZset_xlimZset_ylimZ	set_titleZ
set_xlabelZ
set_ylabelZgetattrsysstdoutZsavefig)objectsfmtusetexZfigZax1r   Zax2ZbarsZpatternsr+   ZpatternZAr#   ZpxZpimgZarrZ	text_pathr   Z	offsetboxZaoZexteriorZinteriorZ	clip_pathZstarZrow1Zrow2ZrowZ
collectionZpatchZaxr-   s   &&&                            r   _save_figurer1      s   GGCLLLGH
**,C
g~ooaA&"IQC"HS)QC"HS)QC"HS)QC"HS)QC"HS)
g~ooaA&aU1a[1aaS1WU1a[AB+,</LCMM'" 0 g~	9-1a '''C	9-1a '''D	9-1a '''C
g~	'I 	'2 ___0yy1#6&89 \\!_
jj);<=VT4	!)SS9#$5$78	Q<y$),.r &&(113QQ##%..0$--dd3++Hh?	%%a(113||Aqd|Ct$<CHC'127s#OJ$$Y>z*dqFe$'s4E	3==9MM% LL"a!LL"a!   	aA	Aq	!BGGAMLL)*MM*+MM*+SZZ3::6FKKsK#r   zobjects, fmt, usetexpsT)Zmarkssvgc                s   \        ^4       Uu. uFQ  p\        \        P                  RRRV : RV: RV R2./ \        P
                  CRRRR	/CR
RRR7      P                  NKS  	  ppVR,           FH  pVR8X  d0   V'       d(   WT^ ,          8w  d   \        P                  ! R4       K7  K9  WT^ ,          8X  d   KH  Q h	  R# u upi )a*  
Output three times the same graphs and checks that the outputs are exactly
the same.

Parameters
----------
objects : str
    Objects to be included in the test document: 'm' for markers, 'h' for
    hatch patterns, 'i' for images, and 'p' for paths.
fmt : {"pdf", "ps", "svg"}
    Output format.
-R-czHfrom matplotlib.tests.test_determinism import _save_figure;_save_figure(z, )SOURCE_DATE_EPOCH	946684800
MPLBACKENDAggFT)envtextcapture_outputcheck:r$   NNr2   z+failed, maybe due to ghostscript timestampsN)	r*   r	   r,   
executableosenvironr-   pytestZskip)r.   r/   r0   Z_Zplotsr   s   &&&   r   test_determinism_checkrC      s    H q	 A 	#^^T4$Kr#6(!=>&2:: &2Ku&t4	9 :@	@  
 	 2YY$;6!H}IJ  a= = 	s   AB>zfmt, stringc                s    \        \        P                  RRRV : R2./ \        P                  CRRRR/CR	R
R	R7      P
                  pW9   g   Q hR# )ak  
Test SOURCE_DATE_EPOCH support. Output a document with the environment
variable SOURCE_DATE_EPOCH set to 2000-01-01 00:00 UTC and check that the
document contains the timestamp that corresponds to this date (given as an
argument).

Parameters
----------
fmt : {"pdf", "ps", "svg"}
    Output format.
string : bytes
    Timestamp string for 2000-01-01 00:00 UTC.
r4   r5   zMfrom matplotlib.tests.test_determinism import _save_figure; _save_figure('', r6   r7   r8   r9   r:   TF)r;   r=   r<   r>   N)r	   r,   r?   r@   rA   r-   )r/   ZstringZbufs   && r   "test_determinism_source_date_epochrD      so    0 %	t G1
&	'"rzz ".5"26U$P
 QWPV  ==r   )r   pdfF)Z rE   F)r   rE   F)r   rE   F)r   rE   F)r   r2   F)r   r3   F)r   r3   F)rE   s!   /CreationDate (D:20000101000000Z))r2   s(   %%CreationDate: Sat Jan 01 00:00:00 2000)&r"   r@   r,   rB   Z
matplotlibr(   r    r)   Zmatplotlib.cbookr   Zmatplotlib.collectionsr   Zmatplotlib.imager   Zmatplotlib.offsetboxr   r   Zmatplotlib.patchesr   r   Zmatplotlib.pathr   Zmatplotlib.testingr	   Zmatplotlib.testing._markersr
   r   Zmatplotlib.testing.compareZmatplotlib.textr   Zmatplotlib.transformsr   r1   ZmarkZparametrizeZparamrC   rD   ) r   r   <module>rF      s    
 
   $ , 1 & C 0   9 G ! $ 3r$j D$|5F&G	IVUD=!!> 5
 	<		r   