diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index a0c701ac5371dd70e56f759e4fd615cc6d9de1c2..8ef634ef174ac7e91fd76ad5f6aa7645893d0571 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -639,6 +639,7 @@ class PlotSectorialSkillScore(AbstractPlotClass): # pragma: no cover data = self._data sns.boxplot(x="sector", y="data", hue="ahead", data=data, whis=1, ax=ax, palette="Blues_d", showmeans=True, meanprops={"markersize": 3, "markeredgecolor": "k"}, flierprops={"marker": "."}, + ylim=self._lim(data) ) ax.axhline(y=0, color="grey", linewidth=.5) ax.set(ylabel=f"skill score ({self._model_setup} vs. {self._reference_model})", xlabel="sector", @@ -654,7 +655,8 @@ class PlotSectorialSkillScore(AbstractPlotClass): # pragma: no cover data = self._data sns.boxplot(y="sector", x="data", hue="ahead", data=data, whis=1.5, ax=ax, palette="Blues_d", showmeans=True, meanprops={"markersize": 3, "markeredgecolor": "k"}, flierprops={"marker": "."}, - ) + xlim=self._lim(data) + ) ax.axvline(x=0, color="grey", linewidth=.5) ax.set(xlabel=f"skill score ({self._model_setup} vs. {self._reference_model})", ylabel="sector", title="summary of all stations") @@ -674,7 +676,7 @@ class PlotSectorialSkillScore(AbstractPlotClass): # pragma: no cover """ limit = 5 lower = np.max([-limit, np.min([0, helpers.float_round(data["data"].min(), 2) - 0.1])]) - upper = np.min([limit, helpers.float_round(data.max()[2], 2) + 0.1]) + upper = np.min([limit, helpers.float_round(data["data"].max(), 2) + 0.1]) return lower, upper