From 389f5b2f0e3cf9216d911fe61dfdeb604d2541c4 Mon Sep 17 00:00:00 2001 From: leufen1 <l.leufen@fz-juelich.de> Date: Tue, 8 Dec 2020 18:07:46 +0100 Subject: [PATCH] create two versions of the station map, set defaut color for train_val to black for now --- mlair/plotting/postprocessing_plotting.py | 6 +++--- mlair/run_modules/post_processing.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py index c46911c3..aee72439 100644 --- a/mlair/plotting/postprocessing_plotting.py +++ b/mlair/plotting/postprocessing_plotting.py @@ -120,7 +120,7 @@ class AbstractPlotClass: """ Standard colors used for train-, val-, and test-sets during postprocessing """ - colors = {"train": "#e69f00", "val": "#009e73", "test": "#56b4e9"} # hex code + colors = {"train": "#e69f00", "val": "#009e73", "test": "#56b4e9", "train_val": "#000000"} # hex code return colors @@ -242,7 +242,7 @@ class PlotStationMap(AbstractPlotClass): :width: 400 """ - def __init__(self, generators: List, plot_folder: str = "."): + def __init__(self, generators: List, plot_folder: str = ".", plot_name="station_map"): """ Set attributes and create plot. @@ -250,7 +250,7 @@ class PlotStationMap(AbstractPlotClass): as value. :param plot_folder: path to save the plot (default: current directory) """ - super().__init__(plot_folder, "station_map") + super().__init__(plot_folder, plot_name) self._ax = None self._gl = None self._plot(generators) diff --git a/mlair/run_modules/post_processing.py b/mlair/run_modules/post_processing.py index 79c0e3bf..cb24ca3c 100644 --- a/mlair/run_modules/post_processing.py +++ b/mlair/run_modules/post_processing.py @@ -281,6 +281,9 @@ class PostProcessing(RunEnvironment): (self.val_data, {"marker": 6, "ms": 9}), (self.test_data, {"marker": 4, "ms": 9})] PlotStationMap(generators=gens, plot_folder=self.plot_path) + gens = [(self.train_val_data, {"marker": 8, "ms": 9}), + (self.test_data, {"marker": 9, "ms": 9})] + PlotStationMap(generators=gens, plot_folder=self.plot_path, plot_name="station_map_var") if "PlotMonthlySummary" in plot_list: PlotMonthlySummary(self.test_data.keys(), path, r"forecasts_%s_test.nc", self.target_var, plot_folder=self.plot_path) -- GitLab