
    h                        S SK Jr  S SKJrJr  S SKJrJr  S SKr	\(       a  S SK
r
S SKJr  S SKJrJrJrJrJr   " S S\5      rg)	    )annotations)ABCabstractmethod)TYPE_CHECKINGAnyN)	ArrayLike)CoordinateArray
FillReturnFillType
LineReturnLineTypec                     \ rS rSrSrSS jr\   S           SS jj5       r\     S               SS jj5       r\    S             SS jj5       r	\  S           SS jj5       r
  S           SS	 jjr  S           SS
 jjr\SSS jj5       r\SS j5       r\S S j5       r\SS!S jj5       r\    S"               S#S jj5       rSrg)$Renderer   z"Abstract base class for renderers.c                    [         R                  " U5      n[         R                  " U5      nUR                  S:X  a  [         R                  " X5      u  pX4$ )N   )npasarrayndimmeshgrid)selfxys      I/var/www/html/env/lib/python3.13/site-packages/contourpy/util/renderer.py_grid_as_2dRenderer._grid_as_2d   s>    JJqMJJqM66Q;;;q$DAt    c                    g N )r   filled	fill_typeaxcoloralphas         r   r!   Renderer.filled        	r   Nc                    g r   r    )r   r   r   r#   r$   r%   point_colorquad_as_tri_alphas           r   gridRenderer.grid%        	r   c                    g r   r    )r   lines	line_typer#   r$   r%   	linewidths          r   r/   Renderer.lines2   s     	r   c                    g r   r    )r   r   r   zr#   r$   s         r   maskRenderer.mask>   r'   r   c                ~    Ub  XES'   [        U5       H'  u  pgUc  SUS-   3US'   U R                  " XrU40 UD6  M)     g)a  Plot multiple sets of filled contours on a single axes.

Args:
    multi_filled (list of filled contour arrays): Multiple filled contour sets as returned
        by :meth:`.ContourGenerator.multi_filled`.
    fill_type (FillType or str): Type of filled data as returned by
        :attr:`~.ContourGenerator.fill_type`, or string equivalent.
    ax (int or Renderer-specific axes or figure object, optional): Which axes to plot on,
        default ``0``.
    color (str or None, optional): If a string color then this same color is used for all
        filled contours. If ``None``, the default, then the filled contour sets use colors
        from the ``tab10`` colormap in order, wrapping around to the beginning if more than
        10 sets of filled contours are rendered.
    kwargs: All other keyword argument are passed on to
        :meth:`.Renderer.filled` unchanged.

.. versionadded:: 1.3.0
Nr$   C
   )	enumerater!   )r   multi_filledr"   r#   r$   kwargsir!   s           r   r;   Renderer.multi_filledI   sM    4 #7O"<0IA}$%a"fX,wKK288 1r   c                ~    Ub  XES'   [        U5       H'  u  pgUc  SUS-   3US'   U R                  " XrU40 UD6  M)     g)a[  Plot multiple sets of contour lines on a single axes.

Args:
    multi_lines (list of contour line arrays): Multiple contour line sets as returned by
        :meth:`.ContourGenerator.multi_lines`.
    line_type (LineType or str): Type of line data as returned by
        :attr:`~.ContourGenerator.line_type`, or string equivalent.
    ax (int or Renderer-specific axes or figure object, optional): Which axes to plot on,
        default ``0``.
    color (str or None, optional): If a string color then this same color is used for all
        lines. If ``None``, the default, then the line sets use colors from the ``tab10``
        colormap in order, wrapping around to the beginning if more than 10 sets of lines
        are rendered.
    kwargs: All other keyword argument are passed on to
        :meth:`Renderer.lines` unchanged.

.. versionadded:: 1.3.0
Nr$   r8   r9   )r:   r/   )r   multi_linesr0   r#   r$   r<   r=   r/   s           r   r@   Renderer.multi_linesj   sM    4 #7O!+.HA}$%a"fX,wJJu6v6 /r   c                    g r   r    )r   filenametransparents      r   saveRenderer.save       r   c                    g r   r    r   s    r   save_to_bufferRenderer.save_to_buffer   rG   r   c                    g r   r    rI   s    r   showRenderer.show   rG   r   c                    g r   r    )r   titler#   r$   s       r   rP   Renderer.title   rG   r   c                    g r   r    )r   r   r   r4   r#   r$   fmtquad_as_tris           r   z_valuesRenderer.z_values   r-   r   r    )r   r   r   r   returnz'tuple[CoordinateArray, CoordinateArray])r   C0gffffff?)r!   r
   r"   FillType | strr#   r   r$   strr%   floatrW   None)r   blackg?Nr   )r   r   r   r   r#   r   r$   rZ   r%   r[   r)   
str | Noner*   r[   rW   r\   )r   rX   g      ?r   )r/   r   r0   LineType | strr#   r   r$   rZ   r%   r[   r1   r[   rW   r\   )r   r]   )r   r   r   r   r4   z'ArrayLike | np.ma.MaskedArray[Any, Any]r#   r   r$   rZ   rW   r\   )r   N)r;   zlist[FillReturn]r"   rY   r#   r   r$   r^   r<   r   rW   r\   )r@   zlist[LineReturn]r0   r_   r#   r   r$   r^   r<   r   rW   r\   )F)rC   rZ   rD   boolrW   r\   )rW   z
io.BytesIO)rW   r\   )rP   rZ   r#   r   r$   r^   rW   r\   )r   greenz.1fF)r   r   r   r   r4   r   r#   r   r$   rZ   rS   rZ   rT   r`   rW   r\   )__name__
__module____qualname____firstlineno____doc__r   r   r!   r+   r/   r5   r;   r@   rE   rJ   rM   rP   rU   __static_attributes__r    r   r   r   r      s   , 
  " 	
   
  
 "&#$

 
 	

 
 
  
 !
 

 
 
 		 "	 		
 	 	 	 
	 	    3	
   
   9&9 "9 	9
 9 9 
9J  7%7 "7 	7
 7 7 
7B          !

 
 	

 
 
 
 
 

 
r   r   )
__future__r   abcr   r   typingr   r   numpyr   ionumpy.typingr   contourpy._contourpyr	   r
   r   r   r   r   r    r   r   <module>ro      s.    " # % &``Vs Vr   