Skip to main content
100%

Gist ed9f5cb822cdadb5216c

✓ Published0🌍 Public
SSpaceActuary
Last edited Dec 23, 2014
Created on Dec 23, 2014

A normal probability density curve animates from a flat baseline into a bell-shaped distribution on click. Each click repositions the curve’s mean to the mouse’s x-coordinate, with the area under the curve filling pink while the outline stays black. The code uses jStat to generate PDF values across a fixed domain, then d3.svg.area and d3.svg.line with basis interpolation to draw smooth shapes. Transitions with `.delay()` and `.duration()` animate the path’s `d` attribute, and the svg’s click event drives the updates.

AI-generated description

Similar vizzes