ó
    {ñ:i  ã                   ó²  • S r SSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJrJr  SSKJrJr  SS	KJr  SS
KJr  SSKJrJr  SSKrSSKJr  SSKJr  SS jr \RB                  RE                  SSSSSSS\RF                  " SSS\\/S9SS\RF                  " SSS\S9/
5      S 5       r$\RB                  RE                  SSS /5      S! 5       r%g)"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           
      ó&
  • [         R                  " U5        [         R                  R                  SUS.5        [        R
                  " 5       nSU ;   a‡  UR                  SSS5      n[        S5      nUR                  US/S-  SS9  UR                  US	/S-  S
S9  UR                  US/S-  SS9  UR                  US/S-  SS9  UR                  US/S-  SS9  SU ;   a�  UR                  SSS	5      nUR                  [        SS5      [        SS5      5      UR                  [        SS5      S/S-  [        SS5      S9-   nUR                  / SQ5        Sn[        Xx5       H  u  pšU	R                  U
5        M     SU ;   a„  / SQ/ SQ/ SQ/nUR                  SSS5      R                  USS9  / SQ/ SQ/ SQ/nUR                  SSS5      R                  USS9  / SQ/ SQ/ SQ/nUR                  SSS5      R                  USS9  SU ;   Gah   " S  S![        5      nUR                  S"S#9nUR                  S	//5      nUR                  [!        S$S%S&95        UR#                  S	5      u  pF[        R$                  " ['        S'5      5      n[)        S(S)S*S+9nU" UUS,S-9n[+        [-        5       5      nUR/                  U5        [1        S.US/S0S19nUR/                  U5        [2        R4                  " 5       R7                  5       nU=R8                  S-  sl        U=R8                  S	-  sl        [2        R:                  " 5       R7                  5       nUR8                  S S S22   Ul        [2        R<                  " UU5      n[2        R>                  " S5      R7                  5       nU=R8                  S3-  sl        UR#                  S	S	S/S/S49u  nnUU4 H¤  nUu  pF[A        U/SS5S6S7S8S99nUR                  UURB                  5        URE                  U5        [        USS5S6S7S8S99nUR                  UURB                  5        URG                  U5        URI                  S:S/5        URK                  S:S/5        M¦     [        S5      nUR                  SSS5      nUR                  XU5        URM                  S;5        URO                  S;5        URQ                  S;5        [S        [T        RV                  S<[T        RV                  5      nURY                  UUS=9  g )>NÚasdf)zsvg.hashsaltztext.usetexÚmé   é   é
   ÚD)Úmarkeré   Úxé   Ú^é   ÚHé   ÚvÚh)Úbottom)g      ø?g      @g      @g      @)Ú-Ú+r   Ú\Ú*ÚoÚOÚ.Úi)r   r   r   )r   r   r   )r   r   r   Únearest)Úinterpolation)r   r   r   Úbilinear)r   r   r   ÚbicubicÚpc                   óH   ^ • \ rS rSrSrU 4S jrU 4S jrSU 4S jjrSrU =r	$ )Ú+_save_figure.<locals>.PathClippedImagePatché@   z³
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                 ó’   >• [         TU ]  " U40 UD6  [        U R                  S S S9U l        U R                  R                  U5        g )N)ÚnormÚorigin)ÚsuperÚ__init__r   Úget_window_extentÚ
bbox_imageÚset_data)ÚselfÚpathr:   ÚkwargsÚ	__class__s       €Úd/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/matplotlib/tests/test_determinism.pyr8   Ú4_save_figure.<locals>.PathClippedImagePatch.__init__H   sA   ø€ Ü‘Ò  Ñ0¨Ò0Ü"+Ø×*Ñ*°¸dñ#D�”à—‘×(Ñ(¨Õ4ó    c                 ó$   >• [         TU ]  S5        g)zSimply ignore facecolor.ÚnoneN)r7   Úset_facecolor)r<   Úcolorr?   s     €r@   rE   Ú9_save_figure.<locals>.PathClippedImagePatch.set_facecolorN   s   ø€ ä‘Ñ% fÕ-rB   c                 óÂ   >• U R                   R                  U R                  U R                  5       5        U R                   R	                  U5        [
        TU ]  U5        g ©N)r:   Úset_clip_pathÚ_pathÚget_transformÚdrawr7   )r<   Úrendererr?   s     €r@   rM   Ú0_save_figure.<locals>.PathClippedImagePatch.drawR   sB   ø€ à—‘×-Ñ-¨d¯j©j¸$×:LÑ:LÓ:NÔOØ—‘×$Ñ$ XÔ.Ü‘‘˜XÕ&rB   )r:   rI   )
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r8   rE   rM   Ú__static_attributes__Ú__classcell__)r?   s   @r@   ÚPathClippedImagePatchr2   @   s   ø† ñõ5õ.÷'õ 'rB   rW   Úpolar)Ú
projection)r   r   gioð…ÉTÕ?)Úradiuszgrace_hopper.jpg)r   r   z!?é–   )ÚsizeÚk)Úecz
upper leftTgš™™™™™É?)ÚlocÚchildÚframeonÚ	borderpadéÿÿÿÿgÍÌÌÌÌÌ@)ÚsharexÚshareyÚblueÚredgffffffæ?r'   )ÚlwÚ	edgecolorÚ	facecolorÚalphaÚhatchéýÿÿÿzA string $1+2+\sigma$Úbuffer)Úformat)-ÚmplÚuseÚrcParamsÚupdateÚpltÚfigureÚadd_subplotÚrangeÚplotÚbarÚ
set_xticksÚzipÚ	set_hatchÚimshowr
   rJ   r	   ÚsubplotsÚimreadr   r   r   r   Ú
