Reusable Scatter plot Activity 8
✓ Published0🌍 Public
This interactive scatter plot visualizes the Iris dataset, cycling through four different flower measurements on the x-axis while keeping petal width on the y-axis. Data points are colored by species using a custom color mapping function, with legend labels and axis titles updating dynamically. The visualization uses D3's `csv`, `scaleLinear`, `axisLeft`, `axisBottom`, and `selectAll` APIs, with a reusable `scatterPlot` module and an animated `setInterval` loop that switches between measurement dimensions. SVG circles change their `cx` position as the x-axis scale recalculates, while decorative styling uses custom fonts, colors, and italicized text.
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