class_docstr: Class to handle logic from ForestPlot.
class_docstr_tok: ["Class","to","handle","logic","from","ForestPlot","."]
docstr: Draw ridgeplot for each plotter.
  
  Parameters
  ----------
  hdi_prob : float
      Probability for the highest density interval.
  mult : float
      How much to multiply height by. Set this to greater than 1 to have some overlap.
  linewidth : float
      Width of line on border of ridges
  markersize : float
      Size of marker in center of forestplot line
  alpha : float
      Transparency of ridges
  ridgeplot_kind : string
      By default ("auto") continuous variables are plotted using KDEs and discrete ones using
      histograms. To override this use "hist" to plot histograms and "density" for KDEs
  ridgeplot_truncate: bool
      Whether to truncate densities according to the value of hdi_prop. Defaults to True
  ridgeplot_quantiles: list
      Quantiles in ascending order used to segment the KDE. Use [.25, .5, .75] for quartiles.
      Defaults to None.
  ax : Axes
      Axes to draw on
  plotted : dict
      Contains glyphs for each model
docstr_tok: ["Draw","ridgeplot","for","each","plotter",".","Parameters","--","--","--","--","--","hdi_prob",":","float","Probability","for","the","highest","density","interval",".","mult",":","float","How","much","to","multiply","height","by",".","Set","this","to","greater","than","1","to","have","some","overlap",".","linewidth",":","float","Width","of","line","on","border","of","ridges","markersize",":","float","Size","of","marker","in","center","of","forestplot","line","alpha",":","float","Transparency","of","ridges","ridgeplot_kind",":","string","By","default","(","``","auto","''",")","continuous","variables","are","plotted","using","KDEs","and","discrete","ones","using","histograms",".","To","override","this","use","``","hist","''","to","plot","histograms","and","``","density","''","for","KDEs","ridgeplot_truncate",":","bool","Whether","to","truncate","densities","according","to","the","value","of","hdi_prop",".","Defaults","to","True","ridgeplot_quantiles",":","list","Quantiles","in","ascending","order","used","to","segment","the","KDE",".","Use","[",".25",",",".5",",",".75","]","for","quartiles",".","Defaults","to","None",".","ax",":","Axes","Axes","to","draw","on","plotted",":","dict","Contains","glyphs","for","each","model"]
code: def ridgeplot(
      self,
      hdi_prob,
      mult,
      linewidth,
      markersize,
      alpha,
      ridgeplot_kind,
      ridgeplot_truncate,
      ridgeplot_quantiles,
      ax,
      plotted,
  ):
      """Draw ridgeplot for each plotter.
  
      Parameters
      ----------
      hdi_prob : float
          Probability for the highest density interval.
      mult : float
          How much to multiply height by. Set this to greater than 1 to have some overlap.
      linewidth : float
          Width of line on border of ridges
      markersize : float
          Size of marker in center of forestplot line
      alpha : float
          Transparency of ridges
      ridgeplot_kind : string
          By default ("auto") continuous variables are plotted using KDEs and discrete ones using
          histograms. To override this use "hist" to plot histograms and "density" for KDEs
      ridgeplot_truncate: bool
          Whether to truncate densities according to the value of hdi_prop. Defaults to True
      ridgeplot_quantiles: list
          Quantiles in ascending order used to segment the KDE. Use [.25, .5, .75] for quartiles.
          Defaults to None.
      ax : Axes
          Axes to draw on
      plotted : dict
          Contains glyphs for each model
      """
      if alpha is None:
          alpha = 1.0
      for plotter in list(self.plotters.values())[::-1]:
          for (
              x,
              y_min,
              y_max,
              hdi_,
              y_q,
              color,
              model_name,
          ) in plotter.ridgeplot(hdi_prob, mult, ridgeplot_kind):
              if alpha == 0:
                  border = color
                  facecolor = None
              else:
                  border = "black"
                  facecolor = color
              if x.dtype.kind == "i":
                  if ridgeplot_truncate:
                      y_max = y_max[(x >= hdi_[0]) & (x <= hdi_[1])]
                      x = x[(x >= hdi_[0]) & (x <= hdi_[1])]
                  else:
                      facecolor = color
                      alpha = [
                          alpha if ci else 0
                          for ci in ((x >= hdi_[0]) & (x <= hdi_[1]))
                      ]
                  y_min = np.ones_like(x) * y_min
                  plotted[model_name].append(
                      ax.vbar(
                          x=x,
                          top=y_max - y_min,
                          bottom=y_min,
                          width=0.9,
                          line_color=border,
                          color=facecolor,
                          fill_alpha=alpha,
                      )
                  )
              else:
                  tr_x = x[(x >= hdi_[0]) & (x <= hdi_[1])]
                  tr_y_min = np.ones_like(tr_x) * y_min
                  tr_y_max = y_max[(x >= hdi_[0]) & (x <= hdi_[1])]
                  y_min = np.ones_like(x) * y_min
                  patch = ax.patch(
                      np.concatenate([tr_x, tr_x[::-1]]),
                      np.concatenate([tr_y_min, tr_y_max[::-1]]),
                      fill_color=color,
                      fill_alpha=alpha,
                      line_width=0,
                  )
                  patch.level = "overlay"
                  plotted[model_name].append(patch)
                  if ridgeplot_truncate:
                      plotted[model_name].append(
                          ax.line(
                              x,
                              y_max,
                              line_dash="solid",
                              line_width=linewidth,
                              line_color=border,
                          )
                      )
                      plotted[model_name].append(
                          ax.line(
                              x,
                              y_min,
                              line_dash="solid",
                              line_width=linewidth,
                              line_color=border,
                          )
                      )
                  else:
                      plotted[model_name].append(
                          ax.line(
                              tr_x,
                              tr_y_max,
                              line_dash="solid",
                              line_width=linewidth,
                              line_color=border,
                          )
                      )
                      plotted[model_name].append(
                          ax.line(
                              tr_x,
                              tr_y_min,
                              line_dash="solid",
                              line_width=linewidth,
                              line_color=border,
                          )
                      )
              if ridgeplot_quantiles is not None:
                  quantiles = [
                      x[np.sum(y_q < quant)]
                      for quant in ridgeplot_quantiles
                  ]
                  plotted[model_name].append(
                      ax.diamond(
                          quantiles,
                          np.ones_like(quantiles) * y_min[0],
                          line_color="black",
                          fill_color="black",
                          size=markersize,
                      )
                  )
  
      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 6 for calling the PlotHandler obj's underlying member method code with example usage: obj.ridgeplot(hdi_prob, mult, linewidth, markersize, alpha, ridgeplot_kind, ridgeplot_truncate, ridgeplot_quantiles, ax, plotted) and returns: ax