Skip to main content
Public

Share visualization

Loading preview…

Making Scatter Plot with Colors

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

Making Scatter Plot with Colors

1
MMinh Luong
Last edited Jan 10, 2022
Created on Jan 10, 2022

This visualization shows the classic Iris dataset as a scatter plot, mapping sepal length along the horizontal axis and sepal width along the vertical axis, with each species distinguished by a different color. The plot uses React to render SVG elements, while D3 v5 provides scaling functions (`scaleLinear`, `scaleOrdinal`) for positioning and coloring. Custom components handle the axes and color legend, and the data is loaded from a CSV file using D3’s `csv` function.

AI-generated description

A scatter plot of The Iris Dataset

Comments

Sign in to join the discussion.

MIT Licensed