瀏覽代碼

regenerated plots with TrueType fonts

Huehuecóyotl 2 年之前
父節點
當前提交
474e226dbb

二進制
prsona/plt/epoch-lambda-bandwidth-all-2-loglog.pdf


二進制
prsona/plt/epoch-lambda-cpu-all-2-loglog.pdf


二進制
prsona/plt/epoch-servers-bandwidth-any-50-loglog-squished.pdf


二進制
prsona/plt/epoch-servers-bandwidth-any-50-loglog.pdf


二進制
prsona/plt/epoch-servers-cpu-any-50-loglog-squished.pdf


二進制
prsona/plt/epoch-servers-cpu-any-50-loglog.pdf


二進制
prsona/plt/epoch-workloads-bandwidth-2-50-loglog.pdf


二進制
prsona/plt/epoch-workloads-cpu-2-50-loglog-squished.pdf


二進制
prsona/plt/epoch-workloads-cpu-2-50-loglog.pdf


二進制
prsona/plt/hbc-epoch-workloads-bandwidth-2-0-loglog.pdf


二進制
prsona/plt/hbc-epoch-workloads-cpu-2-0-loglog-squished.pdf


二進制
prsona/plt/hbc-epoch-workloads-cpu-2-0-loglog.pdf


+ 15 - 132
prsona/plt/plots.json

@@ -6,13 +6,14 @@
         "xVariable": "numClients",
         "whichGraph": "overall_epoch_cpu",
         "xLabel": "Number of clients",
-        "yLabel": "CPU time per server to calculate an epoch (s)",
+        "yLabel": "CPU time per server\nto calculate an epoch (s)",
         "yLim": [0.2, 5000],
         "loglog": true,
         "title": "Comparing CPU time for covert security\nepoch calculations across workloads (in log-log)",
-        "fileNameStr": "epoch-workloads-cpu-2-50-loglog",
+        "fileNameStr": "epoch-workloads-cpu-2-50-loglog-squished",
         "legendLoc": "lower right",
