plot: Fix date in chart title

This commit is contained in:
Samuel Ortion 2022-08-24 12:00:47 +02:00
parent 4f09a2dd4e
commit 7a175e7f0a
1 changed files with 2 additions and 2 deletions

View File

@ -100,9 +100,9 @@ def chart(date):
plot.set(ylabel=None)
plot.set(xlabel="Hour of day")
plt.suptitle(f"Top {CONFIG['readings']} species on {CONFIG['date']}", fontsize=14)
plt.suptitle(f"Top {CONFIG['readings']} species on {date}", fontsize=14)
plt.text(15, 11, f"(Updated on {datetime.now().strftime('%Y/%m-%d %H:%M')})")
plt.savefig(f"./var/charts/chart_{CONFIG['date']}.png", dpi=300)
plt.savefig(f"./var/charts/chart_{date}.png", dpi=300)
print(f"Plot for {date} saved.")
plt.close()