Reusable Scatter Plot using iris data set
✓ Published1🌍 Public
This example presents an animated scatter plot of the classic Iris dataset, cycling through four different feature combinations on the x-axis—petal width, sepal width, petal length, and sepal length—while the y-axis remains sepal length. Data points are colored by species (setosa, versicolor, virginica) via a reusable `scatterPlot` function built with D3 v6, which uses `scaleLinear` for axes and `axisLeft`/`axisBottom` for ticks. The animation is driven by a `setInterval` that updates the x-value accessor and re-renders SVG circles. Data is loaded as CSV from a gist using D3’s `csv` method, with legend rectangles and text labels added manually.
AI-generated descriptionMIT Licensed