+
    ,i6                    0   ^ 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                     ] 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               0    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 )formats   "?/usr/lib/python3/dist-packages/contourpy/util/bokeh_renderer.py__annotate__BokehRenderer.__annotate__2   sN     I II I %	I
 I I 
I    c                	6   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# )
   )dtypesvgcanvas)output_backendFN)r'   toolbar_locationwidthheight)r"   r   r    npasarrayr&   r   ranger   xgridvisibleygridappendoutline_line_coloraxisr
   r   )selfr%   r'   r(   r)   r*   
total_sizenfiguresbackend_figs   &&&&&&     r/   __init__BokehRenderer.__init__2   s     ""2G377
;.2nnnU(xA0C %CII %CIIMM  %:)-&#(  !  MMQ-5(A%1GIr2   c                    V ^8  d   QhRRRR/# )r$   colorstrr+   r-   )r.   s   "r/   r0   r1   O   s      C C r2   c                	    \        V\        4      '       d4   V^ ,          R8X  d&   \        VR,          4      pV P                  V,          pV# )r   C   NN)
isinstancerO   r&   r    )rE   rN   indexs   && r/   _convert_colorBokehRenderer._convert_colorO   s9    eS!!eAh#ob	NEMM%(Er2   c                    V ^8  d   QhRRRR/# )r$   axfigure | intr+   r   r-   )r.   s   "r/   r0   r1   U   s      l v r2   c                	X    \        V\        4      '       d   V P                  V,          pV# )N)rT   r&   r   )rE   rY   s   &&r/   _get_figureBokehRenderer._get_figureU   s"    b#r"B	r2   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r$   filledr   	fill_typezFillType | strrY   rZ   rN   rO   alphafloatr+   r,   r-   )r.   s   "r/   r0   r1   Z   sN     ^ ^^ "^ 	^
 ^ ^ 
^r2   c                    \        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ysrN   
fill_alpha
line_widthN)r   r\   rV   r   lenmulti_polygons)	rE   r_   r`   rY   rN   ra   rJ   rd   re   s	   &&&&&&   r/   r_   BokehRenderer.filledZ   sf    * !+	r"##E* 3r7Q;2$B4u[\] r2   Nc               8    V ^8  d   QhRRRRRRRRRR	R
RRR	RR/# )r$   xr   yrY   rZ   rN   rO   ra   rb   point_color
str | Nonequad_as_tri_alphar+   r,   r-   )r.   s   "r/   r0   r1   v   sZ     2) 2)2) 2) 	2)
 2) 2)  2) !2) 
2)r2   c                   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_colorra   g      ?NrR   )rD   circle)rl   rm   
fill_colorrr   ra   markersize)rR   rR   )	r\   _grid_as_2dlistT
multi_lineravelr<   stackscatter)rE   rl   rm   rY   rN   ra   rn   rp   rJ   rd   re   kwargsxmidymids   &&&&&&&&      r/   grid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  ) #r2   c               4    V ^8  d   QhRRRRRRRRR	R
RR
RR/# )r$   linesr   	line_typezLineType | strrY   rZ   rN   rO   ra   rb   	linewidthr+   r,   r-   )r.   s   "r/   r0   r1      sY      W  W W " W 	 W
  W  W  W 
 Wr2   c                    \        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)rr   
line_alpharg   )r   r\   rV   r   line)
rE   r   r   rY   rN   ra   r   rJ   rd   re   s
   &&&&&&&   r/   r   BokehRenderer.lines   s`    4 !+	r"##E*1>>!>HHRIHV r2   c               0    V ^8  d   QhRRRRRRRRRR	R
R/# )r$   rl   r   rm   zz'ArrayLike | np.ma.MaskedArray[Any, Any]rY   rZ   rN   rO   r+   r,   r-   )r.   s   "r/   r0   r1      sN     R RR R 3	R
 R R 
Rr2   c                2   \         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"``.
Nrs   )rt   ru   rv   )r<   magetmasknomaskr\   rV   rx   r~   )rE   rl   rm   r   rY   rN   maskrJ   s   &&&&&&  r/   r   BokehRenderer.mask   su    " uu}}Q255<<r"##E*%AGQWxbQr2   	webdriverc               (    V ^8  d   QhRRRRRRRR/# )	r$   filenamerO   transparentr!   r   WebDriver | Noner+   r,   r-   )r.   s   "r/   r0   r1      s8     M MM M
 $M 
Mr2   c                   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   background_fill_colorborder_fill_colorr"   r   r   r   )rE   r   r   r   rJ   s   &&&$ r/   saveBokehRenderer.save   sL    ( }},0)(,% % >>>t||hLt||hLr2   c                    V ^8  d   QhRRRR/# )r$   r   r   r+   z
io.BytesIOr-   )r.   s   "r/   r0   r1     s      +; z r2   c                   \        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.
)driverpng)r	   r   ioBytesIOr   )rE   r   imagebuffers   &$  r/   save_to_bufferBokehRenderer.save_to_buffer  s2     &dll9E

65!r2   c                   V ^8  d   QhRR/# )r$   r+   r,   r-   )r.   s   "r/   r0   r1     s      d r2   c                0    \        V P                  4       R# )z:Show plots in web browser, in usual Bokeh manner.
        N)r   r   )rE   s   &r/   r   BokehRenderer.show  s     	T\\r2   c               (    V ^8  d   QhRRRRRRRR/# )	r$   titlerO   rY   rZ   rN   ro   r+   r,   r-   )r.   s   "r/   r0   r1     s)     > >3 >L >Z >SW >r2   c                    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\   r   alignrV   
text_color)rE   r   rY   rN   rJ   s   &&&& r/   r   BokehRenderer.title  sF     r"	"		#'#6#6u#=CII  r2   c               8    V ^8  d   QhRRRRRRRRRRR	RR
RRR/# )r$   rl   r   rm   r   rY   rZ   rN   rO   fmtquad_as_trir!   r+   r,   r-   )r.   s   "r/   r0   r1   (  sd     +T +T+T +T 	+T
 +T +T +T +T 
+Tr2   c                b   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.
r   
text_alignr   text_baselinemiddlerl   rm   textNr-   )
r\   rV   rx   r<   r=   shaper>   r   
add_layoutmean)rE   rl   rm   r   rY   rN   r   r   rJ   nynxr   jilabelxxyyzzs   &&&&&&&&          r/   z_values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	 % ! r2   )r   r   r    r"   )rS   rS   )	   r   TF)r   C0gffffff?)r   blackg?Nr   )r   r   g      ?rS   )r   r   )F)r   N)r   greenz.1fF)__name__
__module____qualname____firstlineno____doc____annotations__rK   rV   r\   r_   r   r   r   r   r   r   r   r   __static_attributes__r-   r2   r/   r   r      s     OI:
^82)h WDR2M
 '+M M<d  
> +T +Tr2   r   ).
__future__r   r   typingr   r   bokeh.ior   r   r   bokeh.io.exportr	   bokeh.layoutsr
   bokeh.models.annotations.labelsr   bokeh.palettesr   bokeh.plottingr   numpyr<   contourpy.enum_utilr   r   contourpy.util.bokeh_utilr   r   contourpy.util.rendererr   bokeh.core.enumsr   bokeh.modelsr   r   numpy.typingr   #selenium.webdriver.remote.webdriverr   	contourpyr   r   contourpy._contourpyr   r   r   r-   r2   r/   <module>r      sW    " 	 % 1 1 1 " 1 % !  : E ,2%&&=,;vTH vTr2   