Facets repeat one encoding across groups. Multiple-view compositions place different but related encodings together. Both reduce the amount of data one plot must carry, but they answer different questions.
Use facets when every panel has the same role. Use distinct linked views when one panel provides context, a marginal distribution, controls, or detail for another.
| Reader question | Start with |
|---|---|
| How does the same distribution differ across cohorts? | Shared-scale facets |
| How does a bivariate relationship relate to each marginal shape? | Scatterplot with marginal histograms |
| Which portion of a long time domain should the detail view show? | Focus-plus-context views |
| Must every group use a different scale or mark composition? | Independent named chart views |
| Should selecting one view filter or highlight another? | Linked views with shared application state |
Faceting and Composition owns the implementation boundary. This page helps choose a layout and verify its comparison semantics.
Faceted distributions give each cohort its own panel while preserving a common binning and positional scale. The reader can compare both local shape and absolute position without decoding overlapping fills.
Use shared domains when position should be directly comparable. Independent domains can make local variation easier to see, but they can also exaggerate small differences. If independent scales are intentional, give panels their own guides and state the policy.
Prepare reductions independently within each facet. A proportional histogram, for example, divides by the cohort's count rather than a global count unless the global population is the intended denominator.
A scatterplot with marginal histograms combines three roles:
All regions can derive from the same raw observations, but they do not share the same marks or plot rectangle. Keep their domains coordinated and their accessibility labels distinct.
Several chart hosts are usually simpler and more accessible. Use one custom scene with embedded regions only when exact responsive alignment materially improves the product. Custom Marks and Renderers covers that advanced boundary.
A focus-plus-context layout uses a compact overview to control the explicit domain of a larger detail chart. The selection is semantic application state, not a rectangle stored inside one renderer.
The overview should retain the complete domain. The detail should receive the selected start and end as its configured scale domain. Pointer, touch, and keyboard controls should update the same semantic values, and those values should survive data revisions and resizes.
See Interactions and Selections for controlled brushes, zoom, and linked state.
Shared selection, cursor, category, or domain state belongs in the application:
Do not query one SVG for a pixel and apply that pixel directly to another view. Different margins, widths, orientations, and scales can represent the same semantic value at different coordinates.
For the underlying row and channel model, see Data and Channels.