title: Pandas Plots: Separate color for weekends, pretty printing times on x axis
body: <p>I created a plot which looks like<img src="https://i.stack.imgur.com/DsL53.png" alt="enter image description here"></p>
  
  <p>I have a few issues:</p>
  
  <ol>
  <li>How can i specifically show the weekends. Some ways i had thought were to grab the indices corresponding to weekends and then draw transparent bars between xlims. Also rectangle could be drawn for the same. It would be best if it could be done plainly in Pandas.</li>
  <li>The date formatting is not the most pretty</li>
  </ol>
  
  <p>Following is the code used to generate this plot</p>
  
  <pre><code>ax4=df4.plot(kind='bar',stacked=True,title='Mains 1 Breakdown');
  ax4.set_ylabel('Power (W)');
  idx_weekend=df4.index[df4.index.dayofweek&gt;=5]
  ax.bar(idx_weekend.to_datetime(),[1800 for x in range(10)])
  </code></pre>
  
  <p>The <code>ax.bar</code> is specifically for highlighting weekends, but it does not produce any visible output. (Problem 1)
  For Problem 2 i tried to use Major Formatter and Locators, the code is as follows:</p>
  
  <pre><code>ax4=df4.plot(kind='bar',stacked=True,title='Mains 1 Breakdown');
  ax4.set_ylabel('Power (W)');
  formatter=matplotlib.dates.DateFormatter('%d-%b');
  locator=matplotlib.dates.DayLocator(interval=1);
  ax4.xaxis.set_major_formatter(formatter);
  ax4.xaxis.set_major_locator(locator);
  </code></pre>
  
  <p>The output produced is as follows:
  <img src="https://i.stack.imgur.com/ISxC6.png" alt="enter image description here"></p>
  
  <p>It may be helpful to know what the Dataframe looks like</p>
  
  <pre><code>In [122]:df4
  
  Out[122]:
  &lt;class 'pandas.core.frame.DataFrame'&gt;
  DatetimeIndex: 36 entries, 2011-04-19 00:00:00 to 2011-05-24 00:00:00
  Data columns:
  (0 to 6 AM) Dawn          19  non-null values
  (12 to 6 PM) Dusk         19  non-null values
  (6 to 12 Noon) Morning    19  non-null values
  (6PM to 12 Noon) Night    20  non-null values
  dtypes: float64(4)
  </code></pre>