Function Family — Normal Densities at Three Widths
Three normal densities sharing a mean and differing in width, written as formulas rather than as sampled points. The engine carries erf and gamma for exactly this reason: a density written out of exp and log by hand is where the arithmetic error usually enters, and a figure of a wrong density is indistinguishable from a figure of a right one.
Make it your own.
title: Normal densities
subtitle: μ = 0, three standard deviations
x: x
y: Probability density
grid: both
legend: right
plot "σ = 0.5" y = exp(-x^2/(2*0.25))/(0.5*sqrt(2pi)) for x in [-6, 6]
plot "σ = 1" y = exp(-x^2/2)/sqrt(2pi) for x in [-6, 6]
plot "σ = 2" y = exp(-x^2/8)/(2*sqrt(2pi)) for x in [-6, 6]
note: Written as formulas, so the figure and the caption cannot disagree about which density is drawn. The engine parses these; it never evaluates them as code.