I created an app in matlabs App Designer. The app includes a UIAxes element with some data points.
When running the app via "normal" matlab, it works great. I can select points and retrieve the coordinates using dcm_obj = datacursormode(app.UIFigure)
and subsequently click_coords1 = getCursorInfo(dcm_obj);
.
After compiling the app with Matlab Compiler (Share -> standalone desktop app -> include runtime in package) and running the compiled version, data points can no longer be selected. When I click on a data point in the figure, simply nothing happens. The data point is not selected and no tool tip appears. The code that normally returns the coordinates now returns nothing. I also noticed the figure itself looks less nice (scatter plot circles seem square-ish).
Other functionality does seem to work: Drop down menus and buttons, which retrieve & draw data in the figure, drawing new data in the figure is also no problem. I can also pan the figure (although for some reason that's very slow in Ubuntu 20, but not in CentOS 8).
I run the app using the provided bash script:
./run_myapp.sh [path to matlab]
There's no difference in running the app as local user or root. There's also no difference when referencing matlab runtime or "normal" matlab.
Details:
Matlab runtime version: V98
"Normal" matlab version: R2020a
Operating system: Ubuntu 20.04 / CentOS 8
The problem can be reproduced using the example Patients Display app that matlab App Designer provides. Compile it as standalone desktop app with the runtime included. Install it and run it using the provided bash script. Clicking on the data points is not possible (but it is possible in App Designer).