Reusable D3 Scatter plot
This reusable scatter plot visualizes the Iris dataset, showing the relationship between petal width and sepal length across iris species. It uses D3 v7’s `scaleLinear`, `scaleOrdinal`, `symbol`, and `axisLeft`/`axisBottom` APIs to render SVG marks with distinct symbol shapes for each species, such as circles, crosses, and diamonds. The chart is built as a customizable function following the “Towards Reusable Charts” pattern, with setters for dimensions, margins, data accessors, and symbol size. Data is loaded from a GitHub Gist containing Fisher’s classic measurements.