Skip to main content
100%

Gist 4265880

✓ Published0🌍 Public
TThanad
Last edited Dec 12, 2012
Created on Dec 12, 2012

This example demonstrates hexagonal binning of 2,000 normally distributed random points. The color of each hexagon encodes the number of points within that bin, transitioning from white to steelblue across a linear color scale. Built with the d3.hexbin plugin, the visualization renders as an SVG composed of hexagonal paths. The code constructs the color mapping using d3.scale.linear with Lab interpolation and uses d3.svg.axis to add coordinate axes.

AI-generated description

This example shows how to use the d3.hexbin plugin for hexagonal binning. 2,000 random points with a normal distribution are binned into hexagons; color encodes the number of points that fall into each bin. You can also use area encoding. Inspired by earlier work by Zachary Forest Johnson.

Similar vizzes