Skip to main content
100%

Fork of ICE-7 Resuable scatter plot

✓ Published0🌍 Public
SSaiSreya1
Last edited Jul 2, 2022
Created on Jul 2, 2022

This animated scatter plot uses the Iris flower dataset to explore relationships between petal and sepal measurements. The code draws colored circles representing three species—green for setosa, indigo for versicolor, and red for virginica—using d3.scaleLinear, d3.extent, d3.axisLeft, and d3.axisBottom. Every two seconds, a setInterval callback updates the x-axis mapping to cycle through petal_width, sepal_width, petal_length, and sepal_length, while the y-axis stays fixed on sepal_length. The visualization employs a reusable scatterPlot function that updates existing SVG circles and axes through data joins.

AI-generated description
MIT Licensed

Similar vizzes