Reusable Scatter plot Activity 8
✓ Published0🌍 Public
This interactive scatter plot animates through different pairings of sepal and petal measurements from the classic Iris dataset, cycling the x-axis variable every few seconds. The visualization color-codes points by species (setosa, versicolor, and virginica) and includes a legend and axis labels. Built with D3 v6, it uses `scaleLinear`, `axisBottom`, `axisLeft`, and `csv` for data loading, alongside a reusable `scatterPlot` module. SVG circles render the marks, with `setInterval` driving the animation and `selectAll`/`join` managing the updating elements.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed