summaryrefslogtreecommitdiffstats
path: root/data/combined/graphs/plots.py
diff options
context:
space:
mode:
authorJon Whiteaker <jbw@berkeley.edu>2012-08-22 01:08:00 -0700
committerJon Whiteaker <jbw@berkeley.edu>2012-08-22 01:08:00 -0700
commitbd894794b31290499656e67eb0c81bbed4bcbf56 (patch)
treef21fa974c7b9df7d44c852bc59416bfaa83e51a6 /data/combined/graphs/plots.py
parentdd885c624015878c0beaf6617de18e59083d1dbb (diff)
downloadkinect-bd894794b31290499656e67eb0c81bbed4bcbf56.tar.gz
fixed graphics to fit new format
Diffstat (limited to 'data/combined/graphs/plots.py')
-rwxr-xr-xdata/combined/graphs/plots.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/data/combined/graphs/plots.py b/data/combined/graphs/plots.py
index 8e855da..7b3940e 100755
--- a/data/combined/graphs/plots.py
+++ b/data/combined/graphs/plots.py
@@ -20,7 +20,7 @@ legend_width = 0.2
out_dir = sys.argv[1]
#limbs distribution
-plt.figure(figsize=(5.6,1.7))
+plt.figure(figsize=(6,1.8))
data = np.loadtxt("../limbs-avg-zdiff/data.csv",delimiter=",")
data = data[#(data[:,1] == 25)
((data != -1).all(1))
@@ -40,7 +40,7 @@ for i in range(len(mean)):
plt.savefig(os.path.join(out_dir,"limbs.pdf"),bbox_inches="tight",pad_inches=0.05)
#frames distribution
-plt.figure(figsize=(4.5,2))
+plt.figure(figsize=(3,1.3))
x = np.loadtxt("frames.txt",usecols=(0,))
y = range(1,len(x)+1)
width=0.8
@@ -55,7 +55,7 @@ plt.savefig(os.path.join(out_dir,"frames.pdf"),bbox_inches="tight",pad_inches=0.
l = ["3","5","10","all"]
#10-fold, naive
-plt.figure()
+plt.figure(figsize=(3,2.2))
for i in l:
x,y = np.loadtxt(i+"_nb_off.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
@@ -64,11 +64,11 @@ plt.ylabel("Precision [%]")
leg =plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(8./5)
+#plt.gca().set_aspect(8./5)
plt.savefig(os.path.join(out_dir,"offline-nb.pdf"),bbox_inches="tight",pad_inches=0.05)
#10-fold, SHT
-plt.figure()
+plt.figure(figsize=(3,2.2))
for i in l:
x,y = np.loadtxt(i+"_sht_off.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
@@ -77,11 +77,11 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="lower left")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(8./5)
+#plt.gca().set_aspect(8./5)
plt.savefig(os.path.join(out_dir,"offline-sht.pdf"),bbox_inches="tight",pad_inches=0.05)
#online,NB
-plt.figure()
+plt.figure(figsize=(3,2.2))
for i in l:
x,y = np.loadtxt(i+"_nb_on.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
@@ -90,11 +90,11 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(2)
+#plt.gca().set_aspect(2)
plt.savefig(os.path.join(out_dir,"online-nb.pdf"),bbox_inches="tight",pad_inches=0.05)
#online,SHT
-plt.figure()
+plt.figure(figsize=(3,2.2))
for i in l:
x,y = np.loadtxt(i+"_sht_on.mat",unpack=True)
plt.plot(100*x,100*y,label="$n_p=$ "+i)
@@ -103,11 +103,11 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(8./5)
+#plt.gca().set_aspect(8./5)
plt.savefig(os.path.join(out_dir,"online-sht.pdf"),bbox_inches="tight",pad_inches=0.05)
#face
-plt.figure()
+plt.figure(figsize=(3,2.2))
x,y = np.loadtxt("5_nb_split.mat",unpack=True)
a,b = np.loadtxt("face.csv",delimiter=",", unpack=True)
plt.plot(100*x,100*y,label="Skeleton")
@@ -117,11 +117,11 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(8./5)
+#plt.gca().set_aspect(8./5)
plt.savefig(os.path.join(out_dir,"face.pdf"),bbox_inches="tight",pad_inches=0.05)
#back
-plt.figure()
+plt.figure(figsize=(3,2.2))
x,y = np.loadtxt("back_all_sht_on.mat",unpack=True)
a,b = np.loadtxt("all_sht_off.mat",unpack=True)
c,d = np.loadtxt("front_back_all_sht.mat",unpack=True)
@@ -133,11 +133,11 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(8./5)
+#plt.gca().set_aspect(8./5)
plt.savefig(os.path.join(out_dir,"back.pdf"),bbox_inches="tight",pad_inches=0.05)
#variance-reduction
-plt.figure()
+plt.figure(figsize=(3,2.2))
x,y = np.loadtxt("half-var-all_sht_on.mat",unpack=True)
a,b = np.loadtxt("all_sht_on.mat",unpack=True)
plt.plot(100*x,100*y,label="Reduced noise")
@@ -147,5 +147,5 @@ plt.ylabel("Precision [%]")
leg = plt.legend(loc="best")
leg.get_frame().set_linewidth(legend_width)
plt.axis([20,100,50,100])
-plt.gca().set_aspect(8./5)
+#plt.gca().set_aspect(8./5)
plt.savefig(os.path.join(out_dir,"var.pdf"),bbox_inches="tight",pad_inches=0.05)