Skip to main content
100%

D3 Scatterplot II - margin convention, axis

✓ Published1🌍 Public
MMarvin Frede
Last edited Sep 28, 2023
Created on Sep 28, 2023

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 description

Learning about

  • scaleLinear (and some other scale types)
  • domain
  • range
MIT Licensed

Similar vizzes