Public
Edited
Apr 25, 2023
Insert cell
Insert cell
box_plot = Plot.plot({
// Change the x-axis label from body_mass_g to the nicer "Body mass →"
x: { label: "Body mass →" },

// Also change the y-axis and, and place it at the top as well.
y: { label: "Species", labelAnchor: "top" },
width: 800,
height: 300,
marks: [
Plot.boxX(penguins, { x: "body_mass_g", y: "species" }),

// Add reference as a hyperlink.
() =>
svg`<a target="_blank" href="https://allisonhorst.github.io/palmerpenguins/">
<text font-size="14" transform="translate(40,280)">Reference</text>
</a>`
]
})
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