I am very new to python. I just want to know Is there any way to insert matplotlib plot on a web page using flask, without converting to static JPG or png?
This is my code:
from flask import Flask
app = Flask(__name__)
import matplotlib.pyplot as plt
@app.route("/")
def hello():
x = [2, 4, 6]
y = [1, 3, 5]
plt.plot(x, y)
plt.show()
if __name__ == "__main__":
app.run()
This is what I expect as an output: Page