Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Scatter Plot with Color Legend

Public visualization

Scatter Plot with Color Legend

0 stars0🌍 Public
Zzyniax
Last edited Apr 12, 2021
Created on Apr 12, 2021

This example visualizes the classic Iris dataset using a scatter plot of petal length versus sepal width, with points colored by species according to a color legend. Selecting a legend item dims all other points and restores full opacity to the matching species. Built with React and D3 v5, it uses `scaleLinear`, `scaleOrdinal`, and `extent` to compute scales, while custom React components render axes, marks, and the interactive legend as SVG. The data loads as CSV via D3’s `csv` function.

AI-generated description

A scatter plot of The Iris Dataset with color legend.

Comments

Sign in to join the discussion.

MIT Licensed