Skip to main content
100%

Reusable D3 Scatter Plot-ICE7

✓ Published0🌍 Public
NNitheeshSama
Last edited Mar 26, 2023
Created on Mar 25, 2023

This example shows an animated scatter plot of the Iris dataset, cycling through four different x-axis variables (petal width, sepal width, petal length, and sepal length) every 1.5 seconds while keeping sepal length as the y-axis. It uses D3 v6 with the reusable `scatterPlot` module, which employs `scaleLinear`, `scaleOrdinal`, `axisLeft`, and `axisBottom` to render SVG circles and axes. Species are color-coded via an ordinal scale, and a legend is drawn manually. The data is loaded from a GitHub gist CSV using `d3.csv`, with `setInterval` triggering the axis transitions.

AI-generated description
MIT Licensed

Similar vizzes