Skip to main content
100%

D3 Scatter Plot

✓ Published2🌍 Public
Rroyable88
Last edited Jan 25, 2023
Created on Jan 4, 2023
Forked from HTML Starter

This example uses D3.js to create a scatter plot of the Iris dataset, mapping petal width to the x-axis and sepal length to the y-axis. The visualization displays each flower as a circle with a fixed radius, scaled using D3’s `scaleLinear` and `extent` functions, with axes generated via `axisLeft` and `axisBottom`. Rendering is done with SVG elements inside a React component, and the data is loaded asynchronously from a CSV file using `csv` from D3. The code’s custom `scatterPlot` function uses a getter-setter pattern to configure width, height, margins, and value accessors.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes