Go to the documentation of this file.00001
00002
00003 import matplotlib.pyplot as plt
00004 import numpy as np
00005 import matplotlib.mlab as mlab
00006 import math
00007 import sys
00008
00009 if len(sys.argv) != 3:
00010 print "plot_gaussian.py mean variance"
00011 sys.exit(1)
00012 mean = float(sys.argv[1])
00013 variance = float(sys.argv[2])
00014 sigma = math.sqrt(variance)
00015 x = np.linspace(-3*sigma+mean,3*sigma+mean,100)
00016 plt.plot(x,mlab.normpdf(x,mean,sigma))
00017
00018 plt.show()