Skip to main content
100%

Activity 9&10

✓ Published0🌍 Public
Ssumanthnaidu213@gmail.com
Last edited Apr 24, 2024
Created on Apr 24, 2024

This example shows a reusable scatter plot of the Iris dataset, visualizing the relationship between petal length and petal width across three flower species (setosa, versicolor, and virginica) using colored circles on a D3.js SVG canvas. The code loads CSV data from a GitHub gist and uses `d3.csv` for parsing, `d3.scaleLinear` for coordinate mapping, and `d3.axisBottom` and `d3.axisLeft` to render the axes. Species are distinguished by fill colors: skyblue, lightgreen, and orange. A separate `scatterPlot.js` module demonstrates a reusable chart function, while `index.js` contains the direct implementation with dynamic window sizing.

AI-generated description

A demonstration of reusable scatter plot.

MIT Licensed

Similar vizzes