Skip to main content
100%

adding axis to D3 scatterplot

✓ Published1🌍 Public
SSamuele Greco
Last edited Feb 9, 2022
Created on Feb 9, 2022
Forked from D3 scatterplot

This example shows a scatter plot of the Iris dataset, mapping petal length on the x-axis and sepal length on the y-axis, with points colored by species. Implemented in React with D3 v7, it uses `scaleLinear` for axis scaling, `extent` to compute domains, and `axisLeft`/`axisBottom` to render labeled axes. The SVG circles are positioned and colored via D3’s selection and join API, with margins offsetting the axis labels.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes