Skip to main content
100%

Reusable scatter plot implementing different symbols

✓ Published0🌍 Public
HHarshavardhan
Last edited Mar 24, 2023
Created on Mar 24, 2023

This example presents a reusable scatter plot that visualizes the Iris dataset, encoding species through different symbols. Built with D3 v6, it leverages d3.scaleLinear for axes, d3.scaleOrdinal to map species to a symbol range, and d3.symbol to generate the varying path shapes. The plot renders to an SVG canvas, with margins and axis labels for sepal_length and petal_width. The reusable scatterPlot function is configured through a fluent interface, accepting data, value accessors, and symbol mappings. Styling is applied via CSS, with additional d3.axisLeft and d3.axisBottom components.

AI-generated description

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

MIT Licensed

Similar vizzes