🌍 Public
Viewing a saved revision (read-only)
578ad2771bd74b9f885c5dc6d7749848
Tutorial 3.2 : Scatter plot
This scatter plot visualizes the Iris dataset, mapping sepal length against petal length and distinguishing iris species by shape using d3.scaleOrdinal and d3.symbolsFill. The code imports modular D3 functions like axisLeft, axisBottom, and csvParse from d3.v7, and builds the chart with a custom scatterPlot module that renders symbols via the symbol generator. A separate shapeLegend module displays the species categories, while axes labels clarify the measurements. Data loads asynchronously via fetch from a GitHub-hosted CSV file.
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.