Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable scatter plot with different symbols

Public visualization

Viewing a saved revision (read-only)

0b5a97918a28418daafb173e2b8df5d8

Fork of Reusable scatter plot with different symbols

0 stars0🌍 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.