Skip to main content
100%

Dynamic D3 scatterplot

✓ Published1🌍 Public
BBart van Pelt
Last edited Jan 20, 2023
Created on Jan 19, 2023

This dynamic scatterplot animates through different variable combinations from the Iris dataset, cycling every two seconds between four attribute pairings. Each transition re-maps the x-axis to a new column while keeping sepal length on the y-axis, with the circles smoothly repositioning to reflect the changing correlations. Built with D3 v7, the visualization uses the `scaleLinear`, `extent`, and `axisLeft`/`axisBottom` functions from the `d3` import, along with a custom scatterPlot module that handles the SVG rendering via the `.join()` pattern for efficient updates. The animation is driven by `setInterval` in the main script, which alternates the x value function and re-invokes the plot.

AI-generated description
MIT Licensed

Similar vizzes