Ë
    µ2Úi"  ã                   óà  — d dl Z d dlZd dlmZ d dlmZ d dlmZ	 d„ Z
 edg«      d„ «       Z edg«      d„ «       Zd„ Z ed	gd
 ej                  «       dk(  rd nd ed¬«      ¬«      d„ «       Z edgd
 ej                  «       dk(  rd nd ed¬«      ¬«      d„ «       Z edgd
d¬«      d„ «       Z edgdd
 ej                  «       dk(  rd nd¬«      d„ «       Z edgdd
¬«      d„ «       Zd „ Zy)!é    N)Úimage_comparisonc                 óR   — | j                  ddd|z   fddt        |dd¬«      ¬«       y )	NÚ ç      à?©r   r   é   ÚbÚk)Ú
arrowstyleÚfcÚec)ÚxyÚxytextÚsizeÚ
arrowprops)ÚannotateÚdict)ÚaxÚtÚrs      úZ/var/www/html/acx/venv/lib/python3.12/site-packages/matplotlib/tests/test_arrow_patches.pyÚ
draw_arrowr      s2   € Ø‡K�K�˜˜S 1™W�~¨j¸rÜ¨1Ø#&¨3ô0ð õ 1ó    Úfancyarrow_test_imagec            	      óZ  — g d¢} ddt         j                  j                  «       g}t        j                  t        |«      t        | «      ddt        d¬«      ¬«      \  }}t        | «      D ]?  \  }}t        |«      D ],  \  }}|||f   }t        |||«       |j                  dd¬	«       Œ. ŒA y )
N)çš™™™™™Ù?ç333333Ó?çš™™™™™É?çš™™™™™¹?r   ÚfancyÚsimpleF)é   g      @é   )Úaspect)ÚsqueezeÚfigsizeÚ
subplot_kw)Ú	labelleftÚlabelbottom)
ÚmpatchesÚ
ArrowStyleÚFancyÚpltÚsubplotsÚlenr   Ú	enumerater   Útick_params)	r   r   ÚfigÚaxsÚi_rÚr1Úi_tÚt1r   s	            r   Útest_fancyarrowr8      s§   € ò 	 €AØ	�(œH×/Ñ/×5Ñ5Ó7Ð8€Aä�|‰|œC ›F¤C¨£F°EØ$,¼ÀQ¼ôI�H€Cˆô ˜Q“<ò ?‰ˆˆRÜ  “|ò 	?‰GˆC�Ø�S˜#�X‘ˆBÜ�r˜2˜rÔ"Ø�N‰N U¸ˆNÕ>ñ	?ñ?r   zboxarrow_test_image.pngc                  óP  — t         j                  j                  «       } t        | «      }d}||z  dz   }t	        j
                  d|dz  f¬«      }d}t        t        | «      «      D ]?  \  }}|j                  d||z
  |z  dz
  |z  |d||j                  t        |dd	¬
«      ¬«       ŒA y )Ng333333ó?r   gUUUUUU@g      ø?©r&   g™™™™™™5@ÚcenterÚwr
   )Úboxstyler   r   )Úhar   Ú	transformÚbbox)r*   ÚBoxStyleÚ
get_stylesr/   r-   Úfigurer0   ÚsortedÚtextÚtransFigurer   )ÚstylesÚnÚspacingÚ	figheightr2   ÚfontsizeÚiÚ	stylenames           r   Útest_boxarrowrN      s²   € ô ×Ñ×)Ñ)Ó+€FäˆF‹€AØ€Gà�W‘˜rÑ!€IÜ
�*‰*˜g y°3¡Ð7Ô
8€Cà€Hä!¤&¨£.Ó1ò @‰ˆˆ9Ø�‰�˜˜A™ Ñ(¨3Ñ.°	Ñ9¸9ØØØŸ?™?Ü I°#¸#Ô>ð	 	õ 	@ñ@r   c            	      óô   — t        j                  ddd¬«      } | j                  «       }|j                  ddg«       |j	                  ddg«       |j                  t        j                  ddd	d
d¬«      «       | S )zý
    Convenience function that prepares and returns a FancyArrowPatch. It aims
    at being used to test that the size of the arrow head does not depend on
    the DPI value of the exported picture.

    NB: this function *is not* a test in itself!
    Úfancyarrow_dpi_cor_test)é   é   é2   )r&   Údpir   r#   )r   r   )çš™™™™™é?g333333ã?rR   ú->éd   )ÚposAÚposBÚlwr   Úmutation_scale)r-   rC   Úadd_subplotÚset_xlimÚset_ylimÚ	add_patchr*   ÚFancyArrowPatch)Úfig2r   s     r   Ú!__prepare_fancyarrow_dpi_cor_testrb   3   sq   € ô �:‰:Ð/¸ÀRÔH€DØ	×	Ñ	Ó	€BØ‡K�K��A�ÔØ‡K�K��A�ÔØ‡L�L”×)Ñ)¨zÀ
