🌍 Public
Viewing a saved revision (read-only)
e44546c20f3b4a7faa0c7a71164bc872
Tutorial 3.2
A D3.js scatter plot displays iris flower measurements, plotting sepal length against petal length. Distinct symbols represent different species, with a legend mapping each species to its corresponding marker shape. The visualization loads CSV data from a GitHub repository, parsing and converting numerical strings to numbers. The code constructs linear scales for both axes and an ordinal scale for shapes, using `d3.scaleLinear`, `d3.scaleOrdinal`, and `d3.symbol` to generate the visual encoding. Custom functions manage axes and legend rendering via `d3.select` and SVG path joins.
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.