What I'm trying to do is to put each index 0 of each item of list a in the list x and each index 1 of each item of list a in the list y. When the plot is shown, it only appears one point. Does anybody know what am I doing wrong? Thanks in advance.
a = [[1,2], [2,3], [3,4], [5,6], [6,7]]
for item in a:
x = [ ]
y = [ ]
x.append(item[0])
y.append(item[1])
plt.plot(x, y, 'ro')
plt.axis([-50, 50, -50, 50])
plt.show()