How can I get all properties of some object of UIAXES app designer
3 views (last 30 days)
Show older comments
Hey ,
I'm creating some points with scatter3 plot on UIAxes , and I am trying that when clicking on some point , the point will change her color , or size or somthing.
When i am doing callback function on the UIAxes I cant click the objects , only when clicking the whitespace of the UIAxes it is jumping to the callback function, How can i fix it ?
0 Comments
Answers (1)
Steven Lord
on 14 Nov 2022
If I have a book sitting on a table and I touch the cover of the book, have I touched the table? No. So things that are concerned with the table being touched (someone whose job or chore it is to clean fingerprints off the table, for example) don't get triggered.
If you've specified the Callback for the uiaxes in the scenario you described, you've set the wrong Callback. You've expressed concern for the table being touched (which is why it triggers when you click on the white space in the axes) but you're actually touching the book / scatter plot.
3 Comments
Steven Lord
on 14 Nov 2022
The uiaxes callback functions won't trigger when you click on the scatter3 object but the scatter3 object's callback functions would.
x = rand(1, 10);
y = rand(1, 10);
ax = uiaxes;
h = scatter(ax, x, y);
ax.ButtonDownFcn = @(varargin) disp('uiaxes');
h.ButtonDownFcn = @(varargin) disp('scatter');
Run this code in your MATLAB session then click in a blank section of the axes and on one of the points created in the scatter plot.
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!