Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scatter3 Output as 2D Instead of 3D #520

Open
MOTIVES-LAB opened this issue Nov 23, 2024 · 0 comments
Open

scatter3 Output as 2D Instead of 3D #520

MOTIVES-LAB opened this issue Nov 23, 2024 · 0 comments

Comments

@MOTIVES-LAB
Copy link

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.

  • MATLAB Plot (scatter3):
    MATLAB Plot

Actual Result:

The scatter3 plot is rendered as a 2D plot in the browser.

  • Plotly Output in Browser (Generated from HTML):
    Plotly Output

Environment:

  • MATLAB version: 2023a
  • Plotly MATLAB version: 3.0.0
  • Operating system: Windows 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant