Activity 7 Scatter Plot
✓ Published0🌍 Public
This scatter plot visualizes the Iris dataset, showing the relationship between petal length (x-axis) and petal width (y-axis), with each point colored by species—setosa, versicolor, or virginica. The code loads the CSV from GitHub using D3’s `csv` and `scaleLinear` to map the data to SVG circle elements. It also includes axis labels, a legend-less color mapping via a custom `marker` function, and uses `extent` for domain calculation. The SVG is rendered full-window with margins, and axes are added via `axisLeft` and `axisBottom`.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed