From b84dddecf2eab982941704a43663cf643be027d3 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Mon, 30 Mar 2015 15:01:56 -0400 Subject: Archive old code --- experiments/old_stuff/plot.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 experiments/old_stuff/plot.py (limited to 'experiments/old_stuff/plot.py') diff --git a/experiments/old_stuff/plot.py b/experiments/old_stuff/plot.py new file mode 100644 index 0000000..cbea485 --- /dev/null +++ b/experiments/old_stuff/plot.py @@ -0,0 +1,21 @@ +from mpl_toolkits.mplot3d import Axes3D +from matplotlib import cm +import matplotlib.pyplot as plt +import numpy as np + +with open("results3.txt") 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[2]) + print am + beta, alpha, l = zip(*values) + + fig = plt.figure(figsize=(12, 8)) + ax = fig.gca(projection='3d') + + ax.plot_trisurf(beta, alpha, l, cmap=cm.jet, linewidth=0.001) + plt.xlabel("Beta") + plt.ylabel("Alpha") + ax.set_zlabel('Likelihood') + #plt.savefig("ll.pdf") + plt.show() -- cgit v1.2.3-70-g09d2