I'm trying to replicate this:

I have a list of words, each of which has an x and y coordinate. I need to graph them just like the one above. What is the best way to do this? I know I could do something like...
y = [2.56422, 3.77284, 3.52623, 3.51468, 3.02199]
z = [0.15, 0.3, 0.45, 0.6, 0.75]
n = [hello, xyz, bbb, fasjd, boy]
fig, ax = plt.subplots()
for i, txt in enumerate(n):
ax.annotate(txt, (z[i], y[i]))
But this doesn't seem too efficient for what I want to do. For each word, I have a function to pass it through to find the x coordinate and then another function to find its y coordinate. Maybe just a list of the words and then a function that loops through and plots each one as it goes through the list? Is this possible?
def plotWords(words):
fig, ax = pyplot.subplots()
for w in words:
ax.annotate(w, code for x coordinate, code for y coordinate)
return ax


pandas, a dataframe would also work nicely.def plotWords(words, genderPC): fig, ax = pyplot.subplots() for w in words: ax.annotate(w, code for x coordinate, code for y coordinate) return axbut I'm getting an error.