Hello There is an example:
import numpy as np
import matplotlib.pyplot as ptl
def grafica_seno_coseno():
x = np.arange(-4,2*np.pi, 0.3)
y = 2*np.sin(x)
y2 = 3*np.cos(x)
ptl.plot(x, y, '-gD')
ptl.plot(x, y2, '-rD')
for xitem,yitem in np.nditer([x,y]):
etiqueta = "{:.1f}".format(xitem)
ptl.annotate(etiqueta, (xitem,yitem), textcoords="offset points",xytext=(0,10),ha="center")
for xitem,y2item in np.nditer([x,y2]):
etiqueta2 = "{:.1f}".format(xitem)
ptl.annotate(etiqueta2, (xitem,y2item), textcoords="offset points",xytext=(0,10),ha="center")
ptl.grid(True)
return ptl.show()