Do you want to embed the images on the page or just load the png? Something like this stackoverflow.com/questions/454601... could work for rendering the png. Otherwise, I would save the matplotlib graph to the png in your static files, then dynamically pass the file path to the template. You could do this within your models if that is how your app is structured. I would also highly recommend Bokeh to create fully interactive graphs Python!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.