plot: Fix date in chart title
This commit is contained in:
parent
4f09a2dd4e
commit
7a175e7f0a
|
@ -100,9 +100,9 @@ def chart(date):
|
||||||
|
|
||||||
plot.set(ylabel=None)
|
plot.set(ylabel=None)
|
||||||
plot.set(xlabel="Hour of day")
|
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.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.")
|
print(f"Plot for {date} saved.")
|
||||||
plt.close()
|
plt.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue