StripPlot
Builder for creating strip plots (also called dot plots or univariate scatter). Each group is rendered as a vertical cloud of points along a categorical x-axis. Three layout modes are available:| Method | Layout | Best for |
|---|---|---|
with_jitter(j) | Random horizontal jitter | Large N; fast |
with_swarm() | Non-overlapping beeswarm | N < ~200; clearest structure |
with_center() | All at center | Density columns; stacked look |
StripPlots can be layered on the same canvas (e.g. with a BoxPlot) by passing them together to render_multiple.
Constructor
Create a strip plot with default settings.Defaults:
- Color:
"steelblue" - Point size:
4.0pixels - Jitter:
0.3 - Seed:
42
Data Methods
Styling Methods
"steelblue"). Use an rgba(...) value to make points semi-transparent when overlaying on a box plot or violin.4.0). Reduce for large datasets (e.g. 2.0–3.0) to limit overlap.Layout Methods
jitter is the half-width as a fraction of the category slot width. 0.3 (the default) spreads points ±30% of the slot. Increase to spread points further apart; decrease to tighten the column. The position is randomised using with_seed.Example:42). Change the seed to get a different random arrangement while keeping the output reproducible.Legend Methods
Enums & Types
StripStyle
Controls how points are spread horizontally within each group slot.Strip { jitter: f64 }- Random horizontal jitter.jitteris the half-width as a fraction of the category slot width.Swarm- Deterministic beeswarm: points are placed as close to center as possible without overlapping. Best for N < ~200 per group.Center- No horizontal spread — all points placed at the group center. Creates a vertical density column.
StripGroup
One group (one column of points) within a strip plot. Fields:label: String- Group labelvalues: Vec<f64>- Data values