Public
Edited
Oct 20, 2023
1 fork
8 stars
Insert cell
Insert cell
Plot.plot({
style: {
backgroundColor: "black",
color: "white",
padding: "16px" // Don’t forget the "px"!
},
marks: [
Plot.dot(penguins, {x: "flipper_length_mm", y: "body_mass_g"})
]
})
Insert cell
Plot.plot({
style: `
background-color: rebeccapurple;
color: springgreen;
padding: 16px;
`,
marks: [
Plot.dot(penguins, {x: "flipper_length_mm", y: "body_mass_g"})
]
})
Insert cell
Plot.plot({
className: "custom-plot", // see stylesheet below
marks: [
Plot.dot(penguins, {x: "flipper_length_mm", y: "body_mass_g"})
]
})
Insert cell
<style type="text/css">

svg.custom-plot {
background-color: darkslateblue;
color: yellow;
padding: 16px;
}
</style>
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