Skip to main content
100%

Creating a Scatter Plot with D3.js

✓ Published0🌍 Public
SsreepavanKothapalli
Last edited Mar 23, 2023
Created on Mar 22, 2023

This example visualizes the Iris flower dataset as a scatter plot, showing the relationship between petal length and petal width. Each circle represents a flower, colored by its species (blue, grey, or brown) using a custom marker function. The code loads CSV data with D3’s `csv` method, scales values with `scaleLinear` and `extent`, and renders axes via `axisLeft` and `axisBottom`. Circles are appended to an SVG using `select`, `data`, and `join`, with styling applied through `attr` properties.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes