Skip to main content
100%

Reusable D3 Scatter Plot

✓ Published18🌍 Public
NNikhilMakkena
Last edited Mar 27, 2022
Created on Mar 26, 2022

This reusable scatter plot visualizes the Iris dataset, mapping sepal and petal measurements to x and y axes while coloring each point by species. Built with D3 v6, it uses `d3.scaleLinear`, `d3.scaleOrdinal`, and `d3.axisBottom`/`d3.axisLeft` to render axes and positioned SVG circles with a custom `scatterPlot()` chart factory. The plot cycles through four measurement combinations every two seconds via `setInterval`, updating the x-axis and circle positions with an animated transition. A static legend identifies the three iris species.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes