Plotting Lists in Matplotlib
<p>I have to lists of that kind (series and pred_upd):</p>

<p><a href="http://i.stack.imgur.com/o5sES.png" rel="nofollow"><img src="http://i.stack.imgur.com/o5sES.png" alt="enter image description here"></a></p>

<p>I try to put them together on a plot doing that:</p>

<pre><code>az = series.plot(figsize=(12,8), label='o')
ax = pred_upd.plot(style='r--', label='Dynamic Prediction');
ax.legend();
az.legend();
plt.plot()
plt.show()
</code></pre>

<p>I receive error: </p>

<pre><code>-&gt; 2417         if isinstance(data, DataFrame):
   2418             if x is not None:
   2419                 if com.is_integer(x) and not data.columns.holds_integer():

TypeError: isinstance() arg 2 must be a type or tuple of types
</code></pre>

<p>What I do wrong?</p>

<p>If you are using <a href="http://matplotlib.org/users/pyplot_tutorial.html" rel="nofollow"><code>matplotlib</code></a>, I think you are using it incorrectly. I cannot really infer what <code>type</code> are the variables <code>series</code> and <code>pred_upd</code> are, but I am assuming they are of type <code>list</code> (from your example).</p>

<p>To use matplotlib:</p>

<pre><code>import matplotlib.pyplot as plt
plt.plot(series)
plt.hold(True)
plt.plot(pred_upd)
plt.show()
</code></pre>

<p>You can put some parameters in there - but that should be the format.</p>

python list matplotlib plot