π Public
Reusable D3 Scatter Plot
This scatter plot visualizes the Iris flower dataset, mapping petal length against sepal length. The D3.js code loads the data via `d3.csv` from a Gist URL, then uses a custom `scatterPlot` function. The chart creates a reusable component with settable `width` and `height` properties, rendered as SVG circles. Linear scales via `d3.scaleLinear` position the marks, while `d3.axisLeft` and `d3.axisBottom` add labeled axes with a margin-based layout, all drawn within a full-window SVG.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.