code: def _d_helper(
      vec,
      vname,
      color,
      bw,
      circular,
      titlesize,
      xt_labelsize,
      linewidth,
      markersize,
      hdi_prob,
      point_estimate,
      hdi_markers,
      outline,
      shade,
      ax,
  ):
      """Plot an individual dimension.
  
      Parameters
      ----------
      vec : array
          1D array from trace
      vname : str
          variable name
      color : str
          matplotlib color
      bw: float or str, optional
          If numeric, indicates the bandwidth and must be positive.
          If str, indicates the method to estimate the bandwidth and must be
          one of "scott", "silverman", "isj" or "experimental" when `circular` is False
          and "taylor" (for now) when `circular` is True.
      titlesize : float
          font size for title
      xt_labelsize : float
         fontsize for xticks
      linewidth : float
          Thickness of lines
      markersize : float
          Size of markers
      hdi_prob : float
          Probability for the highest density interval. Defaults to 0.94
      point_estimate : Optional[str]
          Plot point estimate per variable. Values should be 'mean', 'median', 'mode' or None.
          Defaults to 'auto' i.e. it falls back to default set in rcParams.
      shade : float
          Alpha blending value for the shaded area under the curve, between 0 (no shade) and 1
          (opaque). Defaults to 0.
      ax : matplotlib axes
      """
      if vec.dtype.kind == "f":
          if hdi_prob != 1:
              hdi_ = hdi(vec, hdi_prob, multimodal=False)
              new_vec = vec[(vec >= hdi_[0]) & (vec <= hdi_[1])]
          else:
              new_vec = vec
  
          x, density = kde(new_vec, circular=circular, bw=bw)
          density *= hdi_prob
          xmin, xmax = x[0], x[-1]
          ymin, ymax = density[0], density[-1]
  
          if outline:
              ax.plot(x, density, color=color, lw=linewidth)
              ax.plot(
                  [xmin, xmin],
                  [-ymin / 100, ymin],
                  color=color,
                  ls="-",
                  lw=linewidth,
              )
              ax.plot(
                  [xmax, xmax],
                  [-ymax / 100, ymax],
                  color=color,
                  ls="-",
                  lw=linewidth,
              )
  
          if shade:
              ax.fill_between(x, density, color=color, alpha=shade)
  
      else:
          xmin, xmax = hdi(vec, hdi_prob, multimodal=False)
          bins = get_bins(vec)
          if outline:
              ax.hist(
                  vec,
                  bins=bins,
                  color=color,
                  histtype="step",
                  align="left",
              )
          if shade:
              ax.hist(vec, bins=bins, color=color, alpha=shade)
  
      if hdi_markers:
          ax.plot(
              xmin,
              0,
              hdi_markers,
              color=color,
              markeredgecolor="k",
              markersize=markersize,
          )
          ax.plot(
              xmax,
              0,
              hdi_markers,
              color=color,
              markeredgecolor="k",
              markersize=markersize,
          )
  
      if point_estimate is not None:
          est = calculate_point_estimate(point_estimate, vec, bw)
          ax.plot(
              est,
              0,
              "o",
              color=color,
              markeredgecolor="k",
              markersize=markersize,
          )
  
      ax.set_yticks([])
      ax.set_title(vname, fontsize=titlesize, wrap=True)
      for pos in ["left", "right", "top"]:
          ax.spines[pos].set_visible(False)
      ax.tick_params(labelsize=xt_labelsize)
  
file_path: arviz/arviz/plots/backends/matplotlib/densityplot.py
imports: from itertools import cycle
  import matplotlib.pyplot
  import numpy
  from ....stats import hdi
  from ....stats.density_utils import get_bins, kde
  from ...plot_utils import _scale_fig_size, calculate_point_estimate
  from .None import backend_kwarg_defaults, backend_show, create_axes_grid
label_desc: Use image node_id 2 for calling a global function with example usage: _d_helper(vec, vname, color, bw, circular, titlesize, xt_labelsize, linewidth, markersize, hdi_prob, point_estimate, hdi_markers, outline, shade, ax) without return types