To plot a scatter graph for data where there might be multiple y-values corresponding to a single x-value, the following code can be referred:
% Data
x = [1, 2, 3, 3, 4, 4, 5];
y = [1, 2, 1, 3, 2, 4, 5];
% Create scatter plot
scatter(x, y, 'filled');
% Add labels and title
xlabel('x');
ylabel('y');
title('Scatter Plot');
In this example, I have created two row vectors: one for the x-values and another for the y-values. The x-values are repeated where there are multiple corresponding y-values.
The resulting plot is as desired and can be seen below:

For more information, you can refer to the following documentations: