Reusable scatter plot implementing different symbols
✓ Published0🌍 Public
HHarshavardhan
Last edited Mar 24, 2023
Created on Mar 24, 2023
Forked from Reusable scatter plot with different symbols
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 descriptionA vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.
MIT Licensed