Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Creating a Scatter Plot with D3

Public visualization

Viewing a saved revision (read-only)

defcc628915a4339882a58322b9ce3dc

Creating a Scatter Plot with D3

0 stars0🌍 Public
SShivaKarpe
Last edited Mar 6, 2022
Created on Mar 6, 2022

This example visualizes the Iris Dataset as a scatter plot, encoding petal length on the x-axis and petal width on the y-axis, with each point colored by species (green for setosa, yellow for versicolor, blue for virginica). It also reads sepal length and width as additional attributes for each circle, though these are not mapped to visual channels. Built with D3 v6, the code uses `d3.csv` to load data, `scaleLinear` and `extent` for scaling, and `axisLeft`/`axisBottom` for axes. Circles are appended via `selectAll` and `join`, rendered as SVG, with axis labels and a title manually positioned.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.