How do I programmatically extract a 3D plot point selected by a user interactively?
I have a uifigure which includes a uitable and a plot axes. Some of the data columns in the uitable are plotted as scatter3 objects in the plot. When a user clicks a point in the plot associated with one of the scatter3 objects, I want to programmatically select the corresponding row in the uitable used to generate the point. I’m therefore wanting to execute a function when the user clicks the uifigure (presumably through the ButtonDownFcn callback) that extracts the 3D point nearest the user click position so I can determine which row in the uitable represents the selected point. This functionality is close to the Data Tip capability available for plots, but I don’t want to show the data tip; I just want to get the 3D point coordinates. How can I get the 3D coordinates of the point nearest the user click position?I have a uifigure which includes a uitable and a plot axes. Some of the data columns in the uitable are plotted as scatter3 objects in the plot. When a user clicks a point in the plot associated with one of the scatter3 objects, I want to programmatically select the corresponding row in the uitable used to generate the point. I’m therefore wanting to execute a function when the user clicks the uifigure (presumably through the ButtonDownFcn callback) that extracts the 3D point nearest the user click position so I can determine which row in the uitable represents the selected point. This functionality is close to the Data Tip capability available for plots, but I don’t want to show the data tip; I just want to get the 3D point coordinates. How can I get the 3D coordinates of the point nearest the user click position? I have a uifigure which includes a uitable and a plot axes. Some of the data columns in the uitable are plotted as scatter3 objects in the plot. When a user clicks a point in the plot associated with one of the scatter3 objects, I want to programmatically select the corresponding row in the uitable used to generate the point. I’m therefore wanting to execute a function when the user clicks the uifigure (presumably through the ButtonDownFcn callback) that extracts the 3D point nearest the user click position so I can determine which row in the uitable represents the selected point. This functionality is close to the Data Tip capability available for plots, but I don’t want to show the data tip; I just want to get the 3D point coordinates. How can I get the 3D coordinates of the point nearest the user click position? appdesigner MATLAB Answers — New Questions