Skip to main content
100%

Reusable scatter plot with different symbols

✓ Published0🌍 Public
Pprachow
Last edited Mar 13, 2023
Created on Mar 13, 2023

This example presents a scatter plot of the Iris dataset, using different symbol shapes and colors to distinguish the three plant species based on petal width and sepal length. The visualization is built as a reusable D3 component with a configured margin, scales, and axes. The code imports D3’s `scaleLinear`, `scaleOrdinal`, `symbol`, and `symbols` APIs to map data values to chart positions and marker types, while `csv` loads the remote dataset. Rendered as SVG, the plot resizes to fit the window and includes custom tick styling.

AI-generated description

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

MIT Licensed

Similar vizzes