Parallel coordinates plot
Explore multivariate datasets (4–12 dimensions) by drawing one polyline per row across parallel vertical axes — each axis normalised to its own domain. Patterns (clusters, outliers, anti-correlated dimensions) emerge from polyline shapes.
The demo plots the six Apollo crewed lunar missions (11 / 12 / 14 / 15 / 16 / 17) across four mission dimensions: total mission duration (days), surface EVA hours, kilometres traversed on the Moon, and sample mass returned (kg). The visible "step up" between Apollo 14 and Apollo 15 is the Lunar Roving Vehicle's first deployment — every dimension jumps together because once astronauts could drive, every mission profile expanded.
Source: Apollo program — Lunar missions — Wikipedia
Public surface
use wisp_chart::distributions::{ParallelCoords, ParallelAxis, ParallelRow};
use wisp_chart::color::Color;
let c = |hex| Color::from_hex(hex).unwrap();
let pc = ParallelCoords::new(
vec![
ParallelAxis::new("mpg", (10.0, 50.0)),
ParallelAxis::new("cyl", ( 3.0, 8.0)),
ParallelAxis::new("hp", (60.0, 300.0)),
ParallelAxis::new("wt", ( 1.5, 5.5)),
],
vec![
ParallelRow::new(vec![32.0, 4.0, 95.0, 2.2], c("#0072b2")),
ParallelRow::new(vec![14.0, 8.0, 280.0, 4.4], c("#009e73")),
/* ... */
],
);
Each axis carries its own (min, max) domain so heterogeneous
units share the chart cleanly. Values are clamped to [0, 1]
of their axis before pixel mapping.