Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Scatter Plot with Color

Public visualization

Viewing a saved revision (read-only)

df74b87ea7a147e69d17896c66ffef7a

Fork of Scatter Plot with Color

0 stars1🌍 Public
BBismark Kofi Owusu Sarfo
Last edited Oct 22, 2025
Created on Oct 22, 2025

This example presents a scatter plot of the classic Iris dataset, visualizing the relationship between sepal length and petal length for three flower species. Each circle is colored according to species, with a categorical color legend positioned in the top-right. Using `d3.scaleLinear` and `d3.scaleOrdinal` with `schemeCategory10`, it builds axes and a legend via custom functions that leverage `axisLeft`, `axisBottom`, and `selectAll(...).join(...)`. Data is loaded as a CSV and parsed in `index.js`.

AI-generated description