StandAlone Matlab app don't show the points with the interection with the mouse
3 views (last 30 days)
I am building an app in matlab app desing that the user needs to interact with the graph with a mouse and in the app designer appears the points like in the figure. But when I create the standAlone app, this interaction with the graph disappears. Does someone know how to solve it?
Mohammad Sami on 26 Jul 2022
Edited: Mohammad Sami on 26 Jul 2022
Enable or Disable Built-In Interactions
To control whether a set of built-in interactions is enabled within a chart, use the disableDefaultInteractivity and enableDefaultInteractivity functions. Sometimes MATLAB® automatically disables the built-in interactions. For example, they might be disabled for charts that have special features, or when you implement certain callbacks such as a WindowScrollWheelFcn.
You can try calling enableDefaultInteractivity after you have plot something on the UIAxes
% ... code to plot ....%
enableDefaultInteractivity(app.X); % app.X where X is the name of your UIAxes object
% alternative method to only enable dataTipInteractions.
app.X.Interactions = [dataTipInteraction]; % app.X where X is the name of your UIAxes object
More details can be found at the link below.