class_docstr: Base for all plot classes.
class_docstr_tok: ["Base","for","all","plot","classes","."]
docstr: Returns:
      colors: List of hex colors or factor_cmap.
      color_order: List of values for each color.
docstr_tok: ["Returns",":","colors",":","List","of","hex","colors","or","factor_cmap",".","color_order",":","List","of","values","for","each","color","."]
code: def _get_color_and_order(
      self,
      data_frame,
      color_column,
      color_order,
      categorical_columns=None,
  ):
      """
      Returns:
          colors: List of hex colors or factor_cmap.
          color_order: List of values for each color.
      """
      if color_column is None:
          colors = [self._chart.style.color_palette.next_color()]
          color_order = [None]
      else:
          # Determine color order or verify integrity of specified order.
          if color_order is None:
              color_order = sorted(data_frame[color_column].unique())
          else:
              # Check that all color factors are present in the color order.
              if not set(data_frame[color_column].unique()).issubset(
                  set(color_order)
              ):
                  raise ValueError(
                      """Color order must include
                                       all unique factors of variable `%s`."""
                      % color_column
                  )
  
          next_colors = self._chart.style.color_palette.next_colors(
              color_order
          )
          if categorical_columns is None:  # Numeric data
              colors = next_colors
          else:
              # # Color column must be in the categorical_columns
              # try:
              #     color_index = categorical_columns.index(color_column)
              #     color_label = 'factors'
              # except ValueError:
              #     color_label = 'color_column'
              #     color_index = 0
              #     raise ValueError(
              #         '''`color_column` must be present
              #          in the `categorical_columns`'''
              #     )
              color_label = "color_column"
              color_index = 0
              color_order = [str(factor) for factor in color_order]
              colors = bokeh.transform.factor_cmap(
                  color_label,
                  palette=next_colors,
                  factors=color_order,
                  start=color_index,
                  end=color_index + 1,
              )
      return colors, color_order
  
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 4 for calling the BasePlot obj's underlying member method code with example usage: obj._get_color_and_order(data_frame, color_column, color_order, categorical_columns) and returns: colors,  color_order