Skip to main content
100%

Scatter Plot with Color

✓ Published0🌍 Public
BBismark Kofi Owusu Sarfo
Last edited Oct 22, 2025
Created on Oct 22, 2025

This example builds an interactive scatter plot of the Iris dataset, mapping sepal length to the x-axis and petal length to the y-axis. Each point is colored by its species, with a color legend identifying the three categories. The visualization is rendered using D3.js, leveraging `scaleLinear` for axes, `scaleOrdinal` with `schemeCategory10` for categorical colors, and an `axisLeft`/`axisBottom` pair for the plot frame. A custom `colorLegend` function adds the species key.

AI-generated description
MIT Licensed

Similar vizzes