Skip to main content
Public

Share visualization

Loading preview…

Scatter Plot with Color

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Scatter Plot with Color

0
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

Comments

Sign in to join the discussion.

MIT Licensed