Skip to main content
100%

Reusable D3 Scatter Plot Following Along

✓ Published2🌍 Public
PParker-D5
Last edited Oct 6, 2023
Created on Oct 4, 2023

This example demonstrates a reusable scatter plot that animates through different Iris flower measurements, cycling between petal width, sepal width, petal length, and sepal length every two seconds. The visualization uses D3's `scaleLinear`, `axisLeft`, `axisBottom`, and data join methods to render SVG circles and axes, with the `scatterPlot` function implementing a reusable chart pattern. The plot updates smoothly as new x-value accessors are assigned, showing how the same underlying data can reveal different patterns depending on which variables are compared. It loads the Iris dataset from a CSV file and renders it at full window size.

AI-generated description
MIT Licensed

Similar vizzes