So I know that i can save my diagramm with
plt.savefig('/home/pi/test.png')
But I don't really know how to save and display my diagramm with a HTML file. For my website it would be easier use a HTML file to display my data. So is it possible to save my diagramm in HTML and how?
If it helps here is my code:
from pandas import DataFrame
import sqlite3
import matplotlib.pyplot as plt
import pandas as pd
con = sqlite3.connect("/home/pi/test2.db")
df = pd.read_sql_query("SELECT * from data4 limit 79;",con)
df.plot(x = 'zeit', y = 'temp', kind ='line')
plt.savefig('/home/pi/test.png')
#plt.show()
I'm sorry if I did some mistakes I'm a beginner:)