I have two numpy arrays, one with the data for x axis and another one with the data for the y axis. The position i in each array matches the other array.
Some values in the x axis array are repeated. I would like each of them to appear in a separate area, as in the following examples (note that 5 and 10 appear twice in the x axis):
Here is the code I tried:
dataFrame = pd.DataFrame({'xx': x_data, 'yy': y_data})
plt.plot('xx', 'yy', data=dataFrame, marker='o')
But this code is creating a chart where there is more than one y axis value for each x axis value (possible due to the repetitions).
The dataFrame is like this:
xx yy
5 1
10 2
15 1
0 0
5 3
20 4
4 3
10 4
Thanks in advance.