I want to label each data point on my pyplot.
I have two sets of data and I would like to label each data point with their value.
This is my code:
import matplotlib.pyplot as plt
x_position = [1,6,2,7,4,5]
y_position = [8,4,7,7,2,4]
plt.plot(x_position, y_position, 'rx')
plt.show()
This plots a graph with a red marker for each point, however I need the data points to be displayed at each point.
Any help would be appreciated.
Thanks.