matplotlib18:注释

 1 import matplotlib.pyplot as plt
 2 import numpy as np
 3 x = np.arange(-10,11,1)
 4 y = x*x
 5 plt.plot(x,y)
 6 plt.annotate('shis is the bootm',
 7              xy=(0,1),xytext=(0,20),
 8              arrowprops=dict(facecolor='r',
 9                              frac=0.2,
10                              headwidth=30
11                              ,width=10))
12 
13 
14 plt.show()

posted @ 2019-07-11 06:21  挑水工  阅读(180)  评论(0编辑  收藏  举报