title: Pandas - Bar and Line Chart - Datetime axis
body: <p>I am trying to plot a bar chart and a line overlay, where my data has datetime as an index.
  This is the code:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  dates = pd.date_range('2019-01-01', '2019-01-31', freq='B')
  df = pd.DataFrame(index=dates, 
                columns=['a', 'b', 'c'],
                data = np.random.randn(len(dates), 3))
  
  fig, ax = plt.subplots()
  df.plot.bar(ax=ax)
  df.sum(axis=1).plot(ax=ax)
  </code></pre>
  
  <p>Unfortunately, it only ends up showing the last chart requested.
  <a href="https://i.stack.imgur.com/KwoYy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KwoYy.png" alt="enter image description here"></a></p>
  
  <p>I'm using</p>
  
  <pre><code>python 3.6.8
  pandas 0.24.0
  matplotlib 3.0.2
  </code></pre>
  
  <p>Regards