I am plotting a certain list, Z[i, j] of length D, using matplotlib along with the annotation of the points taken from another list, index_word_map[i], as follows:
plt.scatter(Z[:,0], Z[:,1])
for i in range(D):
plt.annotate(s=index_word_map[i], xy=(Z[i,0], Z[i,1]))
plt.show()
Now, I want to do the same using plotly or plotly express. I can plot the points using plotly express as follows:
X = []
Y = []
for i in range(D):
x = Z[i,0]
y = Z[i,1]
X.append(x)
Y.append(y)
fig = px.scatter(x=X, y=Y)
But, how am I to use the annotation list (index_word_map[i]) to have the labels of the points to show up on the plot also?
