Problem Saving UIFigures when running in parallel

4 次查看(过去 30 天)
Attempts to save UIFigure inside a parfor loop using getframe or exportgraphics dont seem to work. Returning the error that these functions cant be used in nodisplay mode. I rely on a 3rd party function ft_topoplot_er to plot certain topographs on my UIFigure and save the resulting video, but these calls take some time done sequentially, so I wished to parallelise them using parfor yet I'm unable to do so.

回答(1 个)

Umang Pandey
Umang Pandey 2024-8-19
Hi Eli,
You can try using "exportapp" that exports the contents of the figure specified by fig and stores it in the file specified by filename. All graphical content is captured, including UI components.
You can use it in the following manner:
exportapp(fig,filename)
Kindly refer to the following documentation for more information:
Best,
Umang

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by