Skip to main content
100%

Reusable Scatter Plot

✓ Published2🌍 Public
SShannon Teoh
Last edited May 25, 2024
Created on May 18, 2024
Forked from Scatter Plot

This example demonstrates a reusable scatter plot showing the relationship between petal length and sepal length in the Iris dataset. The plot uses d3.scaleLinear for axes and positioning, d3.axisLeft and d3.axisBottom for axis rendering, and SVG circles for marks. The code exposes a configurable scatterPlot() function with setters for width, height, data, values, margin, and radius, enabling flexible reuse. Data is loaded via d3.csv from a gist, with numeric parsing applied to each row.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes