Skip to main content
100%

Basic starter code for many simple D3 charts, v4

✓ Published0🌍 Public
LLucyI
Last edited Mar 31, 2017
Created on Mar 31, 2017

A scatterplot displays Anscombe’s Quartet, with points labeled by their x- and y-coordinates and grouped by quartile. The chart uses D3 v4’s `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisRight`, with axes positioned on the right and bottom of an SVG canvas. Data loads from a tab-separated file via `d3.tsv`, and the x- and y-domain extents are updated based on the loaded values. Each point is drawn as a `circle` with a sibling `text` label, both grouped in a transformed `<g>` element.

AI-generated description

A basic scatterplot that loads data, scales and axes and updates domains based on extrema. Uses Mike Bostock's margin conventions and the data for Anscombe's Quartet.

forked from <a href='http://bl.ocks.org/kpq/'>kpq</a>'s block: <a href='http://bl.ocks.org/kpq/4ec215b40c1d559fcb2a'>Basic starter code for many simple D3 charts</a>

forked from <a href='http://bl.ocks.org/sxywu/'>sxywu</a>'s block: <a href='http://bl.ocks.org/sxywu/08e7b999c0a5c1977b34edc7870071e4'>Basic starter code for many simple D3 charts, v4</a>

mit Licensed

Similar vizzes