Skip to main content
Public

Share visualization

Loading preview…

Scatter Plot with Colour Legend

vizhub.com

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

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 & exportHTML, source ZIP

Scatter Plot with Colour Legend

0 stars1Public
CChris Briggs
Last edited Nov 18, 2021
Created on Nov 18, 2021

This interactive scatter plot visualizes the Iris dataset, plotting petal length against sepal width. Each point is colored by species, with a categorical color legend displaying the three species types (setosa, versicolor, and virginica) using distinct colors. Built with React and D3 v5, the visualization uses `scaleLinear` for the x and y axes, `scaleOrdinal` for the color encoding, and renders as an SVG with circles representing individual data points. The code includes hover tooltips showing the petal length value, and the data is loaded from a CSV file containing 150 iris flower measurements.

AI-generated description

A Scatter Plot based on Iris Data

Comments

Sign in to join the discussion.

MIT Licensed