tutorial 3.2
✓ Published0🌍 Public
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 descriptionMIT Licensed