Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Scatter Plot

Public visualization

Making a Scatter Plot

0 stars3🌍 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

Comments

Sign in to join the discussion.

MIT Licensed