{
const shared = Plot.plot({
width: width / 2,
marks: [
Plot.lineY(untidy, { x: (d, i) => timeof(i), y: "0" }),
Plot.lineY(untidy, { x: (d, i) => timeof(i), y: "1" })
]
});
const x = shared.scale("x");
const y = shared.scale("y");
return html`<div style="display: flex">
${[
{ y: "0", stroke: "green" },
{ y: "1", stroke: "red" }
].map((opts) =>
Plot.plot({
width: width / 2,
marks: [
Plot.frame(),
Plot.ruleY([0]),
Plot.lineY(untidy, { x: (d, i) => timeof(i), ...opts })
],
x,
y
})
)}
</div>`;
}