+
     h6  c                  s0   ^ RI Ht ^ RIt^ RIHtHt ^ RIHtHtH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ RIt^ R
IHtHt ^ RIHtHt ^ RIHt ]'       d/   ^ RIHt ^ RI H!t! ^ RIH"t" ^ RI#H$t$ ^ RI%H&t& ^ RI'H(t(H)t) ^ RI*H+t+H,t,  ! R R]4      t-R# )    )annotationsN)TYPE_CHECKINGAny)
export_png
export_svgshow)get_screenshot_as_png)gridplot)Label)
Category10)figure)as_fill_typeas_line_type)filled_to_bokehlines_to_bokeh)Renderer)OutputBackendType)GridPlot)Palette)	ArrayLike)	WebDriver)FillTypeLineType)
FillReturn
LineReturnc                  s   ] tR t^t$ RtR]R&   R]R&   R]R&   R]R	&   R%R
 R lltR R ltR R ltR&R R llt	R'R R llt
R(R R lltR)R R lltR*RR/R R llltRR/R R lltR R ltR+R  R! lltR,R" R# lltR$tR# )-BokehRenderera  Utility renderer using Bokeh to render a grid of plots over the same (x, y) range.

Args:
    nrows (int, optional): Number of rows of plots, default ``1``.
    ncols (int, optional): Number of columns of plots, default ``1``.
    figsize (tuple(float, float), optional): Figure size in inches (assuming 100 dpi), default
        ``(9, 9)``.
    show_frame (bool, optional): Whether to show frame and axes ticks, default ``True``.
    want_svg (bool, optional): Whether output is required in SVG format or not, default
        ``False``.

Warning:
    :class:`~.BokehRenderer`, unlike :class:`~.MplRenderer`, needs to be told in advance if
    output to SVG format will be required later, otherwise it will assume PNG output.
zlist[figure]_figuresr   _layoutr   _palettebool	_want_svgc               s0    V ^8  d   QhRRRRRRRRRRR	R
/# )   nrowsintncolsfigsizeztuple[float, float]
show_framer   want_svgreturnNone Zformat   "D/usr/lib64/python3.14/site-packages/contourpy/util/bokeh_renderer.py__annotate__BokehRenderer.__annotate__2   sN     I II I %	I
 I I 
I    c                	s6   WPn         \        ^
,          V n        ^d\        P                  ! V\
        R7      ,          pW,          p. V n        V P                   '       d   RMRp\        V4       Fn  p	\        VR7      p
RV
P                  n
        RV
P                  n
        V P                  P                  V
4       V'       d   KV  RV
n        RV
P                  n
        Kp  	  \        V P                  VRV^ ,          V,          V^,          V,          R7      V n        R# )i
   )ZdtypeZsvgZcanvas)Zoutput_backendFN)r#   Ztoolbar_locationZwidthZheight)r   r
   r   npasarrayr"   r   ranger   ZxgridZvisibleZygridZappendZoutline_line_coloraxisr   r   )selfr!   r#   r$   r%   r&   Z
total_sizeZnfiguresZbackendZ_figs   &&&&&&     r,   __init__ZBokehRenderer.__init__2   s     ""2G377
;.2nnnU(xA0C %CII %CIIMM  %:)-&#(  !  MMQ-5(A%1GIr/   c               s     V ^8  d   QhRRRR/# )r    colorstrr'   r)   r*   r+   r,   r-   r.   O   s      C C r/   c                	s    \        V\        4      '       d4   V^ ,          R8X  d&   \        VR,          4      pV P                  V,          pV# )r    ZC   NN)
isinstancer8   r"   r   )r4   r7   Zindexs   && r,   _convert_colorZBokehRenderer._convert_colorO   s9    eS!!eAh#ob	NEMM%(Er/   c                    V ^8  d   QhRRRR/# )r    axfigure | intr'   r   r)   r*   r+   r,   r-   r.   U   s      l v r/   c                	sX    \        V\        4      '       d   V P                  V,          pV# )N)r;   r"   r   )r4   r>   s   &&r,   _get_figureZBokehRenderer._get_figureU   s"    b#r"B	r/   c               s0    V ^8  d   QhRRRRRRRRR	R
RR/# )r    filledr   	fill_typezFillType | strr>   r?   r7   r8   alphafloatr'   r(   r)   r*   r+   r,   r-   r.   Z   sN     ^ ^^ "^ 	^
 ^ ^ 
