summaryrefslogtreecommitdiffstats
path: root/ic_experiments/plot3d.py
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2015-09-14 23:08:02 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2015-09-14 23:08:02 -0400
commitab0b1f3cefedb35327a19ec1b6afd560bfdf802d (patch)
treeb777f3e2c0ac0e712d8c5faab5107b1d236e2c3a /ic_experiments/plot3d.py
parent960676226862d2d68c7a9c04c56d4f8157803025 (diff)
downloadcriminal_cascades-ab0b1f3cefedb35327a19ec1b6afd560bfdf802d.tar.gz
Import supplements and repo reorganization
Diffstat (limited to 'ic_experiments/plot3d.py')
-rw-r--r--ic_experiments/plot3d.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/ic_experiments/plot3d.py b/ic_experiments/plot3d.py
new file mode 100644
index 0000000..b1b337f
--- /dev/null
+++ b/ic_experiments/plot3d.py
@@ -0,0 +1,23 @@
+from mpl_toolkits.mplot3d import Axes3D
+from matplotlib import cm
+import matplotlib.pyplot as plt
+import numpy as np
+
+with open("out.log") as fh:
+ values = [map(float, line.strip().split()) for line in fh]
+ #values = [(b, a, l) for (b, a, l) in values if b >= 0.04]
+ am = max(values, key=lambda x: x[4])
+ # am[0] = 1./am[0]
+ print am
+ alpha, delta, beta, r , l = zip(*values)
+ # alpha = 1./np.array(alpha)
+
+ fig = plt.figure(figsize=(12, 8))
+ ax = fig.gca(projection='3d')
+
+ ax.plot_trisurf(alpha, delta, l, cmap=cm.jet, linewidth=0.001)
+ plt.xlabel("alpha")
+ plt.ylabel("delta")
+ ax.set_zlabel('Likelihood')
+ #plt.savefig("ll.pdf")
+ plt.show()