The following code plots three normalized Gaussian functions with different standard deviations.
import pylab
x = pylab.linspace(-6, 6, 1000)
def gaussian(x, sigma):
""" Return the normalized Gaussian with standard deviation sigma. """
c = pylab.sqrt(2 * pylab.pi)
return pylab.exp(-0.5 * (x / sigma)**2) / sigma / c
sigma1, sigma2, sigma3 = 1, 1.5, 2
g1, g2, g3 = gaussian(x, sigma1), gaussian(x, sigma2), gaussian(x, sigma3)
pylab.plot(x, g1)
pylab.plot(x, g2)
pylab.plot(x, g3)
pylab.show()