^r/   c                s    \        V4      pV P                  V4      pV P                  V4      p\        W4      w  rx\	        V4      ^ 8  d   VP                  V.V.WE^ R7       R# R# )a  Plot filled contours on a single plot.

Args:
    filled (sequence of arrays): Filled contour data as returned by
        :meth:`~.ContourGenerator.filled`.
    fill_type (FillType or str): Type of :meth:`~.ContourGenerator.filled` data as returned
        by :attr:`~.ContourGenerator.fill_type`, or a string equivalent.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color to plot with. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``"C0"``.
    alpha (float, optional): Opacity to plot with, default ``0.7``.
)xsysr7   Z
fill_alpha
line_widthN)r   r@   r<   r   ZlenZmulti_polygons)	r4   rA   rB   r>   r7   rC   r5   rE   rF   s	   &&&&&&   r,   rA   ZBokehRenderer.filledZ   sf    * !+	r"##E* 3r7Q;2$B4u[\] r/   Nc               s8    V ^8  d   QhRRRRRRRRRR	R
RRR	RR/# )r    xr   yr>   r?   r7   r8   rC   rD   point_color
str | Nonequad_as_tri_alphar'   r(   r)   r*   r+   r,   r-   r.   v   sZ     2) 2)2) 2) 	2)
 2) 2)  2) !2) 
2)r/   c                s   V P                  V4      pV P                  W4      w  r\        V4      \        VP                  4      ,           p	\        V4      \        VP                  4      ,           p
RVRV/pVP                  ! W3/ VB  V^ 8  Ed   RVRR	1RR	13,          VRRR	13,          ,           VRR	1R3,          ,           VR
,          ,           ,          P                  4       pRVRR	1RR	13,          VRRR	13,          ,           VRR	1R3,          ,           VR
,          ,           ,          P                  4       pVP                  ! \        \        P                  ! VRR	1RR	13,          P                  4       WR
,          P                  4       3^R7      4      \        \        P                  ! VRR	1RR	13,          P                  4       WR
,          P                  4       3^R7      4      3/ VB  VP                  ! \        \        P                  ! VRR	1R3,          P                  4       WRRR	13,          P                  4       3^R7      4      \        \        P                  ! VRR	1R3,          P                  4       WRRR	13,          P                  4       3^R7      4      3/ VB  Ve7   VP                  VP                  4       VP                  4       VRVR^R7       R# R# )a  Plot quad grid lines on a single plot.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color to plot grid lines, default ``"black"``.
    alpha (float, optional): Opacity to plot lines with, default ``0.1``.
    point_color (str, optional): Color to plot grid points or ``None`` if grid points
        should not be plotted, default ``None``.
    quad_as_tri_alpha (float, optional): Opacity to plot ``quad_as_tri`` grid, default
        ``0``.

Colors may be a string color or the letter ``"C"`` followed by an integer in the range
``"C0"`` to ``"C9"`` to use a color from the ``Category10`` palette.

Warning:
    ``quad_as_tri_alpha > 0`` plots all quads as though they are unmasked.

line_colorrC   g      ?Nr9   )r3   circle)rH   rI   
fill_colorrM   rC   markersizei)r9   r9   )	r@   _grid_as_2dZlistZTZ
multi_lineZravelr0   Zstackscatter)r4   rH   rI   r>   r7   rC   rJ   rL   r5   rE   rF   kwargsZxmidZymids   &&&&&&&&      r,   gridZBokehRenderer.gridv   s~   : r"%!WtACCy !WtACCy w6r((q !CRC"H+"crc'
2QssBwZ?!F)KLSSUD!CRC"H+"crc'
2QssBwZ?!F)KLSSUDNNRXXq"crc{002DF)//:KLSTUVRXXq"crc{002DF)//:KLSTUV  NNRXXq"bz//142ss79I9I9KLSTUVRXXq"bz//142ss79I9I9KLSTUV  "KK'')qwwyUtSXa  ) #r/   c               s4    V ^8  d   QhRRRRRRRRR	R
RR
RR/# )r    linesr   	line_typezLineType | strr>   r?   r7   r8   rC   rD   	linewidthr'   r(   r)   r*   r+   r,   r-   r.      sY      W  W W " W 	 W
  W  W  W 
 Wr/   c                s    \        V4      pV P                  V4      pV P                  V4      p\        W4      w  rVe   V	f   Q hVP	                  WWEVR7       R# R# )a?  Plot contour lines on a single plot.

