PlotConfig

class probly.plot.config.PlotConfig(categorical_palette: tuple[str, ...] = ('#1e88e5', '#ff0d57', '#2ecc71', '#f39c12', '#9b59b6', '#16a085', '#d35400'), color_positive: str = '#ff0d57', color_negative: str = '#1e88e5', color_neutral: str = '#7f8c8d', color_gridline: str = '#e8e8e8', figure_size: tuple[float, float] = (6.0, 6.0), dpi: int = 100, title_fontsize: float = 14.0, label_fontsize: float = 12.0, line_width: float = 1.5, fill_alpha: float = 0.3, marker_size: float = 30.0, grid_alpha: float = 0.5, grid_linestyle: str = '--', histogram_alpha: float = 0.6, spider_bar_width: float = 0.05)[source]

Bases: object

Shared configuration for plotting functions.

Plot functions should accept config: PlotConfig | None = None and fall back to PlotConfig() when no config is provided.

categorical_palette: tuple[str, ...]
color(index: int) → str[source]

Return a color from the categorical palette.

Parameters:

index – Index to select color from the palette. Will wrap around if index exceeds palette length.

Returns:

A hex color string from the categorical palette.

color_gridline: str
color_negative: str
color_neutral: str
color_positive: str
dpi: int
figure_size: tuple[float, float]
fill_alpha: float
grid_alpha: float
grid_linestyle: str
histogram_alpha: float
label_fontsize: float
line_width: float
marker_size: float
spider_bar_width: float
title_fontsize: float

Examples using probly.plot.config.PlotConfig

Conformalized Credal Set Prediction — PyTorch.

Conformalized Credal Set Prediction — PyTorch.

Plotting binary credal sets on an interval

Plotting binary credal sets on an interval

Plotting credal sets on the simplex

Plotting credal sets on the simplex

Visualising OOD detection results

Visualising OOD detection results

Plotting credal sets on a spider (radar) chart

Plotting credal sets on a spider (radar) chart

Sets of outcomes

Sets of outcomes

Second order: a parameterized Dirichlet

Second order: a parameterized Dirichlet

Point predictions and first-order distributions

Point predictions and first-order distributions

Second order: a sample of distributions

Second order: a sample of distributions

Dirichlet Calibration on MNIST

Dirichlet Calibration on MNIST

Isotonic Regression on MNIST (Odd vs. Even)

Isotonic Regression on MNIST (Odd vs. Even)

Platt Scaling on MNIST (Odd vs. Even)

Platt Scaling on MNIST (Odd vs. Even)

Temperature Scaling on MNIST

Temperature Scaling on MNIST

Vector Scaling on MNIST

Vector Scaling on MNIST