Activity 7 Scatter Plot
✓ Published0🌍 Public
This example displays a scatter plot of the Iris dataset, mapping petal length and width to the x and y axes while coloring each point by species (setosa, versicolor, or virginica) using skyblue, lightgreen, and orange. The visualization also encodes sepal length and width as the rx and ry attributes of each circle, though these do not affect the rendered shape since the radius is fixed. It loads CSV data from a GitHub URL using `d3.csv`, applies linear scales via `scaleLinear`, and renders axes with `axisLeft` and `axisBottom`. The code uses D3 v6 through a UNPKG script import with SVG rendering.
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