D3 Scatterplot II - margin convention, axis
✓ Published1🌍 Public
MMarvin Frede
Last edited Sep 28, 2023
Created on Sep 28, 2023
Forked from D3 Scatterplot I - scaleLinear, domain, range
This example presents a scatterplot of the Iris dataset, visualizing petal length against sepal length with circular marks. The code uses D3 v7's `scaleLinear` to map data domains to pixel ranges, with margins applied to position the plot area. Axes are generated with `axisLeft` and `axisBottom` functions. The visualization is rendered as an SVG, with data loaded asynchronously via `d3.csv` from a remote gist URL, and point positions are computed and drawn using D3's selection and join operations.
AI-generated descriptionLearning about
- scaleLinear (and some other scale types)
- domain
- range
MIT Licensed