I want to plot a graph and *still run following code without closing the graph automatically like Matlab does*.
I try plt.show(block=False) , it failed and appear in a small moment then close itself. I also try plt.draw() or interactive mode , it failed, too. plt.draw() will block until I close it. interactive mode and plot.show() will appear nothing My version is below: user@ya:~/$ sudo pip freeze | grep matplotlib matplotlib==2.2.3 user@ya:~/$ sudo pip -V pip 18.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) Environments: I only execute script in Ubuntu ex: user@ya: python xxx.py Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS Release: 16.04 Codename: xenial Can anyone help me? I just want to do like Matlab which won't close the plotted graph even if the script finishes. -- https://mail.python.org/mailman/listinfo/python-list