diff options
| author | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-09-02 12:51:52 +0000 |
|---|---|---|
| committer | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-09-02 12:51:52 +0000 |
| commit | ec3db4b997727da2c65a95f18162cc4a70c45dec (patch) | |
| tree | 16912689a2f367d7761f5fee14c4ed0736876341 /sources | |
| parent | 9f74d1eb8ac7c43fa7584dbf804202c06614868c (diff) | |
| download | pacemaker-ec3db4b997727da2c65a95f18162cc4a70c45dec.tar.gz | |
Sildes as they were presented this morning.
git-svn-id: https://scm.gforge.inria.fr/svn/pacemaker@74 30fcff6e-8de6-41c7-acce-77ff6d1dd07b
Diffstat (limited to 'sources')
| -rw-r--r-- | sources/thibaut/plot.py | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/sources/thibaut/plot.py b/sources/thibaut/plot.py index 70aef52..e80b6e1 100644 --- a/sources/thibaut/plot.py +++ b/sources/thibaut/plot.py @@ -37,13 +37,24 @@ plt.hist(a, bins=100, log = True) plt.savefig(os.path.join(dirname, "sessions.png")) """ -plt.cla() +"""plt.cla() avail = os.path.join(dirname, "avail.data") a = np.loadtxt(avail) plt.hist(a, bins=100,range=(0,1)) plt.xlabel("Disponibilite") plt.ylabel("Nombre de pairs") -plt.savefig(os.path.join(dirname, "avail.eps")) +plt.savefig(os.path.join(dirname, "avail.eps"))""" + +plt.cla() +avail = os.path.join(dirname, "dots.txt") +a = np.loadtxt(avail) +a = np.sort(a) +b = np.array(range(1,155)) +plt.plot(a,b/155.) +plt.xlabel("Erreur relative") +plt.ylabel("Pourcentage de pairs") +plt.savefig(os.path.join(dirname, "pl.eps")) + #plt.cla() #s = os.path.join(dirname, "proofs.data") @@ -78,10 +89,34 @@ c = a[:-100] 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.xlabel("Erreur relative") +plt.ylabel("Pourcentage de pairs") plt.yticks(np.arange(0,1,0.1)) plt.plot(c,b/float(len(c)),"k-") + +simul_sessions = os.path.join(dirname, "simul_sessions2.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.plot(c,b/float(len(c)),"k-") + + #plt.hist(d) plt.savefig("test.eps") plt.show()""" |
