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()

matplotlib18:注释_第1张图片

你可能感兴趣的:(matplotlib18:注释)