Plot.plot({
nice: true,
grid: true,
color: {
legend: true
},
facet: { data: mdata, y: "device" },
marks: [
Plot.frame(),
Plot.areaY(
mdata,
Plot.binX(
{ y1: "min", y2: "max", filter: null },
{
x: "timestamp",
thresholds: d3.utcMinute,
y: "temp",
fillOpacity: 0.2
}
)
),
Plot.dot(mdata, {
x: "timestamp",
y: "temp",
stroke: "sensor_id"
}),
Plot.line(
mdata,
Plot.binX(
{ y: "mean", filter: null },
{
x: "timestamp",
thresholds: d3.utcMinute,
y: "temp",
stroke: "sensor_id"
}
)
)
]
})