T3.1-jaynicanunna
✓ Published1🌍 Public
This scatter plot visualizes the Iris dataset, mapping petal length and width on the axes and coloring each point by species (setosa, versicolor, and virginica). It uses D3 v6 via UNPKG, loading data from a CSV file, and scales the x and y positions with `scaleLinear`. The SVG circles are positioned with `attr` calls and colored through a switch statement. Axis labels are added with `axisLeft`, `axisBottom`, and `svg.append('text')`, while the chart resizes to the window dimensions using `window.innerWidth` and `window.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