class_docstr: Plot functions for single density:
  
  Methods:
      - histogram
      - kde
class_docstr_tok: ["Plot","functions","for","single","density",":","Methods",":","-","histogram","-","kde"]
docstr: Kernel Density Estimate Plot.
  
  Args:
      data_frame (pandas.DataFrame): Data source for the plot.
      values_column (str): Column of numeric values.
      color_column (str, optional): Column name to group by on
          the color dimension.
      color_order (list, optional): List of values within the
          'color_column' for specific sorting of the colors.
docstr_tok: ["Kernel","Density","Estimate","Plot",".","Args",":","data_frame","(","pandas.DataFrame",")",":","Data","source","for","the","plot",".","values_column","(","str",")",":","Column","of","numeric","values",".","color_column","(","str",",","optional",")",":","Column","name","to","group","by","on","the","color","dimension",".","color_order","(","list",",","optional",")",":","List","of","values","within","the","'color_column","'","for","specific","sorting","of","the","colors","."]
code: def kde(
      self,
      data_frame,
      values_column,
      color_column=None,
      color_order=None,
  ):
      """Kernel Density Estimate Plot.
  
      Args:
          data_frame (pandas.DataFrame): Data source for the plot.
          values_column (str): Column of numeric values.
          color_column (str, optional): Column name to group by on
              the color dimension.
          color_order (list, optional): List of values within the
              'color_column' for specific sorting of the colors.
      """
      # Vertical is unused since the logic is handled
      # by the area chart
      # vertical = self._chart.axes._vertical
  
      if color_column is not None:
          color_values = sorted(data_frame[color_column].unique())
      else:
          color_values = [None]
  
      data = pd.DataFrame()
      for color_value in color_values:
          if color_column is None:  # Single line
              sliced_data = data_frame
          else:
              sliced_data = data_frame[
                  data_frame[color_column] == color_value
              ]
          values = sliced_data[values_column]
  
          kde = gaussian_kde(values)
          index = np.linspace(values.min(), values.max(), 300)
          kde_pdf = kde.evaluate(index)
          data = pd.concat(
              [
                  data,
                  pd.DataFrame(
                      {"x": index, "y": kde_pdf, "color": color_value}
                  ),
              ],
              axis=0,
          )
  
      color_column = "color" if color_column is not None else None
  
      PlotNumericXY.area(
          self,
          data,
          "x",
          "y",
          color_column=color_column,
          color_order=color_values,
          stacked=False,
      )
  
      return self._chart
  
imports: import bokeh
  import pandas
  import numpy
  from chartify._core.colors import Color, color_palettes
  from chartify._core.axes import NumericalYMixin, NumericalXMixin
  from scipy.stats import gaussian_kde
label_desc: Use image node_id 2 for calling the PlotNumericDensityXY obj's underlying member method code with example usage: obj.kde(data_frame, values_column, color_column, color_order) and returns: self