summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdata/combined/graphs/plots.py20
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"]