Skip to main content
100%

Fork of Reusable D3 Scatter Plot

✓ Published0🌍 Public
Ccsantiagopaz
Last edited Sep 3, 2023
Created on Sep 3, 2023

This example shows the Iris Dataset as an animated scatter plot. A reusable chart function, inspired by Mike Bostock's "Towards Reusable Charts," cycles through different x-axis variables every two seconds, updating the position of circles via D3's data join and scaleLinear domains. The code uses d3.csv to load the data, d3.scaleLinear, d3.axisLeft, and d3.axisBottom for rendering, with SVG output and a setInterval driving the animation. Circles represent individual iris flowers, with the y-axis fixed to sepal length while the x-axis rotates among petal width, sepal width, petal length, and sepal length.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes