🌍 Public
Viewing a saved revision (read-only)
1dcb97e9e3c64245b0396075d9de0abc
Activity6_tutorial3.2
This scatter plot shows the relationship between sepal length and petal length for Iris flowers, with each species represented by a distinct shape in a custom legend. The visualization uses D3 v7's `scaleLinear` and `scaleOrdinal` to map measurements and categorical species, while the `symbol()` generator draws the shape marks. Data is loaded from a remote CSV file via `fetch` and `csvParse`, then parsed into numeric fields. Axes and labels are created using custom `axisLeft` and `axisBottom` functions from D3's `d3` module, and the shape legend is built dynamically with positioned `path` and `text` elements.
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.