Skip to main content
100%

Reusable Scatter plot Activity 8

✓ Published0🌍 Public
NNukaShravanKumar
Last edited Jul 20, 2023
Created on Jul 20, 2023
Forked from Hello VizHub

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 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