Skip to main content
100%

Reusable D3 Scatter Plot with Symbols

✓ Published0🌍 Public
RReyden Harris
Last edited Mar 13, 2023
Created on Mar 13, 2023

This example presents a reusable D3 scatter plot visualizing the Iris Dataset, mapping petal width to the x-axis and sepal length to the y-axis. It uses an ordinal scale with D3’s built-in symbol generators to distinguish the three iris species by shape. The plot is rendered as SVG, with axes added via `axisLeft` and `axisBottom`. The code defines a configurable `scatterPlot` function, allowing custom setters for data, value accessors, margins, symbol size, and dimensions, and is invoked with chained methods in `index.js`.

AI-generated description

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

MIT Licensed

Similar vizzes