Main Content

myDeployedModule.wait_for_figures_to_close

Python module to wait for all graphical figures to close before continuing

Description

myDeployedModule.wait_for_figures_to_close() enables the deployed application to process graphics events. The purpose of myDeployedModule.wait_for_figures_to_close() is to block execution of a calling program as long as figures created in deployed MATLAB® code are displayed.

This function can only be called after initialize() has been called and before terminate() has been called. If this function is not called, any figure windows initially displayed by the application briefly appear, and then the application exits.

Examples

collapse all

This example shows how to keep a MATLAB plot open after it is invoked using the showplot function in a package named myDeployedModule.

import myDeployedModule

myobj = myDeployedModule.initialize()

myobj.showplot()

myobj.wait_for_figures_to_close()

myobj.terminate()