Activity 6 tutorial 3.1
✓ Published0🌍 Public
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.
MIT Licensed