Black Lives Matter. Please consider donating to Black Girls Code today.
https://www.blackgirlscode.com/

3D Scatter Plots in MATLAB®

How to make 3D scatter plots in MATLAB®.


% Learn about API authentication here: https://plotly.com/matlab/getting-started
% Find your api_key here: https://plotly.com/settings/api

[X,Y,Z] = sphere(16);
x = [0.5*X(:); 0.75*X(:); X(:)];
y = [0.5*Y(:); 0.75*Y(:); Y(:)];
z = [0.5*Z(:); 0.75*Z(:); Z(:)];
scatter3(x,y,z)

resp = fig2plotly(fig)
plotly_url = resp.url;

MATLAB is a registered trademark of The MathWorks, Inc.