function multiLayerX(config, base, ...layers) {
const A = Plot.plot({
...config,
marks: [base]
});
const x = A.scale("x");
return Plot.plot({
...config,
marks: [
base,
...layers.map((l) => () =>
Plot.plot({
...config,
marks: [l(x)],
x: { ...x, axis: null },
y: { axis: "right", line: true, nice: true, ticks: [...Array(8)].map((_, i) => 5 + i * 5) }
})
)
]
});
}