Viewing a saved revision (read-only)
fea5a7fc1a064723a02db075bc5fd97c
d3.js
This interactive scatter plot animates through different pairings of measurements from the Iris dataset, cycling the x-axis among petal width, sepal width, petal length, and sepal length every few seconds. Using d3.csv to load the data and d3.scaleLinear, axisLeft, and axisBottom to construct the axes, the visualization updates in place via setInterval. Circular markers are color-coded by species (setosa, versicolor, virginica) using hardcoded hex values, with a custom legend, axis labels, and a title appended through d3 selection methods. The reusable scatterPlot function encapsulates the plot’s dimensions, scales, and rendering logic.
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.