Skip to main content
100%

Reusable Scatterplot 101

✓ Published1🌍 Public
AAlex
Last edited Apr 7, 2023
Created on Apr 7, 2023
Forked from Scatterplot 101

This example demonstrates a reusable scatterplot component that visualizes the Iris dataset, plotting petal length against sepal width for individual flowers. The code implements a closure-based scatterplot factory using d3.scaleLinear for scales, d3.axisBottom and d3.axisLeft to generate axes, and d3.csv to load data from a GitHub gist. The component accepts configurable accessors for x and y values, along with width, height, margin, and radius properties, then renders circles via SVG selections. The visualization is built with d3-selection’s join pattern to bind data to circle elements.

AI-generated description
MIT Licensed

Similar vizzes