title: Matplotlib/seaborn histogram using different colors for grouped bins
body: <p>I have this code, using a pandas df:</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import seaborn as sns
  import os
  
  
  path_to = 'Data\\2017-04\\MonthlyData\q1analysis\Energy Usage'  # where to save
  
  df = pd.read_csv('April2017NEW.csv', index_col =1)
  
  
  df1 = df.loc['Output Energy, (Wh/h)']  # choose index value and Average
  df1['Average'] = df1.mean(axis=1)
  print df1
  print df1['Average'].describe()
  
  def hist():
      p = sns.distplot(df1['Average'],kde=False, bins=25).set(xlim=(0, 100));
      plt.xlabel('Watt hours')
      plt.ylabel('Households')
  
      return plt.show()
  </code></pre>
  
  <p>which returns:</p>
  
  <p><a href="https://i.stack.imgur.com/8o8I8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8o8I8.png" alt="enter image description here"></a></p>
  
  <p>I would like to use three different colors (low, medium, high) to represent higher values on the x =axis with a legend, like this:</p>
  
  <p><a href="https://i.stack.imgur.com/thuZE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/thuZE.png" alt="enter image description here"></a></p>
  
  <p>EDIT1:</p>
  
  <p>I found this example: <a href="https://stackoverflow.com/questions/25396786/how-to-pick-unique-colors-of-histogram-bars-in-matplotlib">here</a>, so I am trying to use this.</p>
  
  <p>I've come up with this:
  <a href="https://i.stack.imgur.com/yg1mD.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yg1mD.png" alt="enter image description here"></a>
  Which is almost there. How does one split the range into 3, with 3 different colors?</p>