{
let plt1, plt2;
plt1 = Plot.plot({
width: 600,
x: { nice: true },
y: { nice: true, domain: [-1, option.quantizations] },
grid: true,
color: { legend: true, scheme: "Tableau10" },
marks: [
Plot.dot(means, {
x: "raw",
y: "quantization",
fill: (d) => "Quantization of Linear values",
opacity: 0.5
}),
Plot.line(means, {
x: "raw",
y: "raw",
stroke: (d) => "Linear values",
strokeWidth: 3
}),
Plot.line(means, {
x: "raw",
y: "mean",
stroke: (d) => "Mean of Quanti Linear values and Noise",
strokeWidth: 5,
opacity: 0.6
}),
Plot.dot(means, {
x: "raw",
y: (d) => d.mean - d.raw,
fill: "gray",
opacity: 0.5
}),
Plot.dot(means, {
x: "raw",
y: (d) => d.mean - d.quantization,
fill: "gray",
opacity: 0.5
})
]
});
plt2 = Plot.plot({
width: 600,
x: { nice: true },
y: { nice: true, domain: [-1, 1] },
grid: true,
color: { legend: true, scheme: "Tableau10" },
marks: [
Plot.dot(means, {
x: "raw",
y: (d) => d.mean - d.raw,
fill: (d) => "Error between Mean Quanti and Linera values"
}),
Plot.dot(means, {
x: "raw",
y: (d) => d.mean - d.quantization,
fill: (d) => "Error between Mean Quanti and Quanti"
})
]
});
return htl.html`
<div style="display:flex">
${plt1}
${plt2}
</div>
`;
}