class_docstr: Handle individual variable logic.
docstr: Get data for each ridgeplot for the variable.
docstr_tok: ["Get","data","for","each","ridgeplot","for","the","variable","."]
code: def ridgeplot(self, hdi_prob, mult, ridgeplot_kind):
      """Get data for each ridgeplot for the variable."""
      xvals, hdi_vals, yvals, pdfs, pdfs_q, colors = (
          [],
          [],
          [],
          [],
          [],
          [],
      )
      for y, *_, values, color in self.iterator():
          yvals.append(y)
          colors.append(color)
          values = values.flatten()
          values = values[np.isfinite(values)]
  
          if hdi_prob != 1:
              hdi_ = hdi(values, hdi_prob, multimodal=False)
          else:
              hdi_ = min(values), max(values)
  
          if ridgeplot_kind == "auto":
              kind = (
                  "hist"
                  if np.all(np.mod(values, 1) == 0)
                  else "density"
              )
          else:
              kind = ridgeplot_kind
  
          if kind == "hist":
              _, density, x = histogram(values, bins=get_bins(values))
              x = x[:-1]
          elif kind == "density":
              x, density = kde(values)
  
          density_q = density.cumsum() / density.sum()
  
          xvals.append(x)
          pdfs.append(density)
          pdfs_q.append(density_q)
          hdi_vals.append(hdi_)
  
      scaling = max(np.max(j) for j in pdfs)
      for y, x, hdi_val, pdf, pdf_q, color in zip(
          yvals, xvals, hdi_vals, pdfs, pdfs_q, colors
      ):
          yield x, y, mult * pdf / scaling + y, hdi_val, pdf_q, color
  
imports: from collections import OrderedDict, defaultdict
  from itertools import tee
  import matplotlib.pyplot
  import numpy
  from matplotlib.colors import to_rgba
  from matplotlib.lines import Line2D
  from ....stats import hdi
  from ....stats.density_utils import get_bins, histogram, kde
  from ....stats.diagnostics import _ess, _rhat
  from ....sel_utils import xarray_var_iter
  from ....utils import conditional_jit
  from ...plot_utils import _scale_fig_size
  from .None import backend_kwarg_defaults, backend_show
label_desc: Use image node_id 5 for calling the VarHandler obj's underlying member method code with example usage: obj.ridgeplot(hdi_prob, mult, ridgeplot_kind) without return types