Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Scatterplot II - margin convention, axis

Public visualization

D3 Scatterplot II - margin convention, axis

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed