title: Multiple histograms in Pandas
body: <p>I would like to create the following histogram (see image below) taken from the book "Think Stats". However, I cannot get them on the same plot. Each DataFrame takes its own subplot.  </p>
  
  <p>I have the following code: </p>
  
  <pre><code>import nsfg
  import matplotlib.pyplot as plt
  df = nsfg.ReadFemPreg()
  preg = nsfg.ReadFemPreg()
  live = preg[preg.outcome == 1]
  
  first = live[live.birthord == 1]
  others = live[live.birthord != 1]
  
  #fig = plt.figure()
  #ax1 = fig.add_subplot(111)
  
  first.hist(column = 'prglngth', bins = 40, color = 'teal', \
             alpha = 0.5)
  others.hist(column = 'prglngth', bins = 40, color = 'blue', \
              alpha = 0.5)
  plt.show()
  </code></pre>
  
  <p>The above code does not work when I use ax = ax1 as suggested in: <a href="https://stackoverflow.com/questions/20080186/pandas-multiple-plots-not-working-as-hists?rq=1">pandas multiple plots not working as hists</a> nor this example does what I need: <a href="https://stackoverflow.com/questions/19280336/overlaying-multiple-histograms-using-pandas">Overlaying multiple histograms using pandas</a>. When I use the code as it is, it creates two windows with histograms. Any ideas how to combine them?  </p>
  
  <p>Here's an example of how I'd like the final figure to look:
  <img src="https://i.stack.imgur.com/040w3.jpg" alt="enter image description here"></p>