did you try the answers in [this](https://stackoverflow.com/questions/49015957/how-to-get-python-graph-output-into-html-webpage-directly) question ?
– PrabathJan 19 '21 at 15:47
Does this answer your question? [Saving interactive series on matplotlib figures (html)](https://stackoverflow.com/questions/33012025/saving-interactive-series-on-matplotlib-figures-html)
– Ignacio ValenzuelaJan 19 '21 at 15:52