<> = Python = == matplotlib: no window == === The problem === No window is opened when a script is run from a command line. Running the script in an interactive IDE is fine. === What happens === The module `matplotlib` closes all windows when unloaded. This happens immediately after the script terminates if it is run from a command line. When run inside a IDE, then the module stays loaded, keeping windows opened. === How to fix === A quick solution is wait for an input from a user at the end of the script. The following code, when added at the end of the script, opens an extra window asking to press any key: {{{#!highlight python ctrlWindow = matplotlib.pyplot.figure(figsize=(5, 1.5)) ctrlWindow.text(0.5, 0.5, "Press any key to close\nwhile this window is active.", ha="center", va="center", size=16) ctrlWindow.show() while not mathplotlib.pyplot.waitforbuttonpress(): pass }}} The function `waitforbuttonpress()` waits for a mouse click or a key being pressed and returns respectively `False` or `True`. The loop makes it sure that the program exists only in the second situation, so that you can interact with the windows using your mouse. '''Note:''' the program stops only when a key is pressed while the extra window is active. This allows to interact with other windows without limitation.