title: pandas: plot multiple columns of a timeseries with labels (example from pandas documentation)
body: <p>I'm trying to recreate the example of plot multiple columns of a timeseries with labels as shown in the pandas documentation here: <a href="http://pandas.pydata.org/pandas-docs/dev/visualization.html#visualization-basic" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/dev/visualization.html#visualization-basic</a>  (second graph)</p>
  
  <p><img src="https://i.stack.imgur.com/3Bn2i.png" alt="multiple columns of a timeseries with labels"></p>
  
  <p>Here's my code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  import pandas as pd
  
  ts = pd.DataFrame(np.random.randn(1000, 4), index=pd.date_range('1/1/2000', periods=1000), columns=list('ABCD'))
  ts = ts.cumsum()
  fig = plt.figure()
  
  print ts.head()
  ts.plot()
  fig.savefig("x.png")
  </code></pre>
  
  <p>the text output seems ok:</p>
  
  <pre><code>                   A         B         C         D
  2000-01-01  1.547838 -0.571000 -1.780852  0.559283
  2000-01-02  1.165659 -1.859979 -0.490980  0.796502
  2000-01-03  0.786416 -2.543543 -0.903669  1.117328
  2000-01-04  1.640174 -3.756809 -1.862188  0.466236
  2000-01-05  2.119575 -4.590741 -1.055563  1.004607
  </code></pre>
  
  <p>but x.png is always empty.</p>
  
  <p>If I plot just one column:</p>
  
  <pre><code>ts['A'].plot()
  </code></pre>
  
  <p>I do get a result.</p>
  
  <p>Is there a way to debug this, to find out what's going wrong here?</p>