scatter3 Output as 2D Instead of 3D
MOTIVES-LAB opened this issue · 1 comments
MOTIVES-LAB commented
Problem:
When exporting a scatter3 plot from MATLAB to Plotly using the fig2plotly function, the plot is rendered as a 2D plot in the browser, rather than the expected 3D plot. The issue does not occur for surf or mesh plots, which are correctly displayed as 3D.
Steps to Reproduce:
I simply followed demo code
[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)
fig2plotly(gcf);
Expected Result:
The scatter3 plot should be displayed in 3D in the browser.
Actual Result:
The scatter3 plot is rendered as a 2D plot in the browser.
Environment:
- MATLAB version: 2023a
- Plotly MATLAB version: 3.0.0
- Operating system: Windows 11