add_artistr   r   Úunit_rectangleÚdeepcopyÚverticesÚunit_circleÚmake_compound_pathÚunit_regular_starr   Ú	transDataÚadd_collectionÚ	add_patchÚset_xlimÚset_ylimÚ	set_titleÚ
set_xlabelÚ
set_ylabelÚgetattrÚsysÚstdoutÚsavefig)ÚobjectsÚfmtÚusetexÚfigÚax1r   Úax2ÚbarsÚpatternsry   ÚpatternÚArW   ÚpxÚpimgÚarrÚ	text_pathr0   Ú	offsetboxÚaoÚexteriorÚinteriorÚ	clip_pathÚstarÚrow1Úrow2ÚrowÚ
collectionÚpatchÚaxr‘   s                                  r@   Ú_save_figurer­      s…  € Ü‡G‚GˆC„LÜ‡L�L×Ñ¨ÀÑGÔHä
�*Š*‹,€Cà
ˆgƒ~à�o‰o˜a  AÓ&ˆÜ�"‹IˆØ�‰��Q�C˜"‘H SˆÑ)Ø�‰��Q�C˜"‘H SˆÑ)Ø�‰��Q�C˜"‘H SˆÑ)Ø�‰��Q�C˜"‘H SˆÑ)Ø�‰��Q�C˜"‘H SˆÑ)à
ˆgƒ~à�o‰o˜a  AÓ&ˆØ—‘œ˜a ›¤U¨1¨a£[Ó1Ø—‘œ˜a › a S¨1¡W´U¸1¸a³[�ÐAñBˆà�‰Ò+Ô,à<ˆÜ Ö/‰LˆCØ�M‰M˜'Ö"ñ 0ð ˆgƒ~âš	¢9Ð-ˆØ�‰˜˜1˜aÓ ×'Ñ'¨¸Ð'ÑCÚš	¢9Ð-ˆØ�‰˜˜1˜aÓ ×'Ñ'¨¸Ð'ÑDÚš	¢9Ð-ˆØ�‰˜˜1˜aÓ ×'Ñ'¨¸Ð'ÑCà
ˆg„~ô	'¤Iô 	'ð2 �_‰_¨ˆ_Ð0ˆØ�y‰y˜1˜#˜ÓˆØ×Ñœ6 &°Ñ8Ô9ð —\‘\ !“_‰
ˆÜ�jŠjœÐ);Ó<Ó=ˆÜ˜V T°Ñ4ˆ	Ù! )¨S°SÑ9ˆÜ#Ô$5Ó$7Ó8ˆ	Ø×Ñ˜QÔÜ <°yÈ$Ø),ñ.ˆà�‰�rÔô ×&Ò&Ó(×1Ñ1Ó3ˆØ×Ò˜QÑÕØ×Ò˜QÑÕÜ×#Ò#Ó%×.Ñ.Ó0ˆØ$×-Ñ-©d°¨dÑ3ˆÔÜ×+Ò+¨H°hÓ?ˆ	ä×%Ò% aÓ(×1Ñ1Ó3ˆØ�Š˜Ñ�à—|‘| A q°¸d�|ÐC‰ˆˆtØ˜$“<ˆCØ‰HˆCÜ'¨¨°1ÀØ27¸sÈ#ñOˆJà×$Ñ$ Y°·±Ô>Ø×Ñ˜zÔ*ä˜d q°FÀeØ$'¨sñ4ˆEà×Ñ 	¨3¯=©=Ô9Ø�M‰M˜%Ô à�L‰L˜"˜a˜Ô!Ø�L‰L˜"˜a˜Ö!ñ  ô 	ˆa‹€AØ	�‰˜˜A˜qÓ	!€BØ‡G�GˆA„MØ‡L�LÐ)Ô*Ø‡M�MÐ*Ô+Ø‡M�MÐ*Ô+ä”S—Z‘Z ¬3¯:©:Ó6€FØ‡K�K�˜s€KÒ#rB   zobjects, fmt, usetex)Ú ÚpdfF)r   r¯   F)r"   r¯   F)r+   r¯   F)r   r¯   F)r   ÚpsFr°   T)Úmarks)r0   ÚsvgF)r   r²   Fr²   c                 ó^  • [        S5       Vs/ s HM  n[        [        R                  SSSU < SU< SU S3/0 [        R
                  ESSS	.ES
