My first issue was to create check the coordinates of the points in scatterplot matplotlib with a mouse over, that part has been done with the code:
from pandas.api.types import is_numeric_dtype
import matplotlib.pyplot as plt
import mplcursors
....
....
df.plot.scatter(x='column1', y='column2')
mplcursors.cursor(hover=True)
then i put the image in html code using this code:
plt.savefig('C:\\Users\\foo.png', bbox_inches='tight')
page_title_text = 'My report'
title_text = 'title'
text = 'Hello, welcome to your report'
html = f'''
<html>
<head>
<title>{page_title_text}</title>
</head>
<body>
<h1>{title_text}</h1>
<p>{text}</p>
<img src='C:\\Users\\foo.png' width="700">
</body>
</html>
'''
with open('C:\\Users\\html_report.html', 'w') as f:
f.write(html)
That last part allowed me to load the image in a standalone html page but obviously the mouse over won't work in this case since I'm loading a static image to the html, but is there any way at all to do this without a continuous connection to python, as in have a stand alone html that would allow to see the coordinates of scatterplot dots when having a mouse over?
EDIT
import matplotlib.pyplot as plt, mpld3
.
.
.
f= plt.gcf()
print(mpld3.fig_to_html(f))
then i wrote down the print to a file and saved as .html, as described in my comment i was able to see my plot in html but not the coordinates when doing a mouse over the dots.