cellfish.plot.show_palette

Contents

cellfish.plot.show_palette#

cellfish.plot.show_palette(palette, title=None, labels=None)#

Display a palette with optional labels.

Parameters:
  • palette (str, List[str], or dict) – Palette name, list of colors, or dictionary mapping labels to colors.

  • title (str, optional) – Title for the plot.

  • labels (List[str], optional) – Labels for each color. Only used if palette is a list.

Examples

>>> show_palette('immune')
# Displays immune cell palette
>>> show_palette(IMMUNE_PALETTE)
# Displays immune palette with cell type labels
>>> show_palette(['red', 'blue', 'green'], labels=['A', 'B', 'C'])
# Displays custom palette with labels