Skip to main content
100%

Scatter Plot with Color Legend

✓ Published0🌍 Public
DdaojunL
Last edited Oct 14, 2020
Created on Oct 14, 2020

This example visualizes the classic Iris Dataset, plotting petal length against sepal width to reveal species clusters. The visualization is built with React and D3 v5, rendering as an SVG. It uses `scaleLinear` for the x and y axes and `scaleOrdinal` with a custom color range to encode the three iris species. A color legend, composed of circles and text, displays the species categories. Tooltips are provided via SVG `<title>` elements, showing the numeric value of petal length for each data point.

AI-generated description

A scatter plot of The Iris Dataset with color legend.

MIT Licensed

Similar vizzes