🌍 Public
Viewing a saved revision (read-only)
17bbde8286ee4b36ae254d5c2616c2ed
Activity6 tutorial 3.2
This example visualizes the classic Iris dataset as a scatter plot, mapping sepal length on the x-axis and petal length on the y-axis. Each species—setosa, versicolor, and virginica—appears as a distinct shape (circle, cross, or diamond) rendered as SVG paths using d3.symbol(). The code builds the chart with d3.scaleLinear for axes, d3.scaleOrdinal for shape mapping, and d3.axisBottom/axisLeft for ticks. A custom shapeLegend function creates a legend showing each species symbol. Data is loaded from a remote CSV via d3.csv.
AI-generated description