Matplotlib scatter plot with different text at each data point

后端 未结 9 2204
挽巷
挽巷 2020-11-22 12:50

I am trying to make a scatter plot and annotate data points with different numbers from a list. So, for example, I want to plot y vs x and annotate

9条回答
  •  眼角桃花
    2020-11-22 13:18

    This might be useful when you need individually annotate in different time (I mean, not in a single for loop)

    ax = plt.gca()
    ax.annotate('your_lable', (x,y)) 
    

    where x and y are the your target coordinate and type is float/int.

提交回复
热议问题