Skip to main content
Public

Share visualization

Loading preview…

Fork of Reusable D3 Scatter Plot with Symbols

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

Fork of Reusable D3 Scatter Plot with Symbols

0
IIsabel Cayer
Last edited Jul 24, 2025
Created on Jul 24, 2025

This example presents a scatter plot of the Iris dataset, showing petal width against sepal length, with distinct d3 symbol shapes (circles, crosses, diamonds, etc.) encoding the different Iris species. It is built using a reusable `scatterPlot` function in D3 v6, which leverages `scaleLinear` for axes, `scaleOrdinal` to map species to symbols, and a `symbolGenerator` to render SVG paths. The plot reads the dataset from a remote CSV via `d3.csv`, displays axes using `axisLeft` and `axisBottom`, and supports configurable margins and symbol size through its fluent API.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed