Skip to content
Snippets Groups Projects
Commit f77048a5 authored by Felix Kleinert's avatar Felix Kleinert
Browse files

use lim on upstream plot

parent a94a728b
No related branches found
No related tags found
No related merge requests found
Pipeline #87603 failed
......@@ -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,6 +655,7 @@ 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",
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment