Ver Fonte

Quickfix the histogram plot size

Before, the histograms were oversized. Changing the order plots
are drawn in fixed this problem. Yet, this is only a quick
fix and doesn't solve the real problem. The real problem seems to
revolve around resizing the plot and using a tight layout for the
plots in lines 1466-1473.
dustin.born há 6 anos atrás
pai
commit
24678e6a98
1 ficheiros alterados com 14 adições e 14 exclusões
  1. 14 14
      code/ID2TLib/Statistics.py

+ 14 - 14
code/ID2TLib/Statistics.py

@@ -1432,12 +1432,6 @@ class Statistics:
             plt.savefig(out, dpi=500)
             return out    
 
-        plot_hist_indegree_out = plot_histogram_degree("inDegree", "Histogram - Ingoing degree per IP Address", 
-            "Ingoing degree", "_plot-Histogram Ingoing Degree per IP" + format)
-        plot_hist_outdegree_out = plot_histogram_degree("outDegree", "Histogram - Outgoing degree per IP Address", 
-            "Outgoing degree", "_plot-Histogram Outgoing Degree per IP" + format)
-        plot_hist_overalldegree_out = plot_histogram_degree("overallDegree", "Histogram - Overall degree per IP Address", 
-            "Overall degree", "_plot-Histogram Overall Degree per IP" + format)
         ttl_out_path = plot_ttl('.' + format)
         mss_out_path = plot_mss('.' + format)
         win_out_path = plot_win('.' + format)
@@ -1453,14 +1447,12 @@ class Statistics:
         plot_interval_new_tos = plot_interval_new_tos('.' + format)
         plot_interval_new_win_size = plot_interval_new_win_size('.' + format)
         plot_interval_new_mss = plot_interval_new_mss('.' + format)
-        plot_packets_per_connection_out = plot_packets_per_connection('.' + format)
-        plot_out_degree = plot_out_degree('.' + format)
-        plot_in_degree = plot_in_degree('.' + format)
-        plot_overall_degree = plot_overall_degree('.' + format)
-        plot_avg_pkts_per_comm_interval_out = plot_avg_pkts_per_comm_interval('.' + format)
-        plot_avg_time_between_comm_interval_out = plot_avg_time_between_comm_interval('.' + format)
-        plot_avg_comm_interval_time_out = plot_avg_comm_interval_time("." + format)
-        plot_total_comm_duration_out = plot_total_comm_duration("." + format)
+        plot_hist_indegree_out = plot_histogram_degree("inDegree", "Histogram - Ingoing degree per IP Address",
+            "Ingoing degree", "_plot-Histogram Ingoing Degree per IP" + format)
+        plot_hist_outdegree_out = plot_histogram_degree("outDegree", "Histogram - Outgoing degree per IP Address",
+            "Outgoing degree", "_plot-Histogram Outgoing Degree per IP" + format)
+        plot_hist_overalldegree_out = plot_histogram_degree("overallDegree", "Histogram - Overall degree per IP Address",
+            "Overall degree", "_plot-Histogram Overall Degree per IP" + format)
         plot_hist_pkts_per_connection_out = plot_comm_histogram("pktsCount", "Histogram - Number of exchanged packets per connection",
             "Number of packets", "_plot-Histogram PktCount per Connection" + "." + format)
         plot_hist_avgpkts_per_commint_out = plot_comm_histogram("avgIntervalPktCount", "Histogram - Average number of exchanged packets per communication interval",
@@ -1471,6 +1463,14 @@ class Statistics:
             "Average interval time", "_plot-Histogram Avg Interval Time per Connection" + "." + format)
         plot_hist_total_comm_duration_out = plot_comm_histogram("totalConversationDuration", "Histogram - Total communication duration in seconds",
             "Duration", "_plot-Histogram Communication Duration per Connection" + "." + format)
+        plot_out_degree = plot_out_degree('.' + format)
+        plot_in_degree = plot_in_degree('.' + format)
+        plot_overall_degree = plot_overall_degree('.' + format)
+        plot_packets_per_connection_out = plot_packets_per_connection('.' + format)
+        plot_avg_pkts_per_comm_interval_out = plot_avg_pkts_per_comm_interval('.' + format)
+        plot_avg_time_between_comm_interval_out = plot_avg_time_between_comm_interval('.' + format)
+        plot_avg_comm_interval_time_out = plot_avg_comm_interval_time("." + format)
+        plot_total_comm_duration_out = plot_total_comm_duration("." + format)
 
         ## Time consuming plot
         # port_out_path = plot_port('.' + format)