diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index b7ebad813b5d53b0b686ebbd4d5fde69b810a05f..ce53f4c543b646dbabcbd806761491aec474106c 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -831,6 +831,7 @@ class PlotBootstrapSkillScore(AbstractPlotClass): self._labels = None self._x_name = "boot_var" self._data = self._prepare_data(data) + self._individual_vars = set(self._data[self._x_name].values) self._plot() self._save() self.plot_name += '_separated' @@ -900,6 +901,7 @@ class PlotBootstrapSkillScore(AbstractPlotClass): data_second = self._select_data(df=data, variables=remaining_vars, column_name='boot_var') fig, ax = plt.subplots(nrows=1, ncols=2, + figsize=(len(self._individual_vars) / 2, 10), gridspec_kw={'width_ratios': [len(separate_vars), len(remaining_vars) ] @@ -981,11 +983,11 @@ class PlotBootstrapSkillScore(AbstractPlotClass): """ """ - fig, ax = plt.subplots() + fig, ax = plt.subplots(figsize=(len(self._individual_vars)/2, 10)) 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) - plt.xticks(rotation=45) + plt.xticks(rotation=45, horizontalalignment="right") ax.set(ylabel=f"skill score", xlabel="", title="summary of all stations") handles, _ = ax.get_legend_handles_labels() ax.legend(handles, self._labels)