+
     ]i  c                   s
   ^ 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.RRR7      R	 4       t]! R
.RRR7      R 4       t]! R.RR] P                   ! 4       R8X  d   ^ MRR7      R 4       tR tR tR tR tR tR# )    N)
same_color)image_comparison)art3dzlegend_plot.pngTZmpl20)remove_textstylec                  s
   \         P                  ! \        R R7      R7      w  r\        P                  ! ^
4      pVP                  V^V,
          RRRR7       VP                  W"^,
          RRRR7       VP                  4        R# )	3d
projectionZ
subplot_kwZoyzz=1)zdirlabelzz=-1N)pltsubplotsdictnparangeplotlegend)figaxxs      O/usr/lib64/python3.14/site-packages/mpl_toolkits/mplot3d/tests/test_legend3d.pytest_legend_plotr      s_    lldd&;<GC
		"AGGAq1uc5G1GGA1uc6G2IIK    zlegend_bar.pngc                  s(   \         P                  ! \        R R7      R7      w  r\        P                  ! ^
4      pVP                  W"RRRR7      pVP                  W"RRR1,          RRR	R7      pVP                  V^ ,          V^ ,          .R
R.4       R# )r   r   r	   r
   ZedgeZm)r   ZalignZcolorNr   ZgZupZdown)r   r   r   r   r   Zbarr   )r   r   r   Zb1Zb2s        r   test_legend_barr      sv    lldd&;<GC
		"A	3fC	8B	TrT7F#	>BIIr!ubentVn-r   z	fancy.pngZx86_64gI+?)r   r   Ztolc            	      sD   \         P                  ! \        R R7      R7      w  rVP                  \        P
                  ! ^
4      \        P                  ! ^
^4      \        P                  ! ^
^4      RRR7       VP                  \        P
                  ! ^
4      \        P
                  ! ^
^ R4      RR7       VP                  \        P                  ! ^
^4      \        P
                  ! ^
4      \        P                  ! ^
^
4      RRRR	7       VP                  R
^R^R7       R# )r   r   r	   zo--Zliner   scatter      ?errorbar)ZxerrZzerrr   z
lower leftz	My legend)ZlocZncolsZtitle	numpointsNr   )
r   r   r   r   r   r   Zfullr   r   r   )r   r   s     r   
test_fancyr!      s     lldd&;<GCGGBIIbM2772q>2772q>5GOJJryy}biiAr2)JDKKA		"rwwr2s*  6II,a{aIHr   c                  sb   RR.RR..p RR.RR..RR.RR...pRR.RR..RR.RR...p\         P                  ! V R^R	7      p\         P                  ! VR
R7      p\         P                  ! VRRR	7      p\        P                  ! \	        RR7      R7      w  rgVP                  V4       VP                  V4       VP                  V4       VP                  W4V.. RO4      pVP                  w  rp\        W4V3WV34       F-  w  rVP                  4       ^ ,          VP                  8X  d   K-  Q h	  R# )r    r   333333?皙?gffffff?g?g?g?z--)
linestylesZlwz-.)r$   Z:r   r   r	   N)r    r   )r      )g333333?r"   )r#   r#   )Zline1Zline2zline 3)r   ZLine3DCollectionr   r   r   Zadd_collectionr   legend_handleszipZget_linestylesZ_dash_pattern)Zlines1Zlines2Zlines3Zlc1Zlc2Zlc3r   r   legZh1Zh2Zh3ZohZlhs                 r   !test_linecollection_scaled_dashesr)   )   s8    8X"67FRy2r(#r2hR%9:FRy2r(#r2hR%9:F

 
 DQ
?C

 
 D
9C

 
 CB
?Clldd&;<GCccc
))SsO%A
BC##JBBso|4  "1%)9)9999 5r   c                  s\   \         P                  ! \        R R7      R7      w  rVP                  ^ ^.^ ^.RR7       \        P
                  ! ^ .^ .^ .RR7      .pVP                  VR.^R7      pV^ ,          P                  4       VP                  ^ ,          P                  4       8X  g   Q hR# )r   r   r	   Zv)ZmarkerZAardvark)r    N)	r   r   r   r   r   ZLine3Dr   Z
