From f07a84a01eaa64cc314e031505f9d28717aa9295 Mon Sep 17 00:00:00 2001
From: Tamas Gal <tgal@km3net.de>
Date: Thu, 28 Feb 2019 19:04:56 +0400
Subject: [PATCH] Add title

---
 scripts/online_reco.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/online_reco.py b/scripts/online_reco.py
index 0cbb72a..27ea963 100644
--- a/scripts/online_reco.py
+++ b/scripts/online_reco.py
@@ -52,11 +52,14 @@ class ZenithDistribution(kp.Module):
             self.create_plot()
 
     def create_plot(self):
-        fig, ax = plt.subplots(figsize=(4, 3))
+        n = len(self.thetas)
+        n_ok = n - np.count_nonzero(np.isnan(self.thetas))
+
+        fig, ax = plt.subplots(figsize=(16, 10))
         ax.hist(self.thetas, bins=180)
         ax.set_title(
             r"$\theta$ distribution of JGandalf track reconstructions\n"
-            r"(from the last %s events)" % self.max_events)
+            r"based on %d of %d reconstructed events" % (n_ok, n))
         ax.set_xlabel(r"$\theta$ [deg]")
         ax.set_ylabel = "count"
         filename = os.path.join(self.plots_path, 'track_reco.png')
-- 
GitLab