title: Running a py file from cmd that contain matplotlib plot
body: <p>I am trying to run a python file (<code>test.py</code>) from command line in windows that contain a matplotlib plot. The file is running but the plot is only appearing for a fraction of second.</p>
  <p>Here is the content of <code>test.py</code>:</p>
  <pre><code>import matplotlib.pyplot as plt
  plt.plot(range(10))
  </code></pre>
  <p>I am using the following command in cmd:</p>
  <pre><code>ipython test.py --matplotlib
  </code></pre>
  <p>The output is</p>
  <pre><code>Using matplotlib backend: Qt4Agg
  </code></pre>
  <p>The problem is the plot only appears for a fraction of second.</p>