Altair Plot Utils

A collection of ready-made, interactive chart functions built on Altair and Polars.

Philosophy

Most plotting libraries force you to choose between quick-and-dirty (matplotlib one-liners that look bad) and publication-ready (hours of tweaking). This package sits in between:

Available plots

Module Functions Description
plotutils.hist plot_grouped_histogram Side-by-side grouped histograms
plotutils.uncertainty plot_confidence_scatter, plot_deviations, plot_predictions_errors Error bars, deviation plots, predicted-vs-true scatter
plotutils.boxplot plot_bivariate_boxes, plot_bivariate_strip Doubly-grouped boxplots and jittered strip plots
plotutils.parallel plot_parallel_coordinates Parallel coordinates with normalization and highlighting
plotutils.auc plot_roc_curve, AUCReport ROC curves with specificity annotations; linked multi-variable AUC explorer
plotutils.concat hchart, vchart Facet-like layouts with independent axes per panel

Quick start

import polars as pl
from plotutils.uncertainty import plot_confidence_scatter

df = pl.DataFrame({
    "category": ["A"] * 20 + ["B"] * 20,
    "value": [1.0 + i * 0.1 for i in range(20)]
           + [2.0 + i * 0.1 for i in range(20)],
})

chart = plot_confidence_scatter(df, x_col="category", y_col="value")
chart.save("chart.html")   # interactive HTML
chart.show()               # Jupyter / notebook

Installation

uv pip install -e .

Building the docs

just docs-img     # generate interactive chart HTML files
just docs-build   # build the site (runs docs-img first)
just docs-serve   # live-reload dev server