Skip to main content
100%

Reusable Scatter plot

✓ Published0🌍 Public
HHemanthh81
Last edited Jul 22, 2023
Created on Jul 22, 2023

This example demonstrates an interactive scatter plot of the Iris dataset, cycling through combinations of sepal and petal measurements on the x-axis while keeping sepal length on the y-axis. Built with D3 v6, it loads CSV data via `d3.csv`, uses a reusable `scatterPlot` module with `scaleLinear`, `axisLeft`, and `axisBottom`, and animates axis changes with `setInterval`. The SVG also includes a custom color legend for species and styled axis labels.

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