Trying to plot a random series on a chart with matplotlib, but the chart will not display when the programe is ran.
<p>The following code will run with no errors, but the chart that I am trying to display will not pop up. I see the screen blink when I run the program like the chart is going to load but that is it, just a quick flash of the screen. Then my command line reads "press any key to continue" which is normal when my programs are finished running, but there is no chart???</p>

<pre><code>import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np

seedval = 111111

np.random.seed(seedval)
s= pd.Series(np.random.randn(1096),index=pd.date_range('2012-01-01','2014-12-31'))

walk_ts = s.cumsum()

walk_ts.plot()
</code></pre>

<p>This is the output </p>

<pre><code>Press any key to continue . . .
</code></pre>

<p>It's not clear if you're doing this in a script, interactive python session or ipython. In the first case you need to call <code>plt.show()</code> at the end to show any figures. That's what you can do in a regular interactive python session as well. In ipython you're better off using <code>%matplotlib inline</code> to set everything up for you. </p>

python pandas matplotlib dataframe charts