class_docstr: Plot functions for mixed type x & y axes:
  
  Methods:
      - bar
      - bar_stacked
      - lollipop
      - parallel
class_docstr_tok: ["Plot","functions","for","mixed","type","x","&","y","axes",":","Methods",":","-","bar","-","bar_stacked","-","lollipop","-","parallel"]
docstr: Interval.
  
  Args:
      data_frame (pandas.DataFrame): Data source for the plot.
      categorical_columns (str or list): Column name to plot on
          the categorical axis.
      lower_bound_column (str): Column name to plot on the
          numerical axis for the lower bound.
      upper_bound_column (str): Column name to plot on the
          numerical axis for the upper bound.
      middle_column (str, optional): Column name to plot on the
          numerical axis for the middle tick.
      categorical_order_by (str or array-like, optional):
          Dimension for ordering the categorical axis. Default 'values'.
          - 'values': Order categorical axis by the numerical
              axis values. Default.
          - 'labels': Order categorical axis by the categorical labels.
          - array-like object (list, tuple, np.array): New labels
              to conform the categorical axis to.
      categorical_order_ascending (bool, optional): Sort order of the
          categorical axis. Default False.
      color (str): Color name or hex value.
          See chartify.color_palettes.show() for available color names.
docstr_tok: ["Interval",".","Args",":","data_frame","(","pandas.DataFrame",")",":","Data","source","for","the","plot",".","categorical_columns","(","str","or","list",")",":","Column","name","to","plot","on","the","categorical","axis",".","lower_bound_column","(","str",")",":","Column","name","to","plot","on","the","numerical","axis","for","the","lower","bound",".","upper_bound_column","(","str",")",":","Column","name","to","plot","on","the","numerical","axis","for","the","upper","bound",".","middle_column","(","str",",","optional",")",":","Column","name","to","plot","on","the","numerical","axis","for","the","middle","tick",".","categorical_order_by","(","str","or","array-like",",","optional",")",":","Dimension","for","ordering","the","categorical","axis",".","Default","'values","'",".","-","'values","'",":","Order","categorical","axis","by","the","numerical","axis","values",".","Default",".","-","'labels","'",":","Order","categorical","axis","by","the","categorical","labels",".","-","array-like","object","(","list",",","tuple",",","np.array",")",":","New","labels","to","conform","the","categorical","axis","to",".","categorical_order_ascending","(","bool",",","optional",")",":","Sort","order","of","the","categorical","axis",".","Default","False",".","color","(","str",")",":","Color","name","or","hex","value",".","See","chartify.color_palettes.show","(",")","for","available","color","names","."]
code: def interval(
      self,
      data_frame,
      categorical_columns,
      lower_bound_column,
      upper_bound_column,
      middle_column=None,
      categorical_order_by="values",
      categorical_order_ascending=False,
      color="black",
  ):
      """Interval.
  
      Args:
          data_frame (pandas.DataFrame): Data source for the plot.
          categorical_columns (str or list): Column name to plot on
              the categorical axis.
          lower_bound_column (str): Column name to plot on the
              numerical axis for the lower bound.
          upper_bound_column (str): Column name to plot on the
              numerical axis for the upper bound.
          middle_column (str, optional): Column name to plot on the
              numerical axis for the middle tick.
          categorical_order_by (str or array-like, optional):
              Dimension for ordering the categorical axis. Default 'values'.
              - 'values': Order categorical axis by the numerical
                  axis values. Default.
              - 'labels': Order categorical axis by the categorical labels.
              - array-like object (list, tuple, np.array): New labels
                  to conform the categorical axis to.
          categorical_order_ascending (bool, optional): Sort order of the
              categorical axis. Default False.
          color (str): Color name or hex value.
              See chartify.color_palettes.show() for available color names.
      """
      interval_color = Color(color).get_hex_l()
  
      vertical = self._chart.axes._vertical
  
      _, factors, _ = self._construct_source(
          data_frame,
          categorical_columns,
          lower_bound_column,
          categorical_order_by=categorical_order_by,
          categorical_order_ascending=categorical_order_ascending,
      )
      self._set_categorical_axis_default_factors(vertical, factors)
  
      # Set the axis precision
      max_value = max(
          data_frame[lower_bound_column].max(),
          data_frame[upper_bound_column].max(),
      )
      min_value = min(
          data_frame[lower_bound_column].min(),
          data_frame[upper_bound_column].min(),
      )
      max_value, min_value = max(max_value, 0), min(min_value, 0)
      if vertical:
          self._chart.axes.set_yaxis_tick_format(
              self._axis_format_precision(max_value, min_value)
          )
      else:
          self._chart.axes.set_xaxis_tick_format(
              self._axis_format_precision(max_value, min_value)
          )
  
      interval_settings = self._chart.style._get_settings(
          "interval_plot"
      )
      SPACE_BETWEEN_BARS = interval_settings["space_between_bars"]
      MARGIN = interval_settings["margin"]
      BAR_WIDTH = interval_settings["bar_width"]
      SPACE_BETWEEN_CATEGORIES = interval_settings[
          "space_between_categories"
      ]
      INTERVAL_END_STEM_SIZE = interval_settings[
          "interval_end_stem_size"
      ]
      INTERVAL_MIDPOINT_STEM_SIZE = interval_settings[
          "interval_midpoint_stem_size"
      ]
  
      def bar_edges(index, category_number):
          """Return start, midpoint, end edge coordinates"""
          bar_num = index + 1
          start = (
              bar_num * MARGIN
              + (bar_num - 1) * MARGIN
              + (bar_num - 1) * (BAR_WIDTH)
              + SPACE_BETWEEN_BARS * (bar_num - 1)
              + SPACE_BETWEEN_CATEGORIES * (category_number - 1)
          )
          midpoint = start + BAR_WIDTH / 2.0
          end = start + BAR_WIDTH
          return (start, midpoint, end)
  
      aggregate_columns = [lower_bound_column, upper_bound_column]
      if middle_column is not None:
          aggregate_columns.append(middle_column)
      # Categorical_columns to List
      if not isinstance(categorical_columns, str):
          categorical_columns = [c for c in categorical_columns]
      else:
          categorical_columns = [categorical_columns]
      # Cast categorical columns to str to prevent dates from breaking
      type_map = {column: str for column in categorical_columns}
      values = (
          data_frame.astype(type_map)
          .groupby(categorical_columns)[aggregate_columns]
          .sum()
          .reindex(factors)
          .reset_index()
      )
      # Need to keep track of changes to categorical columns
      # To calculate spacing between values
      values["new_heirarchy"] = False
      if len(categorical_columns) > 1:
          for col in categorical_columns[:-1]:
              values["new_column"] = values[col] != values[col].shift(1)
              values["new_heirarchy"] = values[
                  ["new_heirarchy", "new_column"]
              ].max(axis=1)
          values["category_number"] = values["new_heirarchy"].cumsum()
      else:
          values["category_number"] = 1
      for index, row in values.iterrows():
          bar_midpoint = bar_edges(index, row["category_number"])[1]
          if vertical:
              # Vertical line
              self._chart.figure.segment(
                  bar_midpoint,
                  row[lower_bound_column],
                  bar_midpoint,
                  row[upper_bound_column],
                  color=interval_color,
              )
              # Top
              self._chart.figure.segment(
                  bar_midpoint - INTERVAL_END_STEM_SIZE,
                  row[upper_bound_column],
                  bar_midpoint + INTERVAL_END_STEM_SIZE,
                  row[upper_bound_column],
                  color=interval_color,
              )
              # Bottom
              self._chart.figure.segment(
                  bar_midpoint - INTERVAL_END_STEM_SIZE,
                  row[lower_bound_column],
                  bar_midpoint + INTERVAL_END_STEM_SIZE,
                  row[lower_bound_column],
                  color=interval_color,
              )
              # Middle
              if middle_column is not None:
                  self._chart.figure.segment(
                      bar_midpoint - INTERVAL_MIDPOINT_STEM_SIZE,
                      row[middle_column],
                      bar_midpoint + INTERVAL_MIDPOINT_STEM_SIZE,
                      row[middle_column],
                      color=interval_color,
                  )
          else:
              # Horizontal line
              self._chart.figure.segment(
                  row[lower_bound_column],
                  bar_midpoint,
                  row[upper_bound_column],
                  bar_midpoint,
                  color=interval_color,
              )
              # Left
              self._chart.figure.segment(
                  row[lower_bound_column],
                  bar_midpoint - INTERVAL_END_STEM_SIZE,
                  row[lower_bound_column],
                  bar_midpoint + INTERVAL_END_STEM_SIZE,
                  color=interval_color,
              )
              # Right
              self._chart.figure.segment(
                  row[upper_bound_column],
                  bar_midpoint - INTERVAL_END_STEM_SIZE,
                  row[upper_bound_column],
                  bar_midpoint + INTERVAL_END_STEM_SIZE,
                  color=interval_color,
              )
              # Middle
              if middle_column is not None:
                  self._chart.figure.segment(
                      row[middle_column],
                      bar_midpoint - INTERVAL_MIDPOINT_STEM_SIZE,
                      row[middle_column],
                      bar_midpoint + INTERVAL_MIDPOINT_STEM_SIZE,
                      color=interval_color,
                  )
      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 11 for calling the PlotMixedTypeXY obj's underlying member method code with example usage: obj.interval(data_frame, categorical_columns, lower_bound_column, upper_bound_column, middle_column, categorical_order_by, categorical_order_ascending, color) and returns: self, start,  midpoint,  end