Add time series logging to plot.py
This commit is contained in:
parent
976ddc6c23
commit
cc7ba64dd3
5
plot.py
5
plot.py
@ -1,15 +1,18 @@
|
||||
import datetime
|
||||
from pathlib import Path
|
||||
|
||||
import fire
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from wsgi import create_fig
|
||||
from wsgi import create_fig, create_plot_df
|
||||
|
||||
|
||||
def main(folder: str = "plots"):
|
||||
fig, _df, _df_state, timestamp = create_fig()
|
||||
timestamp = timestamp.replace(" ", "_")
|
||||
timestamp = timestamp.replace(":", "-")
|
||||
plot_df = create_plot_df(datetime.datetime.now(), _df_state)
|
||||
print(plot_df.sum(1))
|
||||
fig.savefig(Path(folder) / f"digital_plot_{timestamp}.png", dpi=300)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user