Args:
    lines (sequence of arrays): Contour line data as returned by
        :meth:`~.ContourGenerator.lines`.
    line_type (LineType or str): Type of :meth:`~.ContourGenerator.lines` data as returned
        by :attr:`~.ContourGenerator.line_type`, or a string equivalent.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color to plot lines. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``"C0"``.
    alpha (float, optional): Opacity to plot lines with, default ``1.0``.
    linewidth (float, optional): Width of lines, default ``1``.

Note:
    Assumes all lines are open line strips not closed line loops.
N)rM   Z
line_alpharG   )r   r@   r<   r   Zline)
r4   rV   rW   r>   r7   rC   rX   r5   rE   rF   s
   &&&&&&&   r,   rV   ZBokehRenderer.lines   s`    4 !+	r"##E*1>>!>HHRIHV r/   c               s0    V ^8  d   QhRRRRRRRRRR	R
R/# )r    rH   r   rI   zz'ArrayLike | np.ma.MaskedArray[Any, Any]r>   r?   r7   r8   r'   r(   r)   r*   r+   r,   r-   r.      sN     R RR R 3	R
 R R 
Rr/   c                s2   \         P                  P                  V4      pV\         P                  P                  J d   R# V P	                  V4      pV P                  V4      pV P                  W4      w  rVP                  W,          W&,          VR^
R7       R# )a  Plot masked out grid points as circles on a single plot.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    z (masked array of shape (ny, nx): z-values.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Circle color, default ``"black"``.
NrN   )rO   rP   rQ   )r0   ZmaZgetmaskZnomaskr@   r<   rR   rS   )r4   rH   rI   rY   r>   r7   maskr5   s   &&&&&&  r,   rZ   ZBokehRenderer.mask   su    " uu}}Q255<<r"##E*%AGQWxbQr/   	webdriverc               (    V ^8  d   QhRRRRRRRR/# )	r    filenamer8   transparentr   r[   WebDriver | Noner'   r(   r)   r*   r+   r,   r-   r.      s8     M MM M
 $M 
Mr/   c               s    V'       d"   V P                    F  pRVn        RVn        K  	  V P                  '       d   \	        V P
                  WR7       R# \        V P
                  WR7       R# )a  Save plots to SVG or PNG file.

Args:
    filename (str): Filename to save to.
    transparent (bool, optional): Whether background should be transparent, default
        ``False``.
    webdriver (WebDriver, optional): Selenium WebDriver instance to use to create the image.

        .. versionadded:: 1.1.1

Warning:
    To output to SVG file, ``want_svg=True`` must have been passed to the constructor.
N)r]   r[   )r   Zbackground_fill_colorZborder_fill_colorr   r   r   r   )r4   r]   r^   r[   r5   s   &&&$ r,   saveZBokehRenderer.save   sL    ( }},0)(,% % >>>t||hLt||hLr/   c               r=   )r    r[   r_   r'   z
io.BytesIOr)   r*   r+   r,   r-   r.     s      +; z r/   c               s    \        V P                  VR7      p\        P                  ! 4       pVP	                  VR4       V# )zSave plots to an ``io.BytesIO`` buffer.

Args:
    webdriver (WebDriver, optional): Selenium WebDriver instance to use to create the image.

        .. versionadded:: 1.1.1

Return:
    BytesIO: PNG image buffer.
)ZdriverZpng)r   r   ioZBytesIOr`   )r4   r[   ZimageZbuffers   &$  r,   save_to_bufferZBokehRenderer.save_to_buffer  s2     &dll9E

65!r/   c               s    V ^8  d   QhRR/# )r    r'   r(   r)   r*   r+   r,   r-   r.     s      d r/   c                s0    \        V P                  4       R# )z:Show plots in web browser, in usual Bokeh manner.
        N)r   r   )r4   s   &r,   r   ZBokehRenderer.show  s     	T\\r/   c               r\   )	r    titler8   r>   r?   r7   rK   r'   r(   r)   r*   r+   r,   r-   r.     s)     > >3 >L >Z >SW >r/   c                s    V P                  V4      pWn        RVP                  n        Ve#   V P                  V4      VP                  n        R# R# )a  Set the title of a single plot.

