将标签添加到散点图点

时间:2020-10-03 00:11:16

标签: python graph scatter

我想在每个月的散点图上添加标签,但我不熟悉python中的图形使用。

temp = [37,43,54,62,72,83,93,91,79,65,49,38]
rain = [1.3,1.3,1.8,2,2,1,0.6,0.7,1.2,1.5,1.5,1.4]
months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
graph.title("Average Temp Vs Average Rainfall",fontsize = 16)
graph.xlabel("Rainfall",fontsize = 14)
graph.ylabel("Temperature",fontsize = 14)
graph.tick_params(axis='both',labelsize = 11)
graph.scatter(rain,temp,c='blue', edgecolor='red',s=25)
graph.show()

0 个答案:

没有答案