🌍 Public
Viewing a saved revision (read-only)
f315f8c9e0f0493ebd6436ce7482a757
Reusable scatter plot with different symbols
This example visualizes the Iris Dataset, plotting petal width against sepal length with each of the three species represented by a distinct D3 symbol (circle, cross, diamond, etc.) via `d3.scaleOrdinal` and `d3.symbol`. Rendering to SVG, the reusable `scatterPlot` function uses `d3.scaleLinear`, `d3.axisLeft`, and `d3.axisBottom` for scales and axes, while loading CSV data with `d3.csv`. Symbol size is fixed, and the chart adapts to the browser window dimensions.
AI-generated descriptionA vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.