From fd3e51e7bf77b391c393b19c8fe75209c5341c4b Mon Sep 17 00:00:00 2001
From: Felix Kleinert <f.kleinert@fz-juelich.de>
Date: Tue, 20 Apr 2021 08:43:43 +0200
Subject: [PATCH] update boot plot

---
 mlair/plotting/postprocessing_plotting.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py
index ce53f4c5..1e3ce126 100644
--- a/mlair/plotting/postprocessing_plotting.py
+++ b/mlair/plotting/postprocessing_plotting.py
@@ -983,7 +983,11 @@ class PlotBootstrapSkillScore(AbstractPlotClass):
         """
 
         """
-        fig, ax = plt.subplots(figsize=(len(self._individual_vars)/2, 10))
+        number_of_vars = len(self._individual_vars)
+        if number_of_vars > 20:
+            fig, ax = plt.subplots(figsize=(number_of_vars/2, 10))
+        else:
+            fig, ax = plt.subplots()
         sns.boxplot(x=self._x_name, y="data", hue="ahead", data=self._data, ax=ax, whis=1., palette="Blues_d",
                     showmeans=True, meanprops={"markersize": 1, "markeredgecolor": "k"}, flierprops={"marker": "."})
         ax.axhline(y=0, color="grey", linewidth=.5)
-- 
GitLab