observablehq / plot

A concise API for exploratory data visualization implementing a layered grammar of graphics
https://observablehq.com/plot/
ISC License
4.34k stars 176 forks source link

ridgeline plot #1749

Closed Fil closed 1 year ago

Fil commented 1 year ago

The ridgeline plot example (https://observablehq.com/@observablehq/plot-ridgeline@570) was broken by the “fix z-order of marks across facets” feature of https://github.com/observablehq/plot/releases/tag/v0.6.7 (see https://observablehq.com/@observablehq/plot-ridgeline@566, where the black top lines are not hidden by the grey areas any more)

Capture d’écran 2023-07-16 à 13 22 04

For now I've fixed it with a render transform (https://observablehq.com/@observablehq/plot-ridgeline@601). Do need to introduce a "topLineStroke” option to areaY?

Fil commented 1 year ago

There was simpler solution by layering as many marks as there are facets: https://observablehq.com/@observablehq/plot-ridgeline@612. Maybe we don't need that extra option, then…