I understand that you would like to plot two sets of data (“y1” and “y2”) as clusters on the x-axis, and instead of displaying numbers, you would like to show the labels "Positive = y1" and "Negative = y2".
In the approach you shared, the variable “names” is beging used directly as x-values in the “plot” function, which caused MATLAB to interpret them as categorical data or indices. As a result, numbers appeared on the x-axis instead of the intended labels.
Here’s a corrected version of the code to achieve the desired behaviour:
y1 = [11.0 10.8 11.0 11.10 11.9 9.9];
y2 = [14.0 16.8 18.0 19.10 21.9 29.9];
names = {'Positive = y1', 'Negative = y2'};
figure
hold on
% Plot y1 points at x = 1
plot(ones(size(y1)), y1, 'ok', 'MarkerFaceColor', 'k')
% Plot y2 points at x = 2
plot(2 * ones(size(y2)), y2, 'ok', 'MarkerFaceColor', 'r')
% Set x-axis labels and ticks
set(gca, 'xtick', [1 2], 'xticklabel', names)
% Set limits for x-axis for better spacing
xlim([0.5 2.5])
ylabel('Values')
title('Clustered plot of Positive and Negative sets')
hold off
Using this approach, you will be able to see the labels "Positive = y1" and "Negative = y2" on the x-axis, along with the clustered data points as intended.

You can use the below command to learn more about “plot” function:
>>doc plot
I hope this resolves your query.