import matplotlib.pyplot as plt
# 绘制一些数据
x_data = [1, 2, 3, 5]
y_data = [2, 4, 8, 10]
plt.plot(x_data, y_data,'o',markersize = 20)
# 添加文本注释
text= ['a','b','c','d']
for i in range(4):
plt.text(x_data[i], y_data[i],text[i], fontdict={'family': 'serif', 'size': 16, 'color': 'red'}, ha='center', va='center')
# 显示图形
plt.show()