title: Prevent figures from closing when running a script from the command line
body: <p>When I run my code from the shell command line, it opens the figure window and displays the plot but as soon as the code is completed it closes it. I do not have any close() statements.</p>
  
  <p>How can I prevent figures from closing when running a python script from the command line with ipython?</p>
  
  <p>I could add a statement at the end to quit only after pressing any key, but that feels too much like a hack.</p>