title: creating stacked histogram with pandas dataframes data python
body: <p>I am trying to create a stacked histogram with data from 2 or more  uneven pandas dataframes? So far I can get them to graph on top of each other but not stack.</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  
  df = pd.read_csv('dert.csv', encoding = "ISO-8859-1", index_col=0)
  
  df1['text'] = df['text'].dropna(subset=['five'])
  df2['printed'] = df['text2']
  ax = df1['text'].hist( bins=100, range=(1,100), stacked=True, color = 'r')
  ax = df2['printed'].hist(bins=100, range=(1,100), stacked=True, color = 'g')
  
  plt.setp(ax.get_xticklabels(),  rotation=45)
  plt.show()
  </code></pre>
  
  <p>How do I get them to stack?</p>
  
  <p>I found a solution but it does not use pandas dataframes <a href="https://stackoverflow.com/questions/18449602/matplotlib-creating-stacked-histogram-from-three-unequal-length-arrays">Matplotlib, creating stacked histogram from three unequal length arrays</a></p>