
    fMh                        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dS )	    )annotations)ABCabstractmethod)TYPE_CHECKINGAnyN)	ArrayLike)CoordinateArray
FillReturnFillType
LineReturnLineTypec                  @   e Zd ZdZd?dZe	 	 	 d@dAd            Ze	 	 	 	 	 dBdCd            Ze	 	 	 	 dDdEd%            Ze	 	 dFdGd(            Z		 	 dHdId,Z
	 	 dHdJd/ZedKdLd4            ZedMd6            ZedNd7            ZedHdOd9            Ze	 	 	 	 dPdQd>            ZdS )RRendererz"Abstract base class for renderers.xr   yreturn'tuple[CoordinateArray, CoordinateArray]c                    t          j        |          }t          j        |          }|j        dk    rt          j        ||          \  }}||fS )N   )npasarrayndimmeshgrid)selfr   r   s      W/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/contourpy/util/renderer.py_grid_as_2dzRenderer._grid_as_2d   sE    JqMMJqMM6Q;;;q!$$DAq!t    r   C0ffffff?filledr
   	fill_typeFillType | straxr   colorstralphafloatNonec                    d S N )r   r    r!   r#   r$   r&   s         r   r    zRenderer.filled   	     	r   black皙?Npoint_color
str | Nonequad_as_tri_alphac                    d S r*   r+   )r   r   r   r#   r$   r&   r/   r1   s           r   gridzRenderer.grid%   	     	r         ?r   linesr   	line_typeLineType | str	linewidthc                    d S r*   r+   )r   r6   r7   r#   r$   r&   r9   s          r   r6   zRenderer.lines2   s	     	r   z'ArrayLike | np.ma.MaskedArray[Any, Any]c                    d S r*   r+   )r   r   r   r;   r#   r$   s         r   maskzRenderer.mask>   r,   r   multi_filledlist[FillReturn]kwargsc                x    |||d<   t          |          D ]"\  }}|d|dz   |d<    | j        |||fi | #dS )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   r?   r!   r#   r$   rA   ir    s           r   r?   zRenderer.multi_filledI   sq    4 #F7O"<00 	9 	9IAv}".a"f,,wDK	2888888	9 	9r   multi_lineslist[LineReturn]c                x    |||d<   t          |          D ]"\  }}|d|dz   |d<    | j        |||fi | #dS )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$   rC   rD   )rE   r6   )r   rG   r7   r#   r$   rA   rF   r6   s           r   rG   zRenderer.multi_linesj   sq    4 #F7O!+.. 	7 	7HAu}".a"f,,wDJui66v6666	7 	7r   Ffilenametransparentboolc                    d S r*   r+   )r   rJ   rK   s      r   savezRenderer.save       r   
io.BytesIOc                    d S r*   r+   r   s    r   save_to_bufferzRenderer.save_to_buffer   rO   r   c                    d S r*   r+   rR   s    r   showzRenderer.show   rO   r   titlec                    d S r*   r+   )r   rV   r#   r$   s       r   rV   zRenderer.title   rO   r   green.1ffmtquad_as_tric                    d S r*   r+   )r   r   r   r;   r#   r$   rZ   r[   s           r   z_valueszRenderer.z_values   r4   r   )r   r   r   r   r   r   )r   r   r   )r    r
   r!   r"   r#   r   r$   r%   r&   r'   r   r(   )r   r-   r.   Nr   )r   r   r   r   r#   r   r$   r%   r&   r'   r/   r0   r1   r'   r   r(   )r   r   r5   r   )r6   r   r7   r8   r#   r   r$   r%   r&   r'   r9   r'   r   r(   )r   r-   )r   r   r   r   r;   r<   r#   r   r$   r%   r   r(   )r   N)r?   r@   r!   r"   r#   r   r$   r0   rA   r   r   r(   )rG   rH   r7   r8   r#   r   r$   r0   rA   r   r   r(   )F)rJ   r%   rK   rL   r   r(   )r   rP   )r   r(   )rV   r%   r#   r   r$   r0   r   r(   )r   rX   rY   F)r   r   r   r   r;   r   r#   r   r$   r%   rZ   r%   r[   rL   r   r(   )__name__
__module____qualname____doc__r   r   r    r3   r6   r>   r?   rG   rN   rS   rU   rV   r]   r+   r   r   r   r      s       ,,    
     ^ 
 "&#$
 
 
 
 ^
 
 	 	 	 	 ^	      ^  9 9 9 9 9J  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>ri      s    " " " " " " # # # # # # # # % % % % % % % %     aIII&&&&&&``````````````V V V V Vs V V V V Vr   