Browse Source

Bugfix in-degree plots

leonboeck 6 years ago
parent
commit
7288363add
1 changed files with 6 additions and 0 deletions
  1. 6 0
      code/ID2TLib/Statistics.py

+ 6 - 0
code/ID2TLib/Statistics.py

@@ -1141,7 +1141,10 @@ class Statistics:
                 plt.grid(True)
 
                 # plot the bar
+                labels = graphy
+                graphy = list(range(len(graphx)))
                 plt.barh(graphy, graphx, width, align='center', linewidth=1, color='red', edgecolor='red')
+                plt.yticks(graphy, labels)
                 out = self.pcap_filepath.replace('.pcap', '_in_degree' + file_ending)
                 plt.tight_layout()
                 plt.savefig(out,dpi=500)
@@ -1193,7 +1196,10 @@ class Statistics:
                 plt.grid(True)
 
                 # plot the bar
+                labels = graphy
+                graphy = list(range(len(graphx)))
                 plt.barh(graphy, graphx, width, align='center', linewidth=1, color='red', edgecolor='red')
+                plt.yticks(graphy, labels)
                 out = self.pcap_filepath.replace('.pcap', '_out_degree' + file_ending)
                 plt.tight_layout()
                 plt.savefig(out,dpi=500)