Maximum Number of UIAxes in App Designer 2017b

10 views (last 30 days)
Chas Frick
Chas Frick on 4 Dec 2018
Commented: Chas Frick on 18 Dec 2018
Hi!
I recently have been tasked with building a large GUI in Matlab App Designer. After finally finishing placing all the UI elements, I notice that my plotting functions no longer work when calling them. The figures that these plotting functions relate to are also not visible, but still contained in the GUI object. There are no errors reported for this, but rather the GUI refuses to update those plots. The rest of the data is visible on other tabs and the GUI is still functional.
After a bit of searching on other issues related to this, I found this post: https://www.mathworks.com/matlabcentral/answers/327311-why-do-app-designer-uiaxes-elements-start-to-disappear?s_tid=answers_rc1-2_p2_MLT which mentions a limit of 16 axes that was supposed to be fixed for 2017a. The GUI has well over 100 UIAxes in the app currently, so I'm wondering if there is a new limit within MATLAB.
Thanks!
EDIT: I have attached an error that showed up probably 20 minutes after clicking the plot menu action.
  2 Comments
Chas Frick
Chas Frick on 6 Dec 2018
Hi Chris,
Thank you for the suggestion. I have attached the output here:
opengl_info.png

Sign in to comment.

Answers (1)

Andy
Andy on 6 Dec 2018
MATLAB got past the old limit (which was imposed by the technology used) by falling back to a different way to create graphics contexts. However, some graphics cards have limits on how many graphics contexts they can make. You may be running into a limit from that. The error log you attached (thanks!) shows the problem was in the fallback graphics creation.
You may be able to avoid the first limit (and thus avoid the fallback which may be hitting the other limit) by putting your UIAxes into different uifigures. Can you group them into different figures?
How many UIAxes are you getting successfully? Or if they don't work, do all stop working?
I'm also interested in the info Chris requested above.
thanks
andy
  7 Comments
Chas Frick
Chas Frick on 18 Dec 2018
Commenting here to list two possible work arounds. The total number of possible axes is split between the custom GUI and App Designer. If App Designer is closed and the GUI is run separately, this can allow a few more axes to show up. Another possible work around is to consolidate figures and plot multiple datasets on the same plot. This was the trick used in this case to cut down on the number of figures from around 200 to ultimately get the number of figures down below 100. This limit is based on the particular graphics card of the PC. For the best performance it seems that a limit of less than 100 figures contained in a single .mlapp file works well even on simple Intel Graphics as shown above. If more figures are needed, then a separate GUI can be created and data could be shared between the two as described in this article: https://www.mathworks.com/help/matlab/creating_guis/creating-multiwindow-apps-in-app-designer.html. Thanks to Chris and Andy and the MathWorks support team for helping out here!

Sign in to comment.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!