Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Reusable D3 Scatter Plot

Public visualization

Fork of Fork of Reusable D3 Scatter Plot

0 stars13🌍 Public
VVignesh Nallamothu
Last edited Apr 1, 2025
Created on Apr 1, 2025

This scatter plot visualizes the relationship between sleep duration and age, using data loaded from a CSV file. The code defines a reusable `scatterPlot` function with configurable properties for width, height, data, accessors, margin, and radius. It renders circles via D3’s data join and uses `d3.axisLeft` and `d3.axisBottom` for axes, with linear scales mapping sleep hours (0–11) and age (10–30). The SVG output fills the browser window.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed