Skip to content

feat: add Violin trace type (stacked on choropleth)#3

Open
jqnatividad wants to merge 3 commits into
feat/choropleth-maps-upstreamfrom
feat/choropleth-violin
Open

feat: add Violin trace type (stacked on choropleth)#3
jqnatividad wants to merge 3 commits into
feat/choropleth-maps-upstreamfrom
feat/choropleth-violin

Conversation

@jqnatividad

Copy link
Copy Markdown

Summary

Stacks the Violin trace type on top of feat/choropleth-maps-upstream so downstream consumers (qsv) can use violin plots today, while the upstream contribution is reviewed separately.

This branch = feat/choropleth-maps-upstream + the same violin commit, cherry-picked with the additive PlotType/lib.rs re-export conflicts resolved to keep both choropleth and violin.

What's included

Same as the upstream PR: Violin<X, Y> with the full plotly.js violin attribute surface (bandwidth, box, meanline, span/spanmode, scalegroup/scalemode, side, points/jitter/pointpos, selected/unselected, quartilemethod, hoveron, zorder, x0/y0), supporting types, tests, a statistical_charts example, and a book recipe.

Verification

  • cargo test -p plotly --features static_export_chromedriver violin → 12 passed
  • Cherry-pick conflicts resolved (keep both choropleth + violin registrations)

🤖 Generated with Claude Code

jqnatividad and others added 3 commits July 3, 2026 10:59
Add the `Violin` trace with the full plotly.js violin attribute surface:
bandwidth, box (inner mini box plot), meanline, KDE span/spanmode,
scalegroup/scalemode, side (split violins), points/jitter/pointpos,
selected/unselected, quartilemethod, hoveron, and zorder.

Grouped and split violins work via the existing `ViolinMode` layout
attribute. Includes unit tests, a doctest, a statistical-charts example
(basic, horizontal, split), and a book recipe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the placeholder box_plot.png thumbnail for the Violin Plots recipe
with a generated 1024x680 violin image, and add the plotly#412 reference to the
CHANGELOG entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Type the violin `span` field as `NumOrStringCollection` instead of
`Vec<f64>`. Plotly.js types `span` as an `info_array` of `any`, so
date/category axis values must be allowed for manual KDE spans on
non-numeric value axes. Numeric spans continue to work unchanged; add a
test covering both numeric and date-string spans.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant