Skip to content

Commit

Permalink
consistents labels on graph
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkolasg committed Aug 19, 2019
1 parent ade3b2c commit 2d8eb96
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
6 changes: 3 additions & 3 deletions simul/plots/comparison_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
## mapping between files and label
# "csv/libp2p_2000_51thr_agg1.csv": "libp2p"}
files = {"csv/handel_0failing_99thr.csv": {
"label": "handel",
"label": "Handel",
"xOffset": 0.10,
"yOffset": 0.09,
},
"csv/n2_4000_99thr.csv": {
"label": "complete",
"label": "Complete",
"xOffset": 0.20,
"yOffset": -0.04,
}
Expand Down Expand Up @@ -53,7 +53,7 @@

plt.legend(fontsize=fs_label)
plt.ylabel("KBytes (log)",fontsize=fs_label)
plt.xlabel("Handel nodes",fontsize=fs_label)
plt.xlabel("Number of Handel nodes",fontsize=fs_label)
# plt.title("Outgoing network consumption - comparative baseline",fontsize=fs_label)
plt.yscale('log')
plt.show()
9 changes: 5 additions & 4 deletions simul/plots/comparison_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
# files = sys.argv[1:]
## mapping between files and label
files = {"csv/handel_0failing_99thr.csv": {
"label": "handel",
"label": "Handel",
"xOffset": 0.10,
"yOffset": 0.14,
},
"csv/n2_4000_99thr.csv": {
"label": "complete",
"label": "Complete",
"xOffset": 0.17,
"yOffset": -0.02,
}
Expand Down Expand Up @@ -51,8 +51,9 @@


plt.legend(fontsize=fs_label)
plt.ylabel("signature generation (ms)",fontsize=fs_label)
plt.xlabel("Handel nodes",fontsize=fs_label)
plt.ylabel("Signature generation (ms)",fontsize=fs_label)
plt.xlabel("Number of Handel nodes",fontsize=fs_label)
# plt.title("Signature generation time - comparative baseline",fontsize=fs_label)
# plt.yscale('log')
# plt.tight_layout()
plt.show()
7 changes: 4 additions & 3 deletions simul/plots/failing_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@

x = v[failingColumn].map(lambda x: int((x/nodes) * 100))
for c,name in yColumns.items():
y = v[c]
# y = v[c]
y = v[c].map(lambda x: x * 1000)
print("file %s -> %d data points on %s" % (f,len(y),sigColumn))
# label = files[f]
label = name
Expand All @@ -50,8 +51,8 @@

label= 35
plt.legend(fontsize=label)
plt.ylabel("signature generation",fontsize=label)
plt.xlabel("failing nodes in %",fontsize=label)
plt.ylabel("Signature generation (ms)",fontsize=label)
plt.xlabel("Failing nodes in %",fontsize=label)
# plt.yscale('log')
# plt.title("Time for 51% signature threshold over 4000 nodes")
# plt.axis('log')
Expand Down
6 changes: 3 additions & 3 deletions simul/plots/reallike.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
y = v[column].map(lambda x: x*1000)
print("file %s -> %d data points on %s" % (f,len(y),column))
# label = files[c]
label = "handel"
label = "Handel"
if label == "":
label = input("Label for file %s: " % f)

Expand All @@ -40,9 +40,9 @@
# plot(x,y,"-","linear",allColors.popleft())

plt.legend(fontsize=fs_label)
plt.ylabel("signature generation (ms)",fontsize=fs_label)
plt.ylabel("Signature generation (ms)",fontsize=fs_label)
# plt.ylabel("sig queue size",fontsize=fs_label)
plt.xlabel("nodes",fontsize=fs_label)
plt.xlabel("Number of nodes",fontsize=fs_label)
plt.title("Handel: 75% threshold signature with 25% failings",fontsize=fs_label)
# plt.yscale('log')
plt.show()
10 changes: 5 additions & 5 deletions simul/plots/sigchecked.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import pandas as pd
import matplotlib.pyplot as plt

columns = {"sigs_sigCheckedCt_avg": "average",
"sigs_sigCheckedCt_min": "minimum",
"sigs_sigCheckedCt_max": "maximum"}
columns = {"sigs_sigCheckedCt_avg": "Average",
"sigs_sigCheckedCt_min": "Minimum",
"sigs_sigCheckedCt_max": "Maximum"}
files = {"csv/handel_0failing_99thr.csv": "handel"}

datas = read_datafiles(files)
Expand All @@ -29,8 +29,8 @@
plot(x,y,"-",label,allColors.popleft())

plt.legend(fontsize=fs_label)
plt.ylabel("signatures checked",fontsize=fs_label)
plt.xlabel("nodes",fontsize=fs_label)
plt.ylabel("Number of signatures",fontsize=fs_label)
plt.xlabel("Number of nodes",fontsize=fs_label)
# plt.title("Number of signatures checked",fontsize=fs_label)
# plt.yscale('log')
plt.show()

0 comments on commit 2d8eb96

Please sign in to comment.