Reusable D3 Scatter Plot
✓ Published0🌍 Public
This example presents a reusable scatter plot of the Iris dataset, cycling through different feature pairs on the x-axis via an animation. The visualization uses D3 v6 to render SVG circles colored by species, with a legend and axis labels updating dynamically. The scatter plot is implemented as a configurable function via `scatterPlot()`, leveraging `scaleLinear`, `extent`, `axisLeft`, and `axisBottom`. A `setInterval` updates the x-axis mapping, while the y-axis remains fixed to sepal length. The code loads CSV data from a Gist and displays it across the full viewport.
AI-generated descriptionA reusable scatter plot inspired by Towards Reusable Charts.
Shows the Iris Dataset.
MIT Licensed