plot_gaussian.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import matplotlib.pyplot as plt
4 import numpy as np
5 import matplotlib.mlab as mlab
6 import math
7 import sys
8 
9 if len(sys.argv) != 3:
10  print("plot_gaussian.py mean variance")
11  sys.exit(1)
12 mean = float(sys.argv[1])
13 variance = float(sys.argv[2])
14 sigma = math.sqrt(variance)
15 x = np.linspace(-3*sigma+mean,3*sigma+mean,100)
16 plt.plot(x,mlab.normpdf(x,mean,sigma))
17 
18 plt.show()


jsk_pcl_ros
Author(s): Yohei Kakiuchi
autogenerated on Mon May 3 2021 03:03:47