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

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

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

xyz = [x y z];
figure
textscatter3(xyz,str)

%
% Copyright 2012 The MathWorks, Inc.