Activity6_Task3
✓ Published0🌍 Public
This example displays a scatter plot of the Iris dataset, plotting petal length against petal width, with each point colored by species (setosa, versicolor, or virginica) using a custom marker function. It loads the CSV data from a GitHub repository via `d3.csv`, then uses `d3.scaleLinear` with `extent` to map the data to pixel coordinates. The visualization renders circles as SVG elements using `select('body').append('svg')`, with axes drawn via `d3.axisLeft` and `d3.axisBottom`. The code also includes unused sepal length and width values mapped to circle `rx` and `ry` attributes, though the radius remains fixed.
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