SSS9R                  PMO     nnUSS  H<  nUS:X  a)  U(       a"  XTS   :w  a  [        R                  " S5        M0  M2  XTS   :X  a  M<   e   gs  snf )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   ú-Rú-czHfrom matplotlib.tests.test_determinism import _save_figure;_save_figure(z, Ú)Ú	946684800ÚAgg©ÚSOURCE_DATE_EPOCHÚ
MPLBACKENDFT)ÚenvÚtextÚcapture_outputÚcheckr   Nr°   r   z+failed, maybe due to ghostscript timestamps)	rw   r   r�   Ú
executableÚosÚenvironr‘   ÚpytestÚskip)r“   r”   r•   Ú_Úplotsr0   s         r@   Útest_determinism_checkrÇ   Ž   sÙ   € ôH �q”ó	ò ˆAô 	#Ü�^‰^˜T 4ðØ$™K r¨#©°°6°(¸!ð=ð>ð&”2—:‘:ð &°KØ$ò&à t°4ñ	9÷ :@¹ò	@ñ ð 
ð 	ð �1�2‹YˆØ�$‹;ž6Ø˜!‘H‹}Ü—’ÐIÖJñ ð ˜a™•=Ð �=ò ùò	s   ŽAB*zfmt, string)r¯   s!   /CreationDate (D:20000101000000Z))r°   s(   %%CreationDate: Sat Jan 01 00:00:00 2000c                 ó˜   • [        [        R                  SSSU < S3/0 [        R                  ESSS.ESS	SS
9R
                  nX;   d   eg)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.
r´   rµ   zMfrom matplotlib.tests.test_determinism import _save_figure; _save_figure('', r¶   r·   r¸   r¹   TF)r¼   r¾   r½   r¿   N)r   r�   rÀ   rÁ   rÂ   r‘   )r”   ÚstringÚbufs      r@   Ú"test_determinism_source_date_epochrË   ¼   sj   € ô0 %Ü	�‰˜˜tðØ ™G 1ð
&ð	'ð"Œr�z‰zð "°Ø ò"Ø26¸UÈ$ñP÷
 QWÑPVð ð ‹=Ð‰=rB   )&rT   rÁ   r�   rÃ   Ú
matplotlibrp   r   rt   Úmatplotlib.cbookr   Úmatplotlib.collectionsr   Úmatplotlib.imager   Úmatplotlib.offsetboxr   r   Úmatplotlib.patchesr	   r
   Úmatplotlib.pathr   Úmatplotlib.testingr   Úmatplotlib.testing._markersr   r   Úmatplotlib.testing.compareÚmatplotlib.textr   Úmatplotlib.transformsr   r­   ÚmarkÚparametrizeÚparamrÇ   rË   © rB   r@   Ú<module>rÜ      sç   ðñó 
Û 
ã ã Ý $Ý ,Ý 1Ý &ß Cß 0Ý  Ý 9ß GÛ !Ý $Ý 3ôr$ðj ‡�×ÑØØØØØØØØ�ŠØ�D˜$ |Ð5FÐ&Gñ	IàØØ�Š�V˜U D°Ñ=ðóñ!óð!ð> ‡�×ÑØØ5ð
 	<ðó	ñó	ñrB   