From 96d5baa412d2202348a2d1609d94925cd5f94d43 Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Tue, 15 Dec 2020 17:53:29 +0100
Subject: [PATCH] map plot includes number of stations inside a subset in the
 legend, /close #231

---
 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 aee72439..f775f741 100644
--- a/mlair/plotting/postprocessing_plotting.py
+++ b/mlair/plotting/postprocessing_plotting.py
@@ -292,7 +292,7 @@ class PlotStationMap(AbstractPlotClass):
                 mfc = plot_opts.get("mfc", default_colors.get(name, "b"))
                 legend_elements.append(
                     mlines.Line2D([], [], mfc=mfc, mec=mec, marker=self._adjust_marker(marker), ms=ms, linestyle='None',
-                                  label=name))
+                                  label=f"{name} ({len(data_collection)})"))
                 for station in data_collection:
                     coords = station.get_coordinates()
                     IDx, IDy = coords["lon"], coords["lat"]
-- 
GitLab