class_docstr: Class to handle logic from ForestPlot.
class_docstr_tok: ["Class","to","handle","logic","from","ForestPlot","."]
docstr: Draw forestplot for each plotter.
  
  Parameters
  ----------
  hdi_prob : float
      Probability for the highest density interval. Width of each line.
  quartiles : bool
      Whether to mark quartiles
  linewidth : float
      Width of forestplot line
  markersize : float
      Size of marker in center of forestplot line
  ax : Axes
      Axes to draw on
  plotted : dict
      Contains glyphs for each model
docstr_tok: ["Draw","forestplot","for","each","plotter",".","Parameters","--","--","--","--","--","hdi_prob",":","float","Probability","for","the","highest","density","interval",".","Width","of","each","line",".","quartiles",":","bool","Whether","to","mark","quartiles","linewidth",":","float","Width","of","forestplot","line","markersize",":","float","Size","of","marker","in","center","of","forestplot","line","ax",":","Axes","Axes","to","draw","on","plotted",":","dict","Contains","glyphs","for","each","model"]
code: def forestplot(
      self,
      hdi_prob,
      quartiles,
      linewidth,
      markersize,
      ax,
      rope,
      plotted,
  ):
      """Draw forestplot for each plotter.
  
      Parameters
      ----------
      hdi_prob : float
          Probability for the highest density interval. Width of each line.
      quartiles : bool
          Whether to mark quartiles
      linewidth : float
          Width of forestplot line
      markersize : float
          Size of marker in center of forestplot line
      ax : Axes
          Axes to draw on
      plotted : dict
          Contains glyphs for each model
      """
      if rope is None or isinstance(rope, dict):
          pass
      elif len(rope) == 2:
          cds = ColumnDataSource(
              {
                  "x": rope,
                  "lower": [-2 * self.y_max(), -2 * self.y_max()],
                  "upper": [self.y_max() * 2, self.y_max() * 2],
              }
          )
  
          band = Band(
              base="x",
              lower="lower",
              upper="upper",
              fill_color=[
                  color
                  for _, color in zip(
                      range(4),
                      cycle(
                          plt.rcParams["axes.prop_cycle"].by_key()[
                              "color"
                          ]
                      ),
                  )
              ][2],
              line_alpha=0.5,
              source=cds,
          )
  
          ax.renderers.append(band)
      else:
          raise ValueError(
              "Argument `rope` must be None, a dictionary like"
              '{"var_name": {"rope": (lo, hi)}}, or an '
              "iterable of length 2"
          )
      # Quantiles to be calculated
      endpoint = 100 * (1 - hdi_prob) / 2
      if quartiles:
          qlist = [endpoint, 25, 50, 75, 100 - endpoint]
      else:
          qlist = [endpoint, 50, 100 - endpoint]
  
      for plotter in self.plotters.values():
          for (
              y,
              model_name,
              selection,
              values,
              color,
          ) in plotter.treeplot(qlist, hdi_prob):
              if isinstance(rope, dict):
                  self.display_multiple_ropes(
                      rope,
                      ax,
                      y,
                      linewidth,
                      plotter.var_name,
                      selection,
                      plotted,
                      model_name,
                  )
  
              mid = len(values) // 2
              param_iter = zip(
                  np.linspace(
                      2 * linewidth, linewidth, mid, endpoint=True
                  )[-1::-1],
                  range(mid),
              )
              for width, j in param_iter:
                  plotted[model_name].append(
                      ax.line(
                          [values[j], values[-(j + 1)]],
                          [y, y],
                          line_width=width,
                          line_color=color,
                      )
                  )
              plotted[model_name].append(
                  ax.circle(
                      x=values[mid],
                      y=y,
                      size=markersize * 0.75,
                      fill_color=color,
                  )
              )
      _title = Title()
      _title.text = f"{hdi_prob:.1%} HDI"
      ax.title = _title
  
      return ax
  
imports: from collections import OrderedDict, defaultdict
  from itertools import cycle, tee
  import bokeh.plotting
  import matplotlib.pyplot
  import numpy
  from bokeh.models import Band, ColumnDataSource, DataRange1d
  from bokeh.models.annotations import Title, Legend
  from bokeh.models.tickers import FixedTicker
  from ....sel_utils import xarray_var_iter
  from ....rcparams import rcParams
  from ....stats import hdi
  from ....stats.density_utils import get_bins, histogram, kde
  from ....stats.diagnostics import _ess, _rhat
  from ....utils import conditional_jit
  from ...plot_utils import _scale_fig_size
  from ..None import show_layout
  from .None import backend_kwarg_defaults
label_desc: Use image node_id 7 for calling the PlotHandler obj's underlying member method code with example usage: obj.forestplot(hdi_prob, quartiles, linewidth, markersize, ax, rope, plotted) and returns: ax