-        "legendBBoxAnchor": [1,0]
+        "legendBBoxAnchor": [1,0],
+        "aspect": 0.14
     }, {
         "data": "server",
         "dataParts": ["", "2", "", "0"],
@@ -20,41 +21,13 @@
         "xVariable": "numClients",
         "whichGraph": "overall_epoch_cpu",
         "xLabel": "Number of clients",
-        "yLabel": "CPU time per server to calculate an epoch (s)",
+        "yLabel": "CPU time per server\nto calculate an epoch (s)",
         "yLim": [0.2, 5000],
         "loglog": true,
         "title": "Comparing CPU time for HbC security\nepoch calculations across workloads (in log-log)",
-        "fileNameStr": "hbc-epoch-workloads-cpu-2-0-loglog",
-        "legendLoc": "upper left"
-    }, {
-        "data": "server",
-        "dataParts": ["", "2", "", "50"],
-        "lineVariable": "workload",
-        "xVariable": "numClients",
-        "whichGraph": "overall_epoch_total",
-        "xLabel": "Number of clients",
-        "yLabel": "Server-to-server outgoing bandwidth per\nserver used to calculate an epoch (MB)",
-        "yLim": [0.02, 1500],
-        "yUnit": "MB",
-        "loglog": true,
-        "title": "Comparing bandwidth for covert security\nepoch calculations across workloads (in log-log)",
-        "fileNameStr": "epoch-workloads-bandwidth-2-50-loglog",
-        "legendLoc": "lower right",
-        "legendBBoxAnchor": [1,0]
-    }, {
-        "data": "server",
-        "dataParts": ["", "2", "", "0"],
-        "lineVariable": "workload",
-        "xVariable": "numClients",
-        "whichGraph": "overall_epoch_total",
-        "xLabel": "Number of clients",
-        "yLabel": "Server-to-server bandwidth per server\nused to calculate an epoch (MB)",
-        "yLim": [0.02, 1500],
-        "yUnit": "MB",
-        "loglog": true,
-        "title": "Comparing bandwidth for HbC security\nepoch calculations across workloads (in log-log)",
-        "fileNameStr": "hbc-epoch-workloads-bandwidth-2-0-loglog",
-        "legendLoc": "upper left"
+        "fileNameStr": "hbc-epoch-workloads-cpu-2-0-loglog-squished",
+        "legendLoc": "upper left",
+        "aspect": 0.14
     }, {
         "data": "server",
         "dataParts": ["half", "", "", "50"],
@@ -63,13 +36,14 @@
         "ignoreWorkload": true,
         "whichGraph": "overall_epoch_cpu",
         "xLabel": "Number of clients",
-        "yLabel": "CPU time per server to calculate an epoch (s)",
+        "yLabel": "CPU time per servers\nto calculate an epoch (s)",
         "yLim": [0.2, 5000],
         "loglog": true,
         "title": "Comparing CPU time for covert security\nepoch calculations across numbers of servers (in log-log)",
-        "fileNameStr": "epoch-servers-cpu-any-50-loglog",
+        "fileNameStr": "epoch-servers-cpu-any-50-loglog-squished",
         "legendLoc": "lower right",
-        "legendBBoxAnchor": [1,0]
+        "legendBBoxAnchor": [1,0],
+        "aspect": 0.14
     }, {
         "data": "server",
         "dataParts": ["half", "", "", "50"],
@@ -83,100 +57,9 @@
         "yUnit": "MB",
         "loglog": true,
         "title": "Comparing bandwidth for covert security\nepoch calculations across numbers of servers (in log-log)",
-        "fileNameStr": "epoch-servers-bandwidth-any-50-loglog",
-        "legendLoc": "lower right",
-        "legendBBoxAnchor": [1,0]
-    }, {
-        "data": "server",
-        "dataParts": ["all", "2", "", ""],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "ignoreWorkload": true,
-        "whichGraph": "overall_epoch_cpu",
-        "xLabel": "Number of clients",
-        "yLabel": "CPU time per server to calculate an epoch (s)",
-        "yLim": [0.2, 5000],
-        "loglog": true,
-        "title": "Comparing CPU time for covert security\nepoch calculations across different values of lambda\n(in log-log)",
-        "fileNameStr": "epoch-lambda-cpu-all-2-loglog",
-        "legendLoc": "lower right",
-        "legendBBoxAnchor": [1,0]
-    }, {
-        "data": "server",
-        "dataParts": ["all", "2", "", ""],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "ignoreWorkload": true,
-        "whichGraph": "overall_epoch_total",
-        "xLabel": "Number of clients",
-        "yLabel": "Server-to-server bandwidth per server\nused to calculate an epoch (MB)",
-        "yLim": [0.02, 1500],
-        "yUnit": "MB",
-        "loglog": true,
-        "title": "Comparing bandwidth for covert security\nepoch calculations across different values of lambda\n(in log-log)",
-        "fileNameStr": "epoch-lambda-bandwidth-all-2-loglog",
-        "legendLoc": "lower right",
-        "legendBBoxAnchor": [1,0]
-    }, {
-        "data": "client",
-        "dataParts": ["vote", "2", "", "50"],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "whichGraph": "vote_cpu",
-        "xLabel": "Number of clients",
-        "yLabel": "Client CPU time to make a new vote row (s)",
-        "title": "Measuring CPU time for making vote rows\n(in linear scale)",
-        "fileNameStr": "vote-lambda-cpu-2",
-        "legendLoc": "upper left"
-    }, {
-        "data": "client",
-        "dataParts": ["vote", "2", "", "50"],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "whichGraph": "vote_sent",
-        "xLabel": "Number of clients",
-        "yLabel": "Size of proof used when\nmaking a new vote row (KB)",
-        "yUnit": "KB", 
-        "title": "Measuring proof size for making vote rows\n(in linear scale)",
-        "fileNameStr": "vote-lambda-bandwidth-2",
-        "legendLoc": "upper left"
-    }, {
-        "data": "client",
-        "dataParts": ["rep", "2", "", "50"],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "whichGraph": "rep_prove_cpu",
-        "xLabel": "Number of clients",
-        "yLabel": "CPU time to make a new reputation proof (s)",
-        "title": "Measuring CPU time for making reputation proofs\n(in linear scale)",
-        "fileNameStr": "rep_prove-lambda-cpu-2",
-        "legendLoc": "lower right",
-        "legendBBoxAnchor": [1, 0]
-    }, {
-        "data": "client",
-        "dataParts": ["rep", "2", "", "50"],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "whichGraph": "rep_prove_sent",
-        "xLabel": "Number of clients",
-        "yLabel": "Size of proof used when\nmaking a new reputation proof (KB)",
-        "yUnit": "KB", 
-        "title": "Measuring proof size for making reputation proofs\n(in linear scale)",
-        "fileNameStr": "rep_prove-lambda-bandwidth-2",
-        "legendLoc": "lower right",
-        "legendBBoxAnchor": [1, 0]
-    }, {
-
-        "data": "client",
-        "dataParts": ["rep", "2", "", "50"],
-        "lineVariable": "lambda",
-        "xVariable": "numClients",
-        "whichGraph": "rep_verify_cpu",
-        "xLabel": "Number of clients",
-        "yLabel": "CPU time to verify a new reputation proof (s)",
-        "title": "Comparing CPU time for verifying reputation proofs\n(in linear scale)",
-        "fileNameStr": "rep_verify-lambda-cpu-2",
+        "fileNameStr": "epoch-servers-bandwidth-any-50-loglog-squished",
         "legendLoc": "lower right",
-        "legendBBoxAnchor": [1, 0]
+        "legendBBoxAnchor": [1,0],
+        "aspect": 0.13
     }
 ]

