StandAlone Matlab app don't show the points with the interection with the mouse

조회 수: 2(최근 30일)
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?
  댓글 수: 10
Nélio Dias
Nélio Dias 2022년 7월 25일
This fig reference is the app.UIAxes or the UIFigure?

댓글을 달려면 로그인하십시오.

답변(1개)

Mohammad Sami
Mohammad Sami 2022년 7월 26일
편집: Mohammad Sami 2022년 7월 26일
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
function plotfunction(app,....)
% ... 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
end
More details can be found at the link below.
https://www.mathworks.com/help/releases/R2021a/matlab/creating_plots/control-axes-interactions.html

범주

Find more on Migrate GUIDE Apps in Help Center and File Exchange

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by