Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable D3 Scatter Plot with Symbols

Public visualization

Viewing a saved revision (read-only)

98ef7c35983f48bd92406f124219ecac

Fork of Reusable D3 Scatter Plot with Symbols

0 stars0🌍 Public
Zzhuomo-maker
Last edited Jun 24, 2023
Created on Jun 24, 2023

This example visualizes the Iris dataset as a scatter plot, mapping petal width and sepal length along the axes while using distinct D3 symbols to differentiate iris species. The code renders SVG via a reusable `scatterPlot` function that takes configuration for dimensions, margins, and accessor functions. It uses `d3.scaleLinear` for positioning, `d3.scaleOrdinal` to assign `d3.symbols` shapes per species, and `d3.symbol` to generate path data. Axes are added with `d3.axisLeft` and `d3.axisBottom`, while data is loaded asynchronously with `d3.csv`.

AI-generated description

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