
    g                        d dl mZ d dlmZmZ d dlmZmZ d dlZ	erd dl
Z
d dlmZ d dlmZmZmZmZmZ  G d de      Zy)	    )annotations)ABCabstractmethod)TYPE_CHECKINGAnyN)	ArrayLike)CoordinateArray
FillReturnFillType
LineReturnLineTypec                     e Zd ZdZddZe	 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd       Ze	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd       Ze	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dd       Ze	 	 d	 	 	 	 	 	 	 	 	 	 	 dd       Z		 	 d	 	 	 	 	 	 	 	 	 	 	 ddZ
	 	 d	 	 	 	 	 	 	 	 	 	 	 dd	Zeddd
       Zedd       Zedd       Zeddd       Ze	 	 	 	 d 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d       Zy)"Rendererz"Abstract base class for renderers.c                    t        j                  |      }t        j                  |      }|j                  dk(  rt        j                  ||      \  }}||fS )N   )npasarrayndimmeshgrid)selfxys      T/var/www/dash_apps/app1/venv/lib/python3.12/site-packages/contourpy/util/renderer.py_grid_as_2dzRenderer._grid_as_2d   sD    JJqMJJqM66Q;;;q!$DAq!t    c                     y N )r   filled	fill_typeaxcoloralphas         r   r   zRenderer.filled        	r   Nc                     y r   r   )r   r   r   r!   r"   r#   point_colorquad_as_tri_alphas           r   gridzRenderer.grid%        	r   c                     y r   r   )r   lines	line_typer!   r"   r#   	linewidths          r   r+   zRenderer.lines2   s     	r   c                     y r   r   )r   r   r   zr!   r"   s         r   maskzRenderer.mask>   r$   r   c                |    |||d<   t        |      D ]'  \  }}|d|dz   |d<    | j                  |||fi | ) y)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   r5   zRenderer.multi_filledI   sZ    4 #F7O"<0 	9IAv}$%a"fX,wDKK	288	9r   c                |    |||d<   t        |      D ]'  \  }}|d|dz   |d<    | j                  |||fi | ) y)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"   r2   r3   )r4   r+   )r   multi_linesr,   r!   r"   r6   r7   r+   s           r   r9   zRenderer.multi_linesj   sZ    4 #F7O!+. 	7HAu}$%a"fX,wDJJui6v6	7r   c                     y r   r   )r   filenametransparents      r   savezRenderer.save       r   c                     y r   r   r   s    r   save_to_bufferzRenderer.save_to_buffer   r>   r   c                     y r   r   r@   s    r   showzRenderer.show   r>   r   c                     y r   r   )r   titler!   r"   s       r   rE   zRenderer.title   r>   r   c                     y r   r   )r   r   r   r/   r!   r"   fmtquad_as_tris           r   z_valueszRenderer.z_values   r)   r   )r   r   r   r   returnz'tuple[CoordinateArray, CoordinateArray])r   C0gffffff?)r   r
   r    FillType | strr!   r   r"   strr#   floatrJ   None)r   blackg?Nr   )r   r   r   r   r!   r   r"   rM   r#   rN   r&   
str | Noner'   rN   rJ   rO   )r   rK   g      ?r   )r+   r   r,   LineType | strr!   r   r"   rM   r#   rN   r-   rN   rJ   rO   )r   rP   )r   r   r   r   r/   z'ArrayLike | np.ma.MaskedArray[Any, Any]r!   r   r"   rM   rJ   rO   )r   N)r5   zlist[FillReturn]r    rL   r!   r   r"   rQ   r6   r   rJ   rO   )r9   zlist[LineReturn]r,   rR   r!   r   r"   rQ   r6   r   rJ   rO   )F)r;   rM   r<   boolrJ   rO   )rJ   z
io.BytesIO)rJ   rO   )rE   rM   r!   r   r"   rQ   rJ   rO   )r   greenz.1fF)r   r   r   r   r/   r   r!   r   r"   rM   rG   rM   rH   rS   rJ   rO   )__name__
__module____qualname____doc__r   r   r   r(   r+   r0   r5   r9   r=   rA   rC   rE   rI   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>r`      s.    " # % &``Vs Vr   