From 04800f474ee9ba2078f68b42d3132906fbf2ac2a Mon Sep 17 00:00:00 2001 From: Felix Kleinert <f.kleinert@fz-juelich.de> Date: Wed, 21 Apr 2021 13:00:39 +0200 Subject: [PATCH] add loc for competitor plots --- mlair/plotting/postprocessing_plotting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index 00c92503..a3f69ba6 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -748,7 +748,7 @@ class PlotCompetitiveSkillScore(AbstractPlotClass): fig, ax = plt.subplots(figsize=(size, size * 0.8)) data = self._filter_comparisons(self._data) if single_model_comparison is True else self._data if self._model_name_for_plots is not None: - data['comparison'] = [i.replace('nn-', f'{self._model_name_for_plots}-') for i in data['comparison']] + data.loc[:, 'comparison'] = [i.replace('nn-', f'{self._model_name_for_plots}-') for i in data['comparison']] order = self._create_pseudo_order(data) sns.boxplot(x="comparison", y="data", hue="ahead", data=data, whis=1., ax=ax, palette="Blues_d", showmeans=True, meanprops={"markersize": 3, "markeredgecolor": "k"}, flierprops={"marker": "."}, @@ -766,7 +766,7 @@ class PlotCompetitiveSkillScore(AbstractPlotClass): fig, ax = plt.subplots() data = self._filter_comparisons(self._data) if single_model_comparison is True else self._data if self._model_name_for_plots is not None: - data['comparison'] = [i.replace('nn-', f'{self._model_name_for_plots}-') for i in data['comparison']] + data.loc[:, 'comparison'] = [i.replace('nn-', f'{self._model_name_for_plots}-') for i in data['comparison']] order = self._create_pseudo_order(data) sns.boxplot(y="comparison", x="data", hue="ahead", data=data, whis=1., ax=ax, palette="Blues_d", showmeans=True, meanprops={"markersize": 3, "markeredgecolor": "k"}, flierprops={"marker": "."}, -- GitLab