Skip to main content
Public

Share visualization

Loading preview…

Reusable Scatter Plot with Iris Data

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

Reusable Scatter Plot with Iris Data

0
Ggopiganta
Last edited Mar 27, 2022
Created on Mar 27, 2022

This reusable D3 scatter plot visualizes the Iris dataset, mapping petal length and width on the x- and y-axes while coloring each point by species (green for setosa, purple for versicolor, red for virginica). The code loads CSV data via `d3.csv`, uses `d3.scaleLinear` for axes, and renders circles as SVG marks. It also applies `d3.axisLeft` and `d3.axisBottom` for labeled scales, with axes and text styled via CSS. The plot is fully responsive, sizing to the browser window.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed