How to create these two plots from two arrays with numbers? 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.
Changed the values for better representation
# Gathering Dataframe
import pandas as pd 
data = [[1, 5], [1, 6], [2, 5], [0,0], [5,8], [20,4]]  
df = pd.DataFrame(data, columns = ['xx', 'yy']) 
df

#Drawing the plot (Scatter Plot)
from matplotlib.pyplot import *

plott = df.plot.scatter(x='xx', y='yy', title= &quot;Scatter plot between two variables X 
and Y&quot;);

plott


# (line plot connecting the scatter plots)
plt.plot( 'xx', 'yy', data=df, linestyle='-', marker='o')
plt.show()