title: How to add legends and title to grouped histograms generated by Pandas
body: <p>I am trying to plot a histogram of multiple attributes grouped by another attributes, all of them in a dataframe.</p>
  
  <p>with the help of this <a href="https://stackoverflow.com/questions/19614400/add-title-to-collection-of-pandas-hist-plots">question</a>, I am able to set title for the plot. Is there an easy way to switch on legend for each subplot.</p>
  
  <p>Here is my code</p>
  
  <pre><code>import numpy as np
  from numpy.random import randn,randint
  import pandas as pd
  from pandas import DataFrame
  import pylab as pl
  
  x=DataFrame(randn(100).reshape(20,5),columns=list('abcde'))
  x['new']=pd.Series(randint(0,3,10))
  x.hist(by='new')
  pl.suptitle('hist by new')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/KuqQc.png" alt="enter image description here"></p>