title: Scale histograms by a certain factor?
body: <p>I'm trying to represent three different data sets on the same histogram but one is 100 data points, one is 362 and one is 289. I'd like to scale the latter two by factors of 3.62 and 2.89 respectively so they don't overshadow the 100 point one. I feel like this should be easy but I'm not sure where to put my division. I feel like I've tried all the spots you can try. Here's how it is now:</p>
  <pre><code>plt.figure(figsize=(10,6))
  scale_pc = (1 / 3.62)  #this is the math I'd like to use, but where to put it?
  scale_ar = (1 / 2.89)  #this is the math I'd like to use, but where to put it?
  
  alldf2[alldf2['playlist']==1]['danceability'].hist(bins=35, color='orange', label='PopConnoisseur', alpha=0.6)
  alldf2[alldf2['playlist']==2]['danceability'].hist(bins=35, color='green',label='Ambient',alpha=0.6)
  alldf2[alldf2['playlist']==0]['danceability'].hist(bins=35, color='blue',label='Billboard',alpha=0.6)
  
  plt.legend()
  plt.xlabel('Danceability')
  </code></pre>
  <p>I've tried variations on this but none work:</p>
  <pre><code>alldf2[alldf2['playlist']==1]['danceability'].hist(bins=35, color='orange', label='PopConnoisseur', alpha=0.6)
  alldf2[alldf2['playlist']==2]['danceability'/ 3.62].hist(bins=35, color='green',label='Ambient',alpha=0.6)
  alldf2[alldf2['playlist']==0]['danceability'/ 2.89].hist(bins=35, color='blue',label='Billboard',alpha=0.6)
  </code></pre>
  <p>Any thoughts?</p>
  <p>Edit: Here's the plot as it currently is:
  <a href="https://i.stack.imgur.com/17ikg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/17ikg.png" alt="Danceability values per playlist" /></a></p>