I'm trying to plot a scatterplot, but instead of having points or triangles or other symbols, I want to plot numbers. For example, with these points:
centroidCoords = [Point(7.210123936676805, -0.0014481952154823),
Point(5.817327756517152, -1.0513260084561042),
Point(5.603133733696165, -2.7765635631249412),
Point(4.500525247710033, -0.8659667639805515),
Point(3.9999999999880367, -2.089987631283091),
I can plot in a scatterplot like:
# xs = [point.x for point in centroidCoords]
# ys = [point.y for point in centroidCoords]
# plt.scatter(xs, ys)
But instead of the little circular points, I'm wondering if I can plot numbers. The first point could be 1, the second point 2, etc. I tried using zip to assign the numbers like so:
num_label = range(0,len(centroidCoords),1)
numberedCentroids = zip(centroidCoords, num_label)
print(numberedCentroids)
but it doesn't print or plot how I imagined. All I want is a plot with the number 1 at point 1 coordinates, the number 2 at point 2 coordinates, etc. Eventually I will add polygons in the back and this is going to look like one of those "color the number" things.
I'm pretty new to python, so any help would be greatly appreciated!
