1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
for x_value,y_value in zip(x,y): plt.text(x_value,y_value,y_value,fontsize= 15)
for xy in zip(x, y): plt.annotate("(%s,%s)" % xy, xy=xy, xytext=(-20, 10), textcoords='offset points') x0 = 1 y0 = 2* x0 plt.annotate(r'${}+{}={}$'.format(x0,x0,y0),xy=(x0,y0),xycoords='data',xytext=(+30,-30),textcoords = 'offset points', fontsize=16,arrowprops=dict( arrowstyle='->', connectionstyle='arc3,rad=.2' ))
plt.annotate(r'$2x+1={}$'.format(y),xy=(x,y),xycoords='data',xytext=(+30,-30),textcoords = 'offset points',fontsize=16, arrowprops=dict( arrowstyle='->', connectionstyle='arc3,rad=.2') )
|