I am trying to annotate two points in a scatterplot, however due to the overcrowded nature, they become very difficult to see.
Is there anyway I can put an arrow or a pointer that points to the point in question but annotates the name in blank space away from the clustered observations?
plt.scatter(afb[:,0], afb[:,1], c="yellow")
plt.title("Arrow Scatter", weight="bold", fontsize=20)
plt.annotate("James", (a[812,0], a[812,1]))
plt.annotate("Jane", (a[1067,0], a[1067,1]))
plt.ylabel("2", fontsize=16)
plt.xlabel("1", fontsize=16)
plt.show()
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…