Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 9&10

Public visualization

Viewing a saved revision (read-only)

bda3975b4ccb46ea8e24a437b9b9b097

Activity 9&10

0 stars0🌍 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.