Published unlisted
Edited
Jun 18, 2022
Insert cell
Insert cell
Insert cell
Plot.plot({
x: { inset: 10 },
grid: true,
marks: [
Plot.dot(penguins, {
x: "culmen_length_mm",
y: "culmen_depth_mm",
fill: "species"
}),
Plot.linearRegressionY(penguins, {
x: "culmen_length_mm",
y: "culmen_depth_mm",
strokeDasharray: [1.5, 4],
strokeWidth: 1.5,
stroke: "species",
p: Math.min(Math.max(p, 0), 0.49999)
}),
Plot.linearRegressionY(penguins, {
x: "culmen_length_mm",
y: "culmen_depth_mm",
strokeDasharray: [1.5, 4],
strokeWidth: 1.5,
p: Math.min(Math.max(p, 0.00001), 0.49999)
})
]
})
Insert cell
Plot = FileAttachment("plot@2.umd.min.js").url().then(require)
Insert cell
Insert cell
mtcars = FileAttachment("mtcars.csv").csv({ typed: true })
Insert cell
Plot.plot({
width: 450,
x: { inset: 20 },
grid: true,
marks: [
Plot.dot(mtcars, {
x: "wt",
y: "mpg",
fill: "black"
}),
Plot.linearRegressionY(mtcars, {
x: "wt",
y: "mpg",
p: 0.05
})
]
})
Insert cell
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