diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index 2c7d8fdedb2720b1276b77a5e817723094ecf03d..c96026736074bc29497073e5669d557fdc6d647d 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -726,7 +726,8 @@ class PlotCompetitiveSkillScore(AbstractPlotClass): def _plot(self): """Plot skill scores of the comparisons.""" - fig, ax = plt.subplots() + size = max([len(np.unique(self._data.comparison)), 6]) + fig, ax = plt.subplots(figsize=(size, size * 0.8)) order = self._create_pseudo_order() sns.boxplot(x="comparison", y="data", hue="ahead", data=self._data, whis=1., ax=ax, palette="Blues_d", showmeans=True, meanprops={"markersize": 3, "markeredgecolor": "k"}, flierprops={"marker": "."}, @@ -735,7 +736,7 @@ class PlotCompetitiveSkillScore(AbstractPlotClass): ax.set(ylabel="skill score", xlabel="competing models", title="summary of all stations", ylim=self._lim()) handles, _ = ax.get_legend_handles_labels() - plt.xticks(rotation=20) + plt.xticks(rotation=90) ax.legend(handles, self._labels) plt.tight_layout() diff --git a/mlair/run_modules/experiment_setup.py b/mlair/run_modules/experiment_setup.py index e772bbaaba5a7618b95f345dcb7056616c56403e..34da6cb33828d8fd2b34d15dd50da3e30c8af17e 100644 --- a/mlair/run_modules/experiment_setup.py +++ b/mlair/run_modules/experiment_setup.py @@ -346,7 +346,7 @@ class ExperimentSetup(RunEnvironment): self._set_param("neighbors", ["DEBW030"]) # TODO: just for testing # set competitors - self._set_param("competitors", helpers.to_list(competitors), default=[]) + self._set_param("competitors", competitors, default=[]) competitor_path_default = os.path.join(self.data_store.get("data_path"), "competitors", "_".join(self.data_store.get("target_var"))) self._set_param("competitor_path", competitor_path, default=competitor_path_default) diff --git a/mlair/run_modules/post_processing.py b/mlair/run_modules/post_processing.py index ebcf105f3b4b6c36b95d003275a2e3e52c78e61e..020f0a42b9e205800b39ccbfdec20cbba8364f1f 100644 --- a/mlair/run_modules/post_processing.py +++ b/mlair/run_modules/post_processing.py @@ -15,7 +15,7 @@ import xarray as xr from mlair.data_handler import BootStraps, KerasIterator from mlair.helpers.datastore import NameNotFoundInDataStore -from mlair.helpers import TimeTracking, statistics, extract_value, remove_items +from mlair.helpers import TimeTracking, statistics, extract_value, remove_items, to_list from mlair.model_modules.linear_model import OrdinaryLeastSquaredModel from mlair.model_modules.model_class import AbstractModelClass from mlair.plotting.postprocessing_plotting import PlotMonthlySummary, PlotStationMap, PlotClimatologicalSkillScore, \ @@ -81,7 +81,7 @@ class PostProcessing(RunEnvironment): self.skill_scores = None self.bootstrap_skill_scores = None self.competitor_path = self.data_store.get("competitor_path") - self.competitors = self.data_store.get_default("competitors", default=[]) + self.competitors = to_list(self.data_store.get_default("competitors", default=[])) self.forecast_indicator = "nn" self._run()