From ffd3319e72c87560eb7230b793276431f2d5c740 Mon Sep 17 00:00:00 2001
From: "@nheuser" <nheuser@uni-koblenz.de>
Date: Tue, 16 Jul 2024 22:25:07 +0200
Subject: [PATCH] altered chart size

---
 PythonAPI/stats_calc.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/PythonAPI/stats_calc.py b/PythonAPI/stats_calc.py
index 58083bc..5989fa6 100644
--- a/PythonAPI/stats_calc.py
+++ b/PythonAPI/stats_calc.py
@@ -242,7 +242,7 @@ def build_stat_file(type):
         bottom += mode_count
         ax1.bar_label(p, label_type='center')
     ax1.legend()
-    ax1.set_ylim(0,100)
+    ax1.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart1.png")
 
     labels_2 = ("Total", "Mode 0", "Mode 1", "Mode 2", "Mode 3")
@@ -251,13 +251,13 @@ def build_stat_file(type):
         'K6': np.array([to_percentage(p3_total), to_percentage(p3_mode0), to_percentage(p3_mode1), to_percentage(p3_mode2), to_percentage(p3_mode3)])
     }
     width = 0.9
-    fig2, ax2 = plt.subplots(layout='constrained')
+    fig2, ax2 = plt.subplots()
     bottom = np.zeros(len(labels_2))
     for mode, mode_count in amount2.items():
         p = ax2.bar(labels_2, mode_count, width, label=mode, bottom=bottom)
         bottom += mode_count
         ax2.bar_label(p, label_type='center')
-    ax2.legend()
+    ax2.legend(loc='upper right', ncols=2)
     ax2.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart2.png")
 
@@ -274,7 +274,7 @@ def build_stat_file(type):
         bottom += mode_count
         ax3.bar_label(p, label_type='center')
     ax3.legend(loc='upper right', ncols=2)
-    ax3.set_ylim(0,115)
+    ax3.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart3.png")
 
     fig4, ax4 = plt.subplots()
@@ -283,7 +283,7 @@ def build_stat_file(type):
     bar_colors = ['tab:blue', 'tab:red', 'tab:orange', 'tab:green', 'tab:purple']
     p = ax4.bar(labels_4, counts, color=bar_colors)
     ax4.bar_label(p)
-    ax4.set_ylim(0,100)
+    ax4.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart4.png")
 
     fig5, ax5 = plt.subplots()
@@ -292,7 +292,7 @@ def build_stat_file(type):
     bar_colors = ['tab:blue', 'tab:red', 'tab:orange', 'tab:green', 'tab:purple', 'tab:cyan']
     p = ax5.bar(labels_5, counts, color=bar_colors)
     ax5.bar_label(p)
-    ax5.set_ylim(0,100)
+    ax5.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart5.png")
 
     fig6, ax6 = plt.subplots()
@@ -301,7 +301,7 @@ def build_stat_file(type):
     bar_colors = ['tab:blue', 'tab:red', 'tab:orange', 'tab:green', 'tab:purple']
     p = ax6.bar(labels_4, counts, color=bar_colors)
     ax6.bar_label(p)
-    ax6.set_ylim(0,100)
+    ax6.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart6.png")
 
     fig7, ax7 = plt.subplots()
@@ -310,6 +310,6 @@ def build_stat_file(type):
     bar_colors = ['tab:blue', 'tab:red', 'tab:orange', 'tab:green', 'tab:purple', 'tab:cyan']
     p = ax7.bar(labels_7, counts, color=bar_colors)
     ax7.bar_label(p)
-    ax7.set_ylim(0,100)
+    ax7.set_ylim(0,110)
     plt.savefig(f"charts1/t{type}/chart7.png")
     
-- 
GitLab