Skip to content

Commit

Permalink
update plot
Browse files Browse the repository at this point in the history
  • Loading branch information
amanmdesai committed Sep 27, 2023
1 parent 5d742bf commit 03b3709
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pymcabc/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ class for plotting data
"""

def plot(data, key):
plt.hist(data, bins=40, color=None)
fig, ax = plt.subplots()
ax.cla()
ax.hist(data, bins=40, color=None)
label = key.replace("_", " ")
plt.xlabel(label)
plt.ylabel("Events")
ax.set_xlabel(label)
ax.set_ylabel("Events")
plt.savefig(key + ".png")

def file(filename="ABC_events.root"):
Expand Down

0 comments on commit 03b3709

Please sign in to comment.