%% Create Text Scatter Plot
% Plot a string array of numbers at random points on a text scatter plot.

x = rand(50,1);
y = rand(50,1);
str = string(1:50);
figure
textscatter(x,y,str);

% Alternatively, you can pass the coordinates x and y as a matrix xy, where x and y are the columns of xy.

xy = [x y];
figure
textscatter(xy,str)

% Copyright 2012 The MathWorks, Inc.