title: Fit a curve to a histogram in Python
body: <p>I am trying to make to fit a curve to the values in a matplotlib generated histogram:</p>
  
  <pre><code>n, bins, patches = plt.hist(myData)
  </code></pre>
  
  <p>Where "plt" stands for matplotlib.pyplot and myData is an array with number of occurrences every index like [9,3,3,....] </p>
  
  <p>I want bins to be my x-data and n to be my y-data. That is, I want to extract info about how often number x occors vs. number x.  However, I cannot get bins and n to be of the same size. </p>
  
  <p><strong>So basically, I would like to be able to fit a curve to n(bins, params).</strong></p>
  
  <p>How would one do this?</p>