testplot = (options) => {
const chart = Plot.plot({
height: 150,
style: "border: solid 1px brown; margin-bottom: 2px",
...options,
marks: [Plot.frame({ stroke: "brown" }), ...options.marks]
});
const frame = chart.querySelector("rect[aria-label=frame],g[aria-label=frame] rect");
return html`<div style="display: flex">
${chart}
<div style="padding-left: 2em; font-family: sans-serif; font-size: 12px">marginLeft: ${frame.getAttribute(
"x"
)}<br>marginRight: ${
640 - frame.getAttribute("width") - frame.getAttribute("x")
}`;
}