title: Is there a good way to display sample size on grouped boxplots using Python Matplotlib
body: <p>I could get the size info using groupby and add text to the corresponding location. But I can't help thinking there's a better way as this really seems mundane, something many people would like to see...</p>
  
  <p>To illustrate, the following code would generate a grouped boxplot</p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame(rand(100, 1), columns=['value'])
  df.ix[:23, 'class']='A'
  df.ix[24:, 'class']='B'
  df.boxplot(column='value', by='class')
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/u0bZV.png" alt="boxplot">
  What I'd like is to show the sample size of each class A and B, namely 24 and 76 respectively. It could appear as legend or somewhere near the boxes, either is ok with me.</p>
  
  <p>Thanks!</p>