I am trying to run a python file (test.py) 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.
Here is the content of test.py:
import matplotlib.pyplot as plt
plt.plot(range(10))
I am using the following command in cmd:
ipython test.py --matplotlib
The output is
Using matplotlib backend: Qt4Agg
The problem is the plot only appears for a fraction of second.