Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Scatter Plot with Color Legend

Public visualization

Viewing a saved revision (read-only)

51844bbfa4f64c4a90ff485207e7f1a8

Scatter Plot with Color Legend

0 stars1🌍 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