The code in plot.py is also made more easy to use for passing from one mode to the other (show or save figure).