diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2012-03-04 04:23:15 -0800 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2012-03-04 04:24:43 -0800 |
| commit | 98a795015ea6bc565180a5330c0cf1ac36fda3e3 (patch) | |
| tree | 9b218189bfb3eef2d13861266cfc56577b33d34d /data/combined/graphs/plots.py | |
| parent | 024f8d1577ffcea50fb4f0cdfcb26a9cf2e91c47 (diff) | |
| download | kinect-98a795015ea6bc565180a5330c0cf1ac36fda3e3.tar.gz | |
Limbs length distribution
Diffstat (limited to 'data/combined/graphs/plots.py')
| -rwxr-xr-x | data/combined/graphs/plots.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/data/combined/graphs/plots.py b/data/combined/graphs/plots.py index fc13369..98b9bc5 100755 --- a/data/combined/graphs/plots.py +++ b/data/combined/graphs/plots.py @@ -2,11 +2,30 @@ import numpy as np import matplotlib.pyplot as plt +import matplotlib.mlab as mlab import sys import os +import scipy + out_dir = sys.argv[1] +#limbs distribution +plt.cla() +data = np.loadtxt("../limbs-avg-zdiff/data.csv",delimiter=",") +data = data[#(data[:,1] == 25) + ((data != -1).all(1)) + & (data[:,4]>2) + & (data[:,4]<3)] +data = data[:,7:]*100 +mean = data.mean(0) +var = data.std(0) +for i in range(len(mean)): + plt.subplot(3,3,i+1) + n,b,p = plt.hist(data[:,i],bins=50,normed=1) + plt.plot(b,mlab.normpdf(b,mean[i],var[i])) +plt.savefig(os.path.join(out_dir,"limbs.pdf")) + #frames distribution plt.cla() x = np.loadtxt("frames.txt",usecols=(0,)) @@ -19,7 +38,6 @@ plt.xlabel("Individual") plt.ylabel("Frame ratio [%]") plt.ylim(0,17) ax = plt.gca() -#ax.set_aspect(1) plt.savefig(os.path.join(out_dir,"frames.pdf")) l = ["3","5","10","all"] |
