Is it possible to "move" points in 3D?

15 ビュー (過去 30 日間)
Roger Breton
Roger Breton 2022 年 4 月 16 日
回答済み: Aman Banthia 2023 年 9 月 28 日
I have this scatter3 graph, I'm generating from CIE Lab coordinates :
Would it be too far-fetch to be able to select any points on the graph and "move" them in some direction? And recover their new positions?

回答 (1 件)

Aman Banthia
Aman Banthia 2023 年 9 月 28 日
Hi Roger,
I understand that you are trying to make your points draggable inside your 3d plot and get the new coordinates as well.
You can use a custom function named ‘draggable’ to do so.
This function enables a graphical object (be it a line, plot, patch, rectangle, text box, etc.) to be dragged inside an axis, with a very simple syntax ("draggable(h)"), following or not horizontal, vertical, or diagonal constraints. Limits can be imposed on the object's movement.
Please use the ‘draggable’ function from the below mentioned MATLAB File Exchange Link:
If this function doesn’t work in your MATLAB version you can use the other modified function through below mentioned MATLAB File Exchange Link:
These ‘draggable’ functions are tested for 2d plots you might have to make some changes to use it inside your 3d plots.
Hover over the moved points inside the graph to get the coordinates.
Hope that the above solution works.
Best Regards,
Aman Banthia

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by