I'm plotting a handful of coordinates using two lists, x
and y
. I have a third list which is a list of labels. I want to apply the corresponding label to every (xᵢ,yᵢ) pair.
I'm plotting the coordinates using this command:
self.map.plot(x, y, 'bo', markersize=10, picker=5)
I know that you can use the label="my label here"
argument, but I'm not sure how to do it for each coordinate.
Example Data
x = [10,20,24,90]
y = [04,20,40,100]
labels = ["dog", "fish", "cat", "mouse"]
(10,4)
would have the label"dog"
.(20,20)
would have the label"fish"
.(24,40)
would have the label"cat"
.(90,100)
would have the label"mouse"
.