D3 Scatter Plot
✓ Published2🌍 Public
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed