Black Lives Matter. Please consider donating to Black Girls Code today.

3D Scatter Plots in MATLAB®

How to make 3D scatter plots in MATLAB®.

% Learn about API authentication here:
% Find your api_key here:

[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(:)];

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

MATLAB is a registered trademark of The MathWorks, Inc.