Public
Edited
Aug 27, 2023
1 star
Insert cell
Insert cell
Insert cell
Insert cell
msig = data2.filter((d) => d.cellId === 24)
Insert cell
ddata = data2.map((d, i) => ({
...d,
diff:
(d.value - msig[d["Time (s)"] - 1].value) *
(d.value - msig[d["Time (s)"] - 1].value)
}))
Insert cell
Plot.plot({
color: {
scheme: "Reds",
legend: true,
tickFormat: "~s"
//transform: (d) => d * 1e6,
//label: "value (µA)"
},
y: {
tickFormat: "~s"
//transform: (d) => d * 1e6,
//label: "value (µA)"
},
marks: [
Plot.lineY(ddata, {
x: "Time (s)",
y: "value",
z: "cellId",
stroke: "diff",
tip: { format: { value: "~s", diff: "~s" } }
})
]
})
Insert cell
Plot.version
Insert cell
Plot.dot(penguins, {
x: "body_mass_g",
y: "culmen_length_mm",
fill: "species",
channels: {
culmen_length_mm: "culmen_length_mm",
species: { value: "species", label: "species", scale: "color" },
body_mass_g: "body_mass_g"
},
tip: { format: { fill: null, culmen_length_mm: ".1f", x: null } }
}).plot()
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more