Skip to main content
100%

Fork of Reusable scatter plot with different symbols

✓ Published0🌍 Public
Jjia-sin
Last edited Apr 11, 2023
Created on Apr 11, 2023

This example displays the classic Iris Dataset, plotting petal width against sepal length and using different symbols to distinguish between the three iris species. The code loads CSV data via `d3.csv`, maps each measurement to numeric values, and uses `d3.scaleLinear` for both axes and `d3.scaleOrdinal` to map species to a set of D3 symbols via `d3.symbol`. A reusable `scatterPlot` function configures margins, axis labels, and symbol size, then renders the chart as SVG with `d3.axisBottom` and `d3.axisLeft`.

AI-generated description

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

MIT Licensed

Similar vizzes