add text to plot python scatter

Solutions on MaxInterview for add text to plot python scatter by the best coders in the world

showing results for - "add text to plot python scatter"
Neyla
06 May 2020
1y = [2.56422, 3.77284, 3.52623, 3.51468, 3.02199]
2z = [0.15, 0.3, 0.45, 0.6, 0.75]
3n = [58, 651, 393, 203, 123]
4
5fig, ax = plt.subplots()
6ax.scatter(z, y)
7
8for i, txt in enumerate(n):
9    ax.annotate(txt, (z[i], y[i]))