🌍 Public
Viewing a saved revision (read-only)
98ef7c35983f48bd92406f124219ecac
Fork of Reusable D3 Scatter Plot with Symbols
This example visualizes the Iris dataset as a scatter plot, mapping petal width and sepal length along the axes while using distinct D3 symbols to differentiate iris species. The code renders SVG via a reusable `scatterPlot` function that takes configuration for dimensions, margins, and accessor functions. It uses `d3.scaleLinear` for positioning, `d3.scaleOrdinal` to assign `d3.symbols` shapes per species, and `d3.symbol` to generate path data. Axes are added with `d3.axisLeft` and `d3.axisBottom`, while data is loaded asynchronously with `d3.csv`.
AI-generated descriptionA vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.