Skip to main content
100%

Scatter Plot with Color Legend

✓ Published1🌍 Public
Jjbruzzo
Last edited Jul 2, 2022
Created on Jul 2, 2022

This visualization displays the classic Iris dataset, plotting petal length against sepal width for three species of iris flowers. Each point is colored according to its species, with a color legend on the right side identifying the categories. The implementation uses React for component structure and state management, while D3 v7 utilities like `scaleLinear`, `scaleOrdinal`, and `csv` handle data loading, scaling, and coordinate mapping. The SVG rendering includes custom axis and legend components, with hover tooltips showing exact petal length values.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

Plotting the Iris dataset

MIT Licensed

Similar vizzes