Reusable Scatter plot Activity 8
✓ Published0🌍 Public
This example demonstrates an interactive scatter plot that cycles through different iris flower measurements on the x-axis, using petal width, sepal width, petal length, and sepal length in sequence with animation. The visualization loads the Iris dataset via D3’s `csv` function and uses a reusable `scatterPlot` module built with D3 v6, employing `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` for scales and axes. SVG circles are colored by species (setosa, versicolor, virginica) using custom color mappings, with a legend and axis labels rendered as SVG text elements. The animation updates the x-axis mapping every few seconds via `setInterval`.
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