Ø-.¸4Ø9<ô>ô ?ð €Kr   zfancyarrow_dpi_cor_100dpi.pngTÚx86_64g{®Gáz”?rW   )rT   )Úremove_textÚtolÚsavefig_kwargc                  ó   — t        «        y)a   
    Check the export of a FancyArrowPatch @ 100 DPI. FancyArrowPatch is
    instantiated through a dedicated function because another similar test
    checks a similar export but with a different DPI value.

    Remark: test only a rasterized format.
    N©rb   © r   r   Útest_fancyarrow_dpi_cor_100dpirj   E   s
   € ô &Õ'r   zfancyarrow_dpi_cor_200dpi.pngéÈ   c                  ó   — t        «        y)z
    As test_fancyarrow_dpi_cor_100dpi, but exports @ 200 DPI. The relative size
    of the arrow head should be the same.
    Nrh   ri   r   r   Útest_fancyarrow_dpi_cor_200dpirm   T   s
   € ô &Õ'r   zfancyarrow_dash.pngÚdefault)rd   Ústylec            
      óê   — t        j                  «       \  } }t        j                  dddddddd¬	«      }t        j                  dddd
dddd¬	«      }|j	                  |«       |j	                  |«       y )N)r   r   r   z-|>zangle3,angleA=0,angleB=90g      $@é   Údashedr
   )r   Úconnectionstyler[   Ú	linewidthÚ	linestyleÚcolorÚangle3Údotted)r-   r.   r*   r`   r_   )r2   r   ÚeÚe2s       r   Útest_fancyarrow_dashr{   `   sx   € ä�l‰l‹n�G€CˆÜ× Ñ  ¨Ø,1Ø1LØ04Ø+,Ø+3Ø'*ô	,€Aô 
×	!Ñ	! &¨*Ø-2Ø2:Ø15Ø,-Ø,4Ø(+ô
-€Bð ‡L�L�„OØ‡L�L�Õr   zarrow_styles.pngÚmpl20g{®Gázt?)ro   rd   re   c                  óè  — t         j                  j                  «       } t        | «      }t	        j
                  d¬«      \  }}|j                  dd«       |j                  d|«       |j                  dddd¬«       t        t        | «      «      D ]E  \  }}t        j                  d|dz  d	z  z   |fd
|dz  d	z  z   |f|d¬«      }|j                  |«       ŒG t        g d¢«      D ]‹  \  }}|}|d   dk7  r|dz  }|d   dk7  r|dz  }t        ddg«      D ]Z  \  }}	|j                  dt        |	«      «      }
t        j                  dd|z  |z   fdd|z  |z   f|
d¬«      }|j                  |«       Œ\ Œ� y )N)r"   r"   r:   r   r#   éÿÿÿÿ)ÚleftÚrightÚbottomÚtopr   rq   gš™™™™™©?gÍÌÌÌÌÌÜ?é   )r   r[   )z]-[z]-z-[z|-|ú-z,angleA=ANGLEz,angleB=ANGLEiâÿÿÿé<   ÚANGLEgš™™™™™á?gÍÌÌÌÌÌì?)r*   r+   rB   r/   r-   r.   r]   r^   Úsubplots_adjustr0   rD   r`   r_   ÚreplaceÚstr)rG   rH   r2   r   rL   rM   Úpatchro   ÚjÚangler   s              r   Útest_arrow_stylesr�   u   sŒ  € ô × Ñ ×+Ñ+Ó-€FäˆF‹€AÜ�l‰l 6Ô*�G€CˆØ‡K�K��1ÔØ‡K�K��AÔØ×Ñ˜Q a°°qÐÔ9ä!¤&¨£.Ó1ò ‰ˆˆ9Ü×(Ñ(¨#°°Q±¸±Ñ*<¸aÐ)@Ø*.°!°a±%¸±Ñ*=¸qÐ)AØ4=Ø8:ô<ˆð 	�‰�UÕðô "Ò"<Ó=ò  ‰ˆˆ9ØˆØ�Q‰<˜3ÒØ�_Ñ$ˆEØ�R‰=˜CÒØ�_Ñ$ˆEä! 3¨ )Ó,ò 	 ‰HˆAˆuØŸ™ w´°E³
Ó;ˆJÜ×,Ñ,¨d°A°a±C¸!±G¨_¸sÀAÀaÁCÈ!ÁG¸nØ8BØ<>ô@ˆEð �L‰L˜Õñ	 ñ r   zconnection_styles.png)ro   rd   c                  ól  — t         j                  j                  «       } t        | «      }t	        j
                  d¬«      \  }}|j                  dd«       |j                  d|«       t        t        | «      «      D ]7  \  }}t        j                  d|fd|dz   fd	|d
¬«      }|j                  |«       Œ9 y )N)é   é
   r:   r   r#   r~   r   rU   r   rV   rƒ   )r   rs   r[   )r*   ÚConnectionStylerB   r/   r-   r.   r]   r^   r0   rD   r`   r_   )rG   rH   r2   r   rL   rM   rŠ   s          r   Útest_connection_stylesr’   –   s    € ä×%Ñ%×0Ñ0Ó2€FäˆF‹€AÜ�l‰l 7Ô+�G€CˆØ‡K�K��1ÔØ‡K�K��AÔä!¤&¨£.Ó1ò ‰ˆˆ9Ü×(Ñ(¨#¨q¨°C¸¸S¹°>Ø48Ø9BØ8:ô<ˆð 	�‰�UÕñr   c                  óÐ  — t         j                  j                  dd¬«      } t        j                  dd| ¬«      }t	        j
                  t        «      5  t        j                  «       j                  |«       d d d «       t         j                  j                  dd¬«      }t        j                  dd|¬«      }t        j                  «       j                  |«       y # 1 sw Y   ŒfxY w)Né   rk   )ÚangleAÚangleB)r   r   r   )rs   gÍÌÌÌÌüh@)
r*   r‘   ÚAngle3r`   ÚpytestÚraisesÚ
ValueErrorr-   Úgcar_   )Úconn_style_1Úp1Úconn_style_2Úp2s       r   Útest_invalid_intersectionr    §   s³   € Ü×+Ñ+×2Ñ2¸"ÀSÐ2ÓI€LÜ	×	!Ñ	! (¨HØ2>ô
@€Bä	�‰”zÓ	"ñ  Ü�‰‹	×Ñ˜BÔ÷ ô ×+Ñ+×2Ñ2¸"ÀUÐ2ÓK€LÜ	×	!Ñ	! (¨HØ2>ô
@€Bä‡G�GƒI×Ñ˜Õ÷ ð  ús   Á$CÃC%)r˜   ÚplatformÚmatplotlib.pyplotÚpyplotr-   Úmatplotlib.testing.decoratorsr   Úmatplotlib.patchesÚpatchesr*   r   r8   rN   rb   Úmachiner   rj   rm   r{   r�   r’   r    ri   r   r   ú<module>r¨      s]  ðÛ Û Ý Ý :Ý %ò1ñ Ð*Ð+Ó,ñ?ó -ð?ñ Ð,Ð-Ó.ñ@ó /ð@ò(ñ$ Ð2Ð3ÀØ+˜8×+Ñ+Ó-°Ò9‘a¸tÙ $¨¤ô/ñ	(ó/ð	(ñ Ð2Ð3ÀØ+˜8×+Ñ+Ó-°Ò9‘a¸tÙ $¨¤ô/ñ(ó/ð(ñ Ð(Ð)°tÀ9ÔMñó Nðñ( Ð%Ð&¨gÀ4Ø+˜8×+Ñ+Ó-°Ò9‘a¸uôFñ óFð ñ> Ð*Ð+°7ÈÔMñó Nðó 
r   