Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Reusable ScatterPlot with Symbols

Public visualization

Reusable ScatterPlot with Symbols

0 stars1🌍 Public
WWRCIECH
Last edited Dec 31, 2022
Created on Dec 30, 2022

This example shows a reusable scatterplot of the Iris dataset, where each point is drawn as a distinct symbol based on flower variety. It uses D3’s `scaleOrdinal` to map varieties to D3 symbols, and `symbol` to generate the SVG paths. The chart axes are created with `axisLeft` and `axisBottom`, while a `scaleLinear` maps petal length and sepal width. The chart is packaged as a configurable function, allowing the data, accessors, margins, and symbol size to be set by the caller.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed