rotate3d not working properly with matlab GUI and pcshow function
3 views (last 30 days)
Show older comments
Hey! I'm trying to create a GUI to visualize and postprocess some data (ASCII pointcloud). Unfortunately the rotate3d function does not work the intended way when dealing with GUI elements and pcshow. There seems to be an issue with the button up callback. On one hand, the rotation of the axis is somehow buggy (everytime I klick again, it jumps to another view) and on the other hand, the cursor does not change when leaving the axis.
I tried this on several machines. It occours on r2017b and r2016b. On r2015b, the rotation works perfect, but the cursor still does not change.
plot3 and scatter3 are working fine but are not suitable for my application.
I added two files with an mwe to help spotting the issue.
Thank you for your help.
2 Comments
Louise Clark
on 24 Oct 2018
I also have this same issue on r2018b, in my GUI I am loading a .ply file using pcshow() but again, the axis wont rotate 3D.
I have tried
rotate3d(axis_handle, 'on');
which stops the error messages showing when I try to rotate, but otherwise I get the same issue with the button up callback.
Did you manage to solve this issue?
Veronica Taurino
on 2 May 2022
Edited: Veronica Taurino
on 3 Aug 2022
Did someone manage to solve this? In particular ''everytime I click again, it jumps to another view''
Answers (1)
Adam Danz
on 26 Apr 2024
Edited: Adam Danz
on 6 Jun 2024
> ...the rotation of the axis is somehow buggy (everytime I klick again, it jumps to another view) and ... the cursor does not change when leaving the axis.
R2024a Update
The following improvements were made to rotation with point clouds in R2024a:
- Rotation now requires clicking within the axes. Previously, you could click and rotate from anywhere in the figure which does not work nicely when the figure has sub plots.
- The above eliminates the jump in rotation when the mouse clicks outside of the axes within the figure.
The cursor behavior has not changed.
3 Comments
Adam Danz
on 6 Jun 2024
To access xyzPoints.mat, call openExample('vision/CreatePointCloudObjectAndInspectPropertiesExample')
load("xyzPoints");
ptCloud = pointCloud(xyzPoints);
tiledlayout(2,2)
ax = nexttile();
pcshow(ptCloud)
If you're calling rotate3d, that may be toggling the rotation interaction off. If you're having trouble rotating the point cloud using this demo, please contact tech support.
Joel Berkson
on 3 Jul 2024
I am only experienceing this problem in App Designer. Using 'Parent' as UIAxes creates this problem, I instead create an axes(app.Panel) in my app startupFcn and that seems to work. But, when I am in rotate mode, the cursor is in rotate mode across the entire app, not just in the axes.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!