Skip to main content
100%

tutorial 3.2

✓ Published0🌍 Public
Ssamithareddy9@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024

This example visualizes the classic Iris dataset, plotting sepal length along the x-axis and petal length along the y-axis for individual flowers. Each data point is represented by a distinct shape corresponding to its species, with a legend showing the species-to-shape mapping. The code builds the scatter plot using d3’s `scaleLinear` and `scaleOrdinal` scales, and renders points via `symbol` generators. Axes are added using `axisLeft` and `axisBottom`, while the shape legend is constructed manually with `symbol` and text elements. Data is loaded asynchronously via `fetch` from a remote CSV file.

AI-generated description
MIT Licensed

Similar vizzes