Skip to main content
100%

Fork of Scatter Plot with Color Legend

✓ Published0🌍 Public
AAnkit-Ian-53787
Last edited Oct 30, 2021
Created on Oct 30, 2021

This example visualizes the Iris dataset as a scatter plot of petal length against sepal width, with points colored by iris species. It uses a color legend to map species to categorical colors. Built with React and D3 v5, the SVG rendering uses D3’s `scaleLinear`, `scaleOrdinal`, and `extent` APIs to compute scales, while axes and legend ticks are generated via custom React components. The data is loaded asynchronously from a CSV URL using D3’s `csv` function, with tooltips showing the petal length formatted via `format`.

AI-generated description

A scatter plot of The Iris Dataset with color legend.

MIT Licensed

Similar vizzes