Fork of Reusable D3 Scatter Plot
✓ Published1🌍 Public
This example shows a reusable scatter plot of the Iris dataset, cycling through four different axes (petal width, sepal width, petal length, and sepal length) every two seconds to reveal different relationships between measurements. Data points use D3’s `scaleOrdinal` with `symbols` and `schemeCategory10` to give each iris species a distinct shape and color. The chart is built with a custom `scatterPlot` function that leverages `d3.scaleLinear`, `d3.axisLeft`, `d3.axisBottom`, and `selection.join`, and is animated via `setInterval` updating the x-value accessor. The SVG renders full-window, and the dataset is loaded from a CSV using `d3.csv`.
AI-generated descriptionA reusable scatter plot inspired by Towards Reusable Charts.
Shows the Iris Dataset.
MIT Licensed