Skip to main content
100%

Reusable Scatter plot Activity 8

✓ Published0🌍 Public
VVenkat-Sumith-Thota
Last edited Jul 9, 2023
Created on Jul 9, 2023
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes