🌍 Public
Viewing a saved revision (read-only)
21194df2fbd74bd6b12bd99c9511c5bc
Activity 6 tutorial 3.1
This example visualizes the Iris dataset with a scatter plot of petal length against petal width, where each circle’s color encodes the three species (setosa, versicolor, virginica) via a switch statement. The code loads CSV data with d3.csv, maps it into x/y positions using scaleLinear and extent, and renders SVG circles with attributes for fill and radius. Axis labels and tick marks are generated with d3.axisLeft and d3.axisBottom, while an inner text element adds rotated labels for both axes.
AI-generated descriptionWe are Displaying the IRIS dataset using Scatter plot.