二進制
prsona/plt/rep_prove-lambda-bandwidth-2.pdf


二進制
prsona/plt/rep_prove-lambda-cpu-2.pdf


二進制
prsona/plt/rep_verify-lambda-cpu-2.pdf


二進制
prsona/plt/vote-lambda-bandwidth-2.pdf


二進制
prsona/plt/vote-lambda-cpu-2.pdf


+ 33 - 0
prsona/scripts/make_graphs.py

@@ -146,6 +146,35 @@ LOGLOG_FIT_OPTIONS = {
     }
 }
 
+def SetPlotRC():
+    #If fonttype = 1 doesn't work with LaTeX, try fonttype 42.
+    plt.rc('pdf',fonttype = 42)
+    plt.rc('ps',fonttype = 42)
+
+def ApplyFont(ax):
+    ticks = ax.get_xticklabels() + ax.get_yticklabels()
+
+    text_size = 14.0
+
+    for t in ticks:
+        t.set_fontname('Times New Roman')
+        t.set_fontsize(text_size)
+
+    txt = ax.get_xlabel()
+    txt_obj = ax.set_xlabel(txt)
+    txt_obj.set_fontname('Times New Roman')
+    txt_obj.set_fontsize(text_size)
+
+    txt = ax.get_ylabel()
+    txt_obj = ax.set_ylabel(txt)
+    txt_obj.set_fontname('Times New Roman')
+    txt_obj.set_fontsize(text_size)
+
+    txt = ax.get_title()
+    txt_obj = ax.set_title(txt)
+    txt_obj.set_fontname('Times New Roman')
+    txt_obj.set_fontsize(text_size)
+
 ##
 # This functionality allows us to temporarily change our working directory
 #
@@ -394,6 +423,8 @@ def plotComparison(data, dataParts, xVariable, lineVariable, whichGraph, **kwarg
     aspect = kwargs['aspect'] if 'aspect' in kwargs else None
     ignoreWorkload = kwargs['ignoreWorkload'] if 'ignoreWorkload' in kwargs else False
 
+    SetPlotRC()
+
     fig = plt.figure()
     ax = fig.gca()
 
@@ -546,6 +577,8 @@ def plotComparison(data, dataParts, xVariable, lineVariable, whichGraph, **kwarg
 
     legend = ax.legend(loc=legendLoc, bbox_to_anchor=legendBBoxAnchor, fontsize='large')
 
+    ApplyFont(ax)
+
     with cd('../plt/', True):
         fig.savefig(f"{fileNameStr}.pdf", bbox_inches='tight')
     plt.close(fig)