matplotlib point labels
import matplotlib.pyplot as plt import numpy as np plt.clf() # using some dummy data for this example xs = np.arange(0,10,1) ys = np.random.normal(loc=2.0, scale=0.8, size=10) plt.plot(xs,ys) # text is left-aligned plt.text(2,4,'This text starts at point (2,4)') # text is right-aligned plt.text(8,3,'This text ends at point (8,3)',horizontalalignment='right') plt.show()
Source: queirozf.com
label point matplotlib
from matplotlib import pyplot as plt xC=0 #x cordonate yC=0 #y cordonate label = "[your label goes here]" #label text plt.text(xC, yC, label) plt.show()