Skip to content

Commit

Permalink
Additional cosmetic chart display changes to plot.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebarlas committed Jul 3, 2024
1 parent abe7727 commit 64d0806
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ def date_range(start_date, end_date, delta, target_fmt):
return arr


def plot(x, y, title, file):
def plot(x, y, title, file, xlabel):
plt.figure(figsize=(16, 10))
plt.bar(x, y, color='blue')
plt.xlabel('Time')
plt.bar(x, y)
plt.xlabel(xlabel)
plt.ylabel('Events')
plt.title(title)
plt.xticks(rotation=90)
plt.subplots_adjust(bottom=0.2)
plt.grid()
plt.grid(axis='y', linestyle='--', alpha=0.7)
plt.savefig(file)


Expand Down Expand Up @@ -165,7 +165,7 @@ def main():
start_file = switch_format(start, compact_fmt)
end_file = switch_format(end, compact_fmt)
plot_file = f'tot_chart_{start_file}_{end_file}_{bucket}_{filter_name}.png'
plot(x, y, plot_title, plot_file)
plot(x, y, plot_title, plot_file, bucket_title)
print(plot_file)


Expand Down

0 comments on commit 64d0806

Please sign in to comment.