diff --git a/DAS/visualizor.py b/DAS/visualizor.py index 9bfe2d0..96a70cc 100644 --- a/DAS/visualizor.py +++ b/DAS/visualizor.py @@ -10,7 +10,7 @@ def plotData(conf): fig = plt.figure("9, 3") plt.grid(True) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) if conf["type"] == "plot" or conf["type"] == "plot_with_1line": for i in range(len(conf["data"])): plt.plot(conf["xdots"], conf["data"][i], conf["colors"][i], label=conf["labels"][i]) @@ -24,9 +24,9 @@ def plotData(conf): plt.axhline(y = conf["expected_value2"], color='g', linestyle='--', label=conf["line_label2"]) if conf["type"] == "plot_with_1line": plt.axhline(y = conf["expected_value"], color='g', linestyle='--', label=conf["line_label"]) - plt.title(conf["title"]) - plt.ylabel(conf["ylabel"]) - plt.xlabel(conf["xlabel"]) + plt.title(conf["title"], fontsize=14) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.xlabel(conf["xlabel"], fontsize=12) plt.ylim(0, conf["yaxismax"]*1.1 if conf["yaxismax"] > 0 else 1) plt.legend(loc=conf["legLoc"]) plt.savefig(conf["path"], bbox_inches="tight") @@ -37,7 +37,7 @@ def plotBoxData(conf): props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) num_boxes = len(conf["data"]) positions = np.arange(num_boxes) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.boxplot(conf["data"], patch_artist=True, showmeans=True, meanline=True, positions=positions) plt.title(conf["title"], fontsize=14) plt.ylabel(conf["ylabel"], fontsize=12) @@ -168,7 +168,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Box Plot of Restore Row Count by Nodes" @@ -180,11 +181,11 @@ class Visualizor: data = [class1_data, class2_data] plt.boxplot(data) plt.xticks([1, 2], ['Class 1 Nodes', 'Class 2 Nodes']) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/box_restoreRowCount.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/box_restoreRowCount.png")) @@ -193,7 +194,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Box Plot of Restore Column Count by Nodes" @@ -205,11 +207,11 @@ class Visualizor: data = [class1_data, class2_data] plt.boxplot(data) plt.xticks([1, 2], ['Class 1 Nodes', 'Class 2 Nodes']) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/box_restoreColumnCount.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/box_restoreColumnCount.png")) @@ -218,7 +220,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Boxen Plot of Restore Row Count by Nodes" @@ -228,11 +231,11 @@ class Visualizor: data = [result.restoreRowCount[1: n1], result.restoreRowCount[n1+1: ]] plt.figure(figsize=(8, 6)) sns.boxenplot(data=data, width=0.8) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/boxen_restoreRowCount.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/boxen_restoreRowCount.png")) @@ -241,7 +244,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Boxen Plot of Restore Column Count by Nodes" @@ -251,11 +255,11 @@ class Visualizor: data = [result.restoreColumnCount[1: n1], result.restoreColumnCount[n1+1: ]] plt.figure(figsize=(8, 6)) sns.boxenplot(data=data, width=0.8) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/boxen_restoreColumnCount.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/boxen_restoreColumnCount.png")) @@ -264,7 +268,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Restore Row Count by Nodes" @@ -275,13 +280,13 @@ class Visualizor: class2_data = result.restoreRowCount[n1+1: ] sns.ecdfplot(data=class1_data, label='Class 1 Nodes') sns.ecdfplot(data=class2_data, label='Class 2 Nodes') - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) max_val = max(result.restoreRowCount) * 1.1 plt.xlim(left=0, right=max_val if max_val > 0 else 1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1) plt.savefig(plotPath + "/ecdf_restoreRowCount.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_restoreRowCount.png")) @@ -291,7 +296,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Restore Column Count by Nodes" @@ -302,13 +308,13 @@ class Visualizor: class2_data = result.restoreColumnCount[n1+1: ] sns.ecdfplot(data=class1_data, label='Class 1 Nodes') sns.ecdfplot(data=class2_data, label='Class 2 Nodes') - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) max_val = max(result.restoreColumnCount) * 1.1 plt.xlim(left=0, right=max_val if max_val > 0 else 1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1) plt.savefig(plotPath + "/ecdf_restoreColumnCount.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_restoreColumnCount.png")) @@ -318,7 +324,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Messages Sent by Nodes" @@ -330,12 +337,12 @@ class Visualizor: sns.ecdfplot(data=class1_data, label='Class 1 Nodes') sns.ecdfplot(data=class2_data, label='Class 2 Nodes') plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) plt.xlim(left=0, right=max(result.msgSentCount) * 1.1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/ecdf_messagesSent.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_messagesSent.png")) @@ -344,7 +351,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Messages Received by Nodes" @@ -356,12 +364,12 @@ class Visualizor: sns.ecdfplot(data=class1_data, label='Class 1 Nodes') sns.ecdfplot(data=class2_data, label='Class 2 Nodes') plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) plt.xlim(left=0, right=max(result.msgRecvCount) * 1.1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/ecdf_messagesRecv.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_messagesRecv.png")) @@ -370,7 +378,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Samples Received by Nodes" @@ -382,12 +391,12 @@ class Visualizor: sns.ecdfplot(data=class1_data, label='Class 1 Nodes') sns.ecdfplot(data=class2_data, label='Class 2 Nodes') plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes'], loc=1) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) plt.xlim(left=0, right=max(result.sampleRecvCount) * 1.1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/ecdf_samplesReceived.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_samplesReceived.png")) @@ -396,7 +405,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Row-Col Distribution by Nodes" @@ -407,13 +417,13 @@ class Visualizor: n1 = int(result.numberNodes * result.class1ratio) sns.ecdfplot(data=vector1, label='Rows') sns.ecdfplot(data=vector2, label='Columns') - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) plt.xlim(left=0, right=max(max(vector1), max(vector2)) * 1.1) plt.legend(labels=['Row Dist', 'Column Dist'], loc=1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/ecdf_rowColDist.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_rowColDist.png")) @@ -422,7 +432,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "ECDF of Samples Repaired by Nodes" @@ -434,12 +445,12 @@ class Visualizor: sns.ecdfplot(data=class1_data, label='Class 1 Nodes') sns.ecdfplot(data=class2_data, label='Class 2 Nodes') plt.legend(title='Node Class', labels=['Class 1 Nodes', 'Class 2 Nodes']) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) plt.xlim(left=0, right=max(result.repairedSampleCount) * 1.1) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/ecdf_samplesRepaired.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/ecdf_samplesRepaired.png")) @@ -448,7 +459,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Samples Received by Nodes" @@ -458,11 +470,11 @@ class Visualizor: data = [result.sampleRecvCount[1: n1], result.sampleRecvCount[n1+1: ]] plt.figure(figsize=(8, 6)) sns.boxenplot(data=data, width=0.8) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.tight_layout() plt.savefig(plotPath + "/boxen_samplesRecv.png") plt.close() @@ -473,7 +485,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Samples Repaired by Nodes" @@ -483,11 +496,11 @@ class Visualizor: data = [result.repairedSampleCount[1: n1], result.repairedSampleCount[n1+1: ]] plt.figure(figsize=(8, 6)) sns.boxenplot(data=data, width=0.8) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.tight_layout() plt.savefig(plotPath + "/boxen_samplesRepaired.png") plt.close() @@ -498,7 +511,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Row/Column Distribution" @@ -513,11 +527,11 @@ class Visualizor: data = [vector1, vector2] plt.figure(figsize=(8, 6)) sns.boxenplot(data=data, width=0.8) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.tight_layout() plt.savefig(plotPath + "/boxen_rowColDist.png") plt.close() @@ -528,7 +542,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Messages Sent by Nodes" @@ -538,11 +553,11 @@ class Visualizor: data = [result.msgSentCount[1: n1], result.msgSentCount[n1+1: ]] labels = ["Class 1", "Class 2"] sns.boxenplot(data=data, palette="Set2", ax=plt.gca()) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/boxen_messagesSent.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/boxen_messagesSent.png")) @@ -551,7 +566,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Messages Received by Nodes" @@ -561,11 +577,11 @@ class Visualizor: data = [result.msgRecvCount[1: n1], result.msgRecvCount[n1+1: ]] labels = ["Class 1", "Class 2"] sns.boxenplot(data=data, palette="Set2", ax=plt.gca()) - plt.xlabel(conf["xlabel"]) - plt.ylabel(conf["ylabel"]) - plt.title(conf["title"]) + plt.xlabel(conf["xlabel"], fontsize=12) + plt.ylabel(conf["ylabel"], fontsize=12) + plt.title(conf["title"], fontsize=14) props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - plt.text(1.05, 0.05, conf["textBox"], fontsize=10, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) + plt.text(1.05, 0.05, conf["textBox"], fontsize=14, verticalalignment='bottom', transform=plt.gca().transAxes, bbox=props) plt.savefig(plotPath + "/boxen_messagesRecv.png", bbox_inches="tight") print("Plot %s created." % (plotPath + "/boxen_messagesRecv.png")) @@ -574,7 +590,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Samples Repaired by Nodes" @@ -594,7 +611,8 @@ class Visualizor: plt.clf() conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Row/Column Distribution" @@ -616,7 +634,8 @@ class Visualizor: """Plots the restoreRowCount for each node""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Restore Row Count for Each Node" @@ -637,7 +656,8 @@ class Visualizor: """Plots the restoreColumnCount for each node""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Restore Column Count for Each Node" @@ -658,7 +678,8 @@ class Visualizor: """Plots the percentage sampleRecv for each node""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Percentage of Samples Received by Nodes" @@ -692,7 +713,8 @@ class Visualizor: """Box Plot of the sampleRecv for each node""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Samples Received by Nodes" @@ -712,7 +734,8 @@ class Visualizor: """Plots the missing samples in the network""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Missing Samples" @@ -744,7 +767,8 @@ class Visualizor: vector3 = [x * 100 for x in result.metrics["progress"]["samples received"]] conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Nodes/validators ready" @@ -777,7 +801,8 @@ class Visualizor: vector3[i] = (vector3[i] * 8 * (1000/self.config.stepDuration) * self.config.segmentSize) / 1000000 conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Sent data" @@ -808,7 +833,8 @@ class Visualizor: vector2[i] = (vector2[i] * 8 * (1000/self.config.stepDuration) * self.config.segmentSize) / 1000000 conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Received data" @@ -839,7 +865,8 @@ class Visualizor: vector2[i] = (vector2[i] * 8 * (1000/self.config.stepDuration) * self.config.segmentSize) / 1000000 conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Duplicated data" @@ -871,7 +898,8 @@ class Visualizor: vector1 += [np.nan] * (len(vector2) - len(vector1)) conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Row/Column distribution" @@ -897,7 +925,8 @@ class Visualizor: """Plots the number of messages sent by all nodes""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Messages Sent by Nodes" @@ -918,7 +947,8 @@ class Visualizor: """Box Plot of the number of messages sent by all nodes""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Messages Sent by Nodes" @@ -934,7 +964,8 @@ class Visualizor: """Plots the number of messages received by all nodes""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Messages Received by Nodes" @@ -955,7 +986,8 @@ class Visualizor: """Plots the number of messages received by all nodes""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Messages Received by Nodes" @@ -977,7 +1009,8 @@ class Visualizor: """Plots the number of samples repaired by all nodes""" conf = {} attrbs = self.__get_attrbs__(result) - conf["textBox"] = "Row Size: "+attrbs['bsrn']+"\nColumn Size: "+attrbs['bscn']\ + conf["textBox"] = "Row Size (N, K): "+attrbs['bsrn']+ ", "+attrbs['bscn']\ + +"\nColumn Size: (N, K): "+attrbs['bscn']+ ", "+attrbs['bscn']\ +"\nNumber of nodes: "+attrbs['nn']+"\nFailure rate: "+attrbs['fr']+"\nMalicious Node: "+attrbs['mn']+"\nNetwork degree: "+attrbs['nd']\ +"\nCustody Rows: "+attrbs['cusr']+"\nCustody Cols: "+attrbs['cusc']+"\nCustody 1: "+attrbs['vpn1']+"\nCustody 2: "+attrbs['vpn2'] conf["title"] = "Number of Samples Repaired by Nodes"