Maximum Number of UIAxes in App Designer 2017b

4 visualizaciones (últimos 30 días)
Chas Frick
Chas Frick el 4 de Dic. de 2018
Comentada: Chas Frick el 18 de Dic. de 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 comentarios
Chris Portal
Chris Portal el 6 de Dic. de 2018
What kind of graphics card does your machine have? (Some cards have an inherent limit on the nuber of graphics contexts that can be created.) You can query this by:
>> opengl info
Chas Frick
Chas Frick el 6 de Dic. de 2018
Hi Chris,
Thank you for the suggestion. I have attached the output here:
opengl_info.png

Iniciar sesión para comentar.

Respuestas (1)

Andy
Andy el 6 de Dic. de 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 comentarios
Chas Frick
Chas Frick el 10 de Dic. de 2018
Hi Andy!
Thank you for the suggestions here. I ran the snippet of code above in MATLAB and was easily able to draw 30 figures. I was even able to draw around 96 of 100 figures using the same loop including a plot command for each figure. It seems that there is a limit to the number of figures I can draw between 100 and 160 because MATLAB runs out of graphics memory around 160 figures and starts throwing GC limit exceptions. I'll contact support and see if I can work through something with them. Thank you again for your help and suggestions with this issue!
Chas Frick
Chas Frick el 18 de Dic. de 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!

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by