Skip to main content
100%

Making a Scatter Plot

✓ Published3🌍 Public
OOscar
Last edited Jan 24, 2026
Created on Jan 21, 2026

This example demonstrates how to build a scatter plot from the classic Iris dataset, encoding petal length on the x-axis and sepal width on the y-axis. It uses React to define custom SVG components, with D3 v5 functions like `scaleLinear`, `extent`, and `format` to compute scales and axis ticks, while the data is loaded asynchronously from a CSV file via D3's `csv` function. The visualization includes labeled axes, formatted tick marks, and circular marks with tooltips, all rendered as SVG elements within a React component.

AI-generated description
MIT Licensed

Similar vizzes