Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Scatter Plot with Color

Public visualization

Scatter Plot with Color

0 stars0🌍 Public
BBismark Kofi Owusu Sarfo
Last edited Oct 22, 2025
Created on Oct 22, 2025

This example builds an interactive scatter plot of the Iris dataset, mapping sepal length to the x-axis and petal length to the y-axis. Each point is colored by its species, with a color legend identifying the three categories. The visualization is rendered using D3.js, leveraging `scaleLinear` for axes, `scaleOrdinal` with `schemeCategory10` for categorical colors, and an `axisLeft`/`axisBottom` pair for the plot frame. A custom `colorLegend` function adds the species key.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed