Skip to content
Snippets Groups Projects
Commit 2c8313f4 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Fix plotting

parent cd956bbc
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ Options: ...@@ -19,6 +19,7 @@ Options:
""" """
from collections import deque from collections import deque
import time import time
import os
import threading import threading
import numpy as np import numpy as np
import matplotlib import matplotlib
...@@ -52,8 +53,12 @@ class ZenithDistribution(kp.Module): ...@@ -52,8 +53,12 @@ class ZenithDistribution(kp.Module):
def create_plot(self): def create_plot(self):
fig, ax = plt.subplots(figsize=(16, 4)) fig, ax = plt.subplots(figsize=(16, 4))
plt.histogram(self.thetas, bins=180) ax.hist(self.thetas, bins=180)
filename = join(self.plots_path, 'track_reco.png') ax.set_title(
r"$\theta$ distribution of JGandalf track reconstructions")
ax.set_xlabel(r"$\theta$ [deg]")
ax.set_ylabel = "count"
filename = os.path.join(self.plots_path, 'track_reco.png')
plt.savefig(filename, dpi=120, bbox_inches="tight") plt.savefig(filename, dpi=120, bbox_inches="tight")
plt.close('all') plt.close('all')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment