Skip to main content
100%

Reusable D3 Scatter Plot with Symbols

✓ Published0🌍 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
MIT Licensed

Similar vizzes