Args:
    title (str): Title text.
    ax (int or Bokeh Figure, optional): Which plot to set the title of, default ``0``.
    color (str, optional): Color to set title. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``None`` which is ``black``.
centerN)r@   rc   Zalignr<   
text_color)r4   rc   r>   r7   r5   s   &&&& r,   rc   ZBokehRenderer.title  sF     r"	"		#'#6#6u#=CII  r/   c               s8    V ^8  d   QhRRRRRRRRRRR	RR
RRR/# )r    rH   r   rI   rY   r>   r?   r7   r8   fmtquad_as_trir   r'   r(   r)   r*   r+   r,   r-   r.   (  sd     +T +T+T +T 	+T
 +T +T +T +T 
+Tr/   c                sb   V P                  V4      pV P                  V4      pV P                  W4      w  r\        P                  ! V4      pVP
                  w  rRVRRRR/p\        V	4       FR  p\        V
4       F@  p\        R
RWV3,          RW,V3,          RW<V3,          V  /VB pVP                  V4       KB  	  KT  	  V'       d   \        V	^,
          4       F  p\        V
^,
          4       F  p\        P                  ! WV^,           1W^,           13,          4      p\        P                  ! W,V^,           1W^,           13,          4      p\        P                  ! W<V^,           1W^,           13,          4      pVP                  \        R
RVRVRVV  /VB 4       K  	  K  	  R	# R	# )a=  Show ``z`` values on a single plot.

Args:
    x (array-like of shape (ny, nx) or (nx,)): The x-coordinates of the grid points.
    y (array-like of shape (ny, nx) or (ny,)): The y-coordinates of the grid points.
    z (array-like of shape (ny, nx): z-values.
    ax (int or Bokeh Figure, optional): Which plot to use, default ``0``.
    color (str, optional): Color of added text. May be a string color or the letter ``"C"``
        followed by an integer in the range ``"C0"`` to ``"C9"`` to use a color from the
        ``Category10`` palette. Default ``"green"``.
    fmt (str, optional): Format to display z-values, default ``".1f"``.
    quad_as_tri (bool, optional): Whether to show z-values at the ``quad_as_tri`` centres
        of quads.

Warning:
    ``quad_as_tri=True`` shows z-values for all quads, even if masked.
re   Z
text_alignrd   Ztext_baselineZmiddlerH   rI   ZtextNr)   )
r@   r<   rR   r0   r1   Zshaper2   r	   Z
add_layoutZmean)r4   rH   rI   rY   r>   r7   rf   rg   r5   ZnyZnxrT   ZjZiZlabelZxxZyyZzzs   &&&&&&&&          r,   z_valuesZBokehRenderer.z_values(  sz   6 r"##E*%JJqM|XPXYrA2YVQ$V1T7VAdGSE?VvVu%   2a4[r!tAQqS5!aC%<1BQqS5!aC%<1BQqS5!aC%<1BNN5#R2#R#RRJ#R6#RS	 % ! r/   )r   r   r   r   )r:   r:   )	   ri   TF)r    C0gffffff?)r    blackg?Nr    )r    rj   g      ?r:   )r    rk   )F)r    N)r    Zgreenz.1fF)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__Z__annotations__r6   r<   r@   rA   rU   rV   rZ   r`   rb   r   rc   rh   Z__static_attributes__r)   r/   r,   r   r      s     OI:
^82)h WDR2M
 '+M M<d  
> +T +Tr/   r   ).Z
__future__r   ra   Ztypingr   r   Zbokeh.ior   r   r   Zbokeh.io.exportr   Zbokeh.layoutsr   Zbokeh.models.annotations.labelsr	   Zbokeh.palettesr
   Zbokeh.plottingr   Znumpyr0   Zcontourpy.enum_utilr   r   Zcontourpy.util.bokeh_utilr   r   Zcontourpy.util.rendererr   Zbokeh.core.enumsr   Zbokeh.modelsr   r   Znumpy.typingr   Z#selenium.webdriver.remote.webdriverr   Z	contourpyr   r   Zcontourpy._contourpyr   r   r   r)   r/   r,   <module>rl      sW    " 	 % 1 1 1 " 1 % !  : E ,2%&&=,;vTH vTr/   