diff options
| author | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-08-20 01:01:06 +0000 |
|---|---|---|
| committer | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-08-20 01:01:06 +0000 |
| commit | 486496b00ebf6630183f9a5c13fb5c1ced46f12b (patch) | |
| tree | f6cf2a0488e95666ee26632e0b7615a8726c89cf /sources | |
| parent | 13a6c1dc5fa444d5d8f2ad9bb1c75f997b468472 (diff) | |
| download | pacemaker-486496b00ebf6630183f9a5c13fb5c1ced46f12b.tar.gz | |
Draft version
git-svn-id: https://scm.gforge.inria.fr/svn/pacemaker@66 30fcff6e-8de6-41c7-acce-77ff6d1dd07b
Diffstat (limited to 'sources')
| -rw-r--r-- | sources/thibaut/plot.py | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/sources/thibaut/plot.py b/sources/thibaut/plot.py index a4c847b..1cd4d72 100644 --- a/sources/thibaut/plot.py +++ b/sources/thibaut/plot.py @@ -37,15 +37,46 @@ plt.cla() avail = os.path.join(dirname, "avail.data") a = np.loadtxt(avail) plt.hist(a, bins=100,range=(0,1)) -plt.savefig(os.path.join(dirname, "avail.png")) +plt.savefig(os.path.join(dirname, "avail.png"))""" plt.cla() -ss = os.path.join(dirname, " -simul_sessions = os.path.join(dirname, "sum.data") +#s = os.path.join(dirname, "proofs.data") +"""simul_sessions = os.path.join(dirname, "sum.data") a,b = np.loadtxt(simul_sessions, unpack=True, usecols=(1,2)) -plt.plot(a) -plt.plot(b*10) +result = [] +for i in xrange(len(a)): + if a[i] > 3000: + result.append(abs(b[i]*10.-a[i])/a[i]) +#plt.plot(a) +#plt.plot(b*10) +plt.plot(np.sort(result)) plt.show() #for i in xrange(len(duration)):""" - +"""simul_sessions = os.path.join(dirname, "simul_sessions.data") +a, b, c = np.loadtxt(simul_sessions, unpack=True) +result1 = [0.]*20000 +result2 = [0.]*20000 +for i in xrange(len(a)): + if b[i] > 20: + t = int(a[i]) + result1[t] = result1[t] + b[i] + result2[t] = result2[t] + c[i]*10.+5. +result=[] +for i in xrange(len(result1)): + if result1[i] > 0: + result.append(abs(result1[i]-result2[i])/result1[i]) +a = np.sort(np.array(result)) +c = a[:-100] +#r1 = np.array(result1) +#r2 = np.array(result2) +b = np.array(range(len(c))) +#d = (abs(r1-r2))/r1 +#b,c = np.histogram(d) +plt.ylabel("Erreur relative") +plt.xlabel("Pourcentage de pairs") +plt.yticks(np.arange(0,1,0.1)) +plt.plot(c,b/float(len(c)),"k-") +#plt.hist(d) +plt.savefig("test.eps") +plt.show()""" |
