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
AAdriana Rodriguez Sanabria
Last edited Oct 27, 2021
Created on Oct 27, 2021

This visualization displays the classic Iris dataset as an SVG scatter plot, mapping petal length against sepal width and coloring each point by species. A color legend appears on the right, identifying the three iris species with distinct hues. Built with React and D3 v5, the code uses `scaleLinear` for both axes, `scaleOrdinal` for color mapping, and custom React components (`AxisBottom`, `AxisLeft`, `Marks`, `ColorLegend`) to render ticks, circles, and legend items. Data loads asynchronously via D3's `csv` parser, which also converts numeric fields.

AI-generated description

A scatter plot of The Iris Dataset with color legend.

Comments

Sign in to join the discussion.

MIT Licensed