get_markerr&   )r   r   Zhandlesr(   s       r   test_handlerline3dr*   =   s    lldd&;<GCJJ1v1vcJ*||QC!qc#67G
))Gj\Q)
7C1:  "c&8&8&;&F&F&HHHHr   c            	      s   \         P                  R,          w  rW,          p. ROp\        P                  ! \	        RR7      R7      w  rEVP                  WV. ROVRR7      pVP                  4       w  rxV. RO8X  g   Q h\        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       g   Q h\        ;QJ d%    R	 \        Ws4       4       F  '       d   K   RM	  RM! R	 \        Ws4       4       4      '       g   Q hR
# )r%   
   Nr   r   r	   bothZlevelscolorsZextendc              3   j   "   T F)  p\        V\        P                  P                  4      x  K+  	  R # 5iN)
isinstancemplZlinesZLine2D.0a   & r   	<genexpr>/test_contour_legend_elements.<locals>.<genexpr>P   s$     @1z!SYY--..   13FTc              3   Z   "   T F!  w  r\        VP                  4       V4      x  K#  	  R # 5ir1   )r   Z	get_colorr5   r6   Zc   &  r   r8   r9   Q   s)      1/41 !++-++/   )+Nr+   r+   )bluez#00FF00redr,   i   i2   )z
$x = 10.0$z
$x = 30.0$z
$x = 50.0$)	r   mgridr   r   r   Zcontourlegend_elementsallr'   )	r   r
   hr/   r   r   csartistslabels	            r   test_contour_legend_elementsrK   F   s    88JDA	A'Flldd&;<GC	A!L	OB((*OG????3@@333@@@@@@3 1w/1333 1w/1 1 1 1 1r   c            	      s   \         P                  R,          w  rW,          p\        P                  ! \	        RR7      R7      w  r4VP                  WV. RO. RORR7      pVP                  P                  R4       VP                  P                  R4       VP                  4        VP                  4       w  rgV. RO8X  g   Q hRp\        ;QJ d    R V 4       F  '       d   K   R	M	  R
M! R V 4       4      '       g   Q h\        ;QJ d%    R \        Wh4       4       F  '       d   K   R	M	  R
M! R \        Wh4       4       4      '       g   Q hR# )r+   r   r   r	   r-   r.   rA   r@   c              3   r0   r1   )r2   r3   ZpatchesZ	Rectangler4   r7   r   r8   0test_contourf_legend_elements.<locals>.<genexpr>f   s$     EWz!S[[2233Wr:   FTc              3   r;   r1   )r   get_facecolorr<   r=   r   r8   rL   g   s*      :841 !//+Q//8r>   Nr?   rB   )#FFFF00#FF00FFz#00FFFF)z$x \leq -1e+250s$z$10.0 < x \leq 30.0$z$30.0 < x \leq 50.0$z$x > 1e+250s$)r@   rN   rO   rA   )r   rC   r   r   r   ZcontourfZcmapZset_overZ	set_underZchangedrD   rE   r'   )	r   r
   rF   r   r   rG   rH   rI   Zexpected_colorsrJ   r   test_contourf_legend_elementsrP   U   s   88JDA	Alldd&;<GC	Q1\=" 
 
$B GGUGGfJJL((*OG ' ' ' ' <O3EWE333EWEEEEE3 :w8:333 :w8: : : : :r   c                  s   \         P                  ! . RO. R	O. R
O.4      p \        P                  ! V .RR7      p\        P
                  ! RR/R7      w  r#VP                  R4       VP                  V4      pVP                  4       pVP                  ^ ,          P                  4       VP                  4       8H  P                  4       '       g   Q hR# )r    Zsurfacer   r   r   r	   ZkN)r    r    r    )r    r%   r%   )r%   r    r%   )r   Zasarrayr   ZPoly3DCollectionr   r   Zset_edgecolorZadd_collection3dr   r&   rM   rE   )ZvertsZmeshr   r   Zhandler(   s         r   test_legend_Poly3dCollectionrQ   k   s    JJ	9i89E!!5';Dll|T&:;GCs  &F
))+Cq!//1##%&'*su- - -r   )ZplatformZnumpyr   Z
matplotlibr3   Zmatplotlib.colorsr   Zmatplotlib.testing.decoratorsr   Zmatplotlib.pyplotZpyplotr   Zmpl_toolkits.mplot3dr   r   r   Zmachiner!   r)   r*   rK   rP   rQ   ) r   r   <module>rR      s       ( :  & $%4wG H #$$gF. G. ;-T#++-9auFIFI:(I1:,
-r   