OCDocker.OCScore.Analysis.Plotting.Colouring module¶
Color palette utilities for Analysis plots.
Usage:
import OCDocker.OCScore.Analysis.Plotting.Colouring as ocstatcolour
- OCDocker.OCScore.Analysis.Plotting.Colouring.set_color_mapping(df, palette_colour='glasbey')[source]¶
Set the color palette for plotting based on the unique methodologies in the DataFrame.
- Parameters:
df (pd.DataFrame) – DataFrame containing a ‘Methodology’ column with unique methodologies.
palette_colour (str) – Name of the color palette to use. Options include: - “glasbey” - “Set2” - “Set3” - “tab10” - “tab20” - “colorblind” - “pastel” - “bright” - “dark” - “deep” - “muted” - “viridis”
- Returns:
color_mapping – Dictionary mapping each methodology to a color in RGB format.
- Return type:
dict[str, tuple[float, float, float]]
- Raises:
ValueError – If an unsupported palette is provided.