{
const flatten = flatMat(powerMat(mat, order));
const plt1 = Plot.plot({
color: { scheme: "Blues", nice: true, legend: true },
aspectRatio: 1.0,
width: 500,
marks: [
Plot.cell(flatten, {
x: "i",
y: (d) => d.j - mat.length + order,
fill: "x"
}),
Plot.text(flatten, {
x: "i",
y: (d) => d.j - mat.length + order,
text: "x",
fill: "white",
fontSize: "large"
})
]
});
const plt2 = Plot.plot({
grid: true,
color: { scheme: "Blues", nice: true, legend: true, domain: [0, 2 / 7] },
x: { nice: true },
y: { nice: true },
marks: [
Plot.ruleX([order - 1], { stroke: "gray" }),
Plot.line(ground.res, { x: "i", y: "p", stroke: "gray" }),
Plot.dot(ground.res, { x: "i", y: "p", tip: true, fill: "p" }),
Plot.line(simulation.res, {
x: "i",
y: "p",
z: "j",
stroke: (d) => d3.schemeCategory10[d.j % 10]
})
]
});
return htl.html`
<div class='FlexLayout'>
${plt1}
${plt2}
</div>
`;
}