Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Observable Plot Scatterplot with Color

Public visualization

Viewing a saved revision (read-only)

208efccfb6ac466484509e1e9fb6e41b

Observable Plot Scatterplot with Color

0 stars0🌍 Public
CCurran Kelleher
Last edited Jan 22, 2024
Created on Jan 22, 2024

This example shows how penguin body mass and flipper length relate, with points colored by species using the Observable Plot library. It plots the penguins dataset from @curran/penguins, rendering dots with `Plot.dot` and mapping the `stroke` channel to the `species` field, while a legend appears via a `color` option. The chart is sized to its container and includes a grid and inset padding. The code also handles hot reloading by replacing the existing DOM node, and it overrides default figure margins in CSS.

AI-generated description

This example was ported from Observable: Scatterplot with color.