I have what I think is a basic question. I want to have an interactive python script/code which uses matplotlib. For example, the script first asks what data set to use, then when received, it does some analysis routines, and then makes some plots. To launch the plot, my I have in my routine
> #!/usr/bin/python (I am not running in interactive mode, rather I made an executable script)
> import matplotlib.pyplot as plt
some analysis stuff
after the plt.show() command, the terminal I run the script from becomes unresponsive until I close plot I made. However, I would like instead to be able to continue interacting with the program. For example, choosing a fitting window based upon the first plot. But I don't want to have to close down the plot to do this. So my question(s):
1 - how do I continue to interact with the terminal (and my program asking for more imput) after the plt.show() command has been issued?
2 - is there an alternative command I can use instead of plt.show() which does not lock up the terminal?
3 - is it possible to launch more than one matplotlib plotting window with the same interactive python session (executable python script)?
I thought perhaps the answer to my question would be to have a sub-script executed by my main one which generates the various plots I want, where each successive plot requires user input after viewing the previous ones.
Any thoughts/advice are appreciated.