pdstools.utils.plot_utils¶
Plot utilities for pdstools visualizations.
Attributes¶
Functions¶
|
Get the colorscale for a metric. |
Module Contents¶
- get_colorscale(metric: str, default: str = 'other') List[Tuple[float, str]] | List[str]¶
Get the colorscale for a metric.
- Parameters:
- Returns:
A Plotly-compatible colorscale (list of (position, color) tuples or list of colors).
- Return type:
Examples
>>> get_colorscale("Performance") [(0, '#d91c29'), (0.01, '#F76923'), (0.3, '#20aa50'), (0.8, '#20aa50'), (1, '#0000FF')] >>> get_colorscale("UnknownMetric") ['#d91c29', '#F76923', '#20aa50']