From ed0ae581f2d6289c4b016a99f2eb25b338cec870 Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Fri, 18 Sep 2020 16:28:52 +0200
Subject: [PATCH] solved key error bug

---
 mlair/plotting/postprocessing_plotting.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlair/plotting/postprocessing_plotting.py b/mlair/plotting/postprocessing_plotting.py
index 5cc449aa..675e5ade 100644
--- a/mlair/plotting/postprocessing_plotting.py
+++ b/mlair/plotting/postprocessing_plotting.py
@@ -786,8 +786,8 @@ class PlotTimeSeries:
     def _plot(self, plot_folder):
         pdf_pages = self._create_pdf_pages(plot_folder)
         for pos, station in enumerate(self._stations):
-            start, end = self._get_time_range(self._load_data(self._stations[0]))
             data = self._load_data(station)
+            start, end = self._get_time_range(data)
             fig, axes, factor = self._create_subplots(start, end)
             nan_list = []
             for i_year in range(end - start + 1):
-- 
GitLab