Add Splom and Parcats trace types - #425
Merged
Merged
Conversation
19 tasks
andrei-ng
force-pushed
the
feature/splom-parcats-traces
branch
from
July 27, 2026 13:34
2ea3d61 to
d9bd828
Compare
Add typed scatter-plot-matrix (splom) and parallel-categories (parcats)
traces following the established trace-struct recipe.
- Register PlotType::{Splom, Parcats} (serialize to "splom"/"parcats"),
re-export modules + traces from traces/mod.rs and lib.rs.
- All attributes verified against bundled plotly.js 3.7.0 schema.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
andrei-ng
force-pushed
the
feature/splom-parcats-traces
branch
from
July 27, 2026 13:34
d9bd828 to
e593cdb
Compare
- add extra png's for book TOC Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
andrei-ng
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two typed traces to the
plotlycrate, following the established trace-struct recipe (FieldSetterderive +skip_serializing_none, mirroringsankey.rs):Splom<V>— scatter-plot matrix.SplomDimension/SplomAxis/SplomDiagonalsub-structs,showupperhalf/showlowerhalfcontrols, reuses the commonMarker. Plotly.js auto-generates the N×N axis grid, so callers don't assign explicitxaxis/yaxisids.Parcats<V>— parallel categories.ParcatsDimension/ParcatsLinesub-structs,countsper-path weighting (aggregated tuples instead of one row per record), domain-based like Sankey. Enums:ParcatsLineShape,ParcatsArrangement,ParcatsHoverOn,ParcatsSortPaths.Both are additive, non-breaking public API.
Details
PlotType::{Splom, Parcats}serialize to"splom"/"parcats"via the existingrename_all = "lowercase"(same asSankey).traces/mod.rsandlib.rs;CHANGELOG.mdupdated.hovertemplateis trace-level, andarrangementacceptsperpendicular/freeform/fixed(all three included).Note for reviewers
SplomAxis::typereuses the sharedAxisTypeenum, which is slightly wider than splom's documented set (linear/log/date/category) — it also carries-/multicategory. This follows the crate's "reuse common types" convention; happy to introduce a narrower splom-specific enum if you'd prefer.Testing
cargo test -p plotly --features all— all unit + doctests pass (includesto_json()round-trips and runnable doc examples for both traces)cargo clippy --features all -- -D warnings -A deprecated— cleancargo doc— no new warnings🤖 Generated with Claude Code