class_docstr: 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:`~contourpy.util.bokeh_renderer.BokehRenderer`, unlike
      :class:`~contourpy.util.mpl_renderer.MplRenderer`, needs to be told in advance if output to
      SVG format will be required later, otherwise it will assume PNG output.
class_docstr_tok: ["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",":","`","~contourpy.util.bokeh_renderer.BokehRenderer","`",",","unlike",":","class",":","`","~contourpy.util.mpl_renderer.MplRenderer","`",",","needs","to","be","told","in","advance","if","output","to","SVG","format","will","be","required","later",",","otherwise","it","will","assume","PNG","output","."]
docstr: 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.
docstr_tok: ["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","."]
code: def z_values(
      self,
      x: ArrayLike,
      y: ArrayLike,
      z: ArrayLike,
      ax: figure | int = 0,
      color: str = "green",
      fmt: str = ".1f",
      quad_as_tri: bool = False,
  ) -> None:
      """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.
      """
      fig = self._get_figure(ax)
      color = self._convert_color(color)
      x, y = self._grid_as_2d(x, y)
      z = np.asarray(z)
      ny, nx = z.shape
      kwargs = dict(
          text_color=color, text_align="center", text_baseline="middle"
      )
      for j in range(ny):
          for i in range(nx):
              fig.add_layout(
                  Label(
                      x=x[j, i],
                      y=y[j, i],
                      text=f"{z[j, i]:{fmt}}",
                      **kwargs,
                  )
              )
      if quad_as_tri:
          for j in range(ny - 1):
              for i in range(nx - 1):
                  xx = np.mean(x[j : j + 2, i : i + 2])
                  yy = np.mean(y[j : j + 2, i : i + 2])
                  zz = np.mean(z[j : j + 2, i : i + 2])
                  fig.add_layout(
                      Label(x=xx, y=yy, text=f"{zz:{fmt}}", **kwargs)
                  )
  
imports: from __future__ import annotations
  import io
  from typing import TYPE_CHECKING, Any
  from bokeh.io import export_png, export_svg, show
  from bokeh.io.export import get_screenshot_as_png
  from bokeh.layouts import gridplot
  from bokeh.models.annotations.labels import Label
  from bokeh.palettes import Category10
  from bokeh.plotting import figure
  import numpy
  from contourpy import FillType, LineType
  from contourpy.enum_util import as_fill_type, as_line_type
  from contourpy.util.bokeh_util import filled_to_bokeh, lines_to_bokeh
  from contourpy.util.renderer import Renderer
label_desc: Use image node_id 12 for calling the BokehRenderer obj's underlying member method code with example usage: obj.z_values(x, y, z, ax, color, fmt, quad_as_tri) without return types