Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Reusable D3 Scatter Plot with Symbols

Public visualization

Viewing a saved revision (read-only)

1a9f01c2e1e34f8d881feaf6c92d9232

Reusable D3 Scatter Plot with Symbols

0 stars0🌍 Public
Nnim@brejnholt.dk
Last edited Feb 1, 2024
Created on Feb 1, 2024

This example shows a reusable scatter plot of the Iris dataset, where each flower is represented by a distinct symbol indicating its species. The plot maps petal width to the x-axis and sepal length to the y-axis, with axes added via d3.axisLeft and d3.axisBottom. The code implements a modular scatterPlot component using d3.scaleLinear for positioning, d3.scaleOrdinal with d3.symbols for shape encoding, and a chainable API for configuration. Data is loaded as CSV from a remote URL, and the entire visualization is rendered as SVG.

AI-generated description