Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Scatter Plot with Color

Public visualization

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

Comments

Sign in to join the discussion.

MIT Licensed