Activity 7 Scatter Plot - 3
✓ Published0🌍 Public
This scatter plot visualizes the Iris dataset, showing petal length against petal width, with each point colored by species (setosa, versicolor, or virginica) using a simple switch-based color mapping. The visualization loads data from a remote CSV file via `d3.csv`, scales the axes with `d3.scaleLinear`, and renders circles as SVG elements using `d3.select` and data joins. Axis labels are added with rotating text, and the layout adapts to the window size using `window.innerWidth` and `innerHeight`.
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