Skip to main content
100%

Reusable scatter plot with different symbols

✓ Published0🌍 Public
Bbhanuteja1807@gmail.com
Last edited Mar 25, 2023
Created on Mar 25, 2023

This example presents a reusable scatter plot comparing sepal length and petal width from the Iris dataset. It uses a D3 v6 SVG rendering with `scaleOrdinal` to assign one of the `symbols` shapes to each iris species, and `symbol().size()` to generate the path data for the data points. The chart’s axes are created with `axisLeft` and `axisBottom` from a linear scale. The `scatterPlot` function is modular, allowing configuration of data, margins, size, and value accessors through its getter-setter methods, which are invoked via `selection.call()`.

AI-generated description

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

MIT Licensed

Similar vizzes