I would like to plot as lines and also as points a list of tuples so I have
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0, 3 * np.pi, 0.1)
y = np.sin(x)
lista=[(0,1,3),(1,4,5),(2,0,2),(3,5,10),(4,3,7)]
#lista=[(0,1),(1,4),(2,0),(3,5),(4,3)]
plt.scatter(*zip(*lista))
#plt.plot(*zip(*lista)) #<--- this works
plt.show()
I followed the advice on this answer
However, when I plot as a line it works but when I do as scatter, it shows only the first values (0,1) and not the second value (0,3)
How can the scatter also work to plot two series of data
Note: The first serie being the first and second value in the tuple and the second being the first and third in the tuple
This does not work