Skip to main content
100%

Activity3Tutorial3.2

✓ Published0🌍 Public
Rramyaraomadhavareddy@gmail.com
Last edited Oct 23, 2024
Created on Oct 23, 2024

This example visualizes the iris dataset as a scatter plot, mapping sepal length to the x-axis and petal length to the y-axis, with each species represented by a distinct shape from D3’s `symbolsFill` array. A legend built with the `shapeLegend` module identifies the species symbols. The code uses D3 v7 (`d3.scaleLinear`, `d3.scaleOrdinal`, `d3.extent`, `d3.symbol`) to construct scales and generate marks via the `symbolGenerator`. Data is fetched as CSV from GitHub, parsed with `d3.csvParse`, and rendered responsively to the full window size. The axes and labels are drawn through a reusable `axes` module.

AI-generated description
MIT Licensed

Similar vizzes