I am trying to label a scatter/bubble chart I create from matplotlib with entries from a column in a pandas data frame. I have seen plenty of examples and questions related
Jezreal's answer is fine, but i will post this just to show what i meant with df.iterrows in the other thread.
I'm afraid you have to put the scatter (or plot) command in the loop as well if you want to have a dynamic size.
df = pd.DataFrame(dict(x=x, y=y, s=s, users=users))
fig, ax = plt.subplots(facecolor='w')
for key, row in df.iterrows():
ax.scatter(row['x'], row['y'], s=row['s']*5, alpha=.5)
ax.annotate(row['users'], xy=(row['x'], row['y']))