title: Fitting half a Gaussian curve/ normalization to Data points
body: <p>So I have two lists of data, which I can plot in a scatter plot, as such:</p>
  
  <pre><code>from matplotlib import pyplot as plt
  x = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
  y = [22.4155688819,22.3936180362,22.3177538001,22.1924849792,21.7721194577,21.1590235248,20.6670446864,20.4996957642,20.4260953411,20.3595072628,20.3926201626,20.6023149681,21.1694961343,22.1077417713,23.8270366414,26.5355924353,31.3179807276,42.7871637946,61.9639549412,84.7710953311]
  
  plt.scatter(degrees,RMS_one_image)
  </code></pre>
  
  <p>This gives you a plot that looks like a Gaussian distribution, which is good as it should- <a href="https://i.stack.imgur.com/Qg5s7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qg5s7.png" alt="Data to plot"></a></p>
  
  <p>My issue is however I am trying to fit a Gaussian distribution to this, and failing miserably because a. it's only half a Gaussian instead of a full one, and b. what I've used before has only ever used one bunch of numbers.  So something like:</p>
  
  <pre><code># best fit of data
  num_bins = 20
  (mu, sigma) = norm.fit(sixteen)
  
  y = mlab.normpdf(num_bins, mu, sigma)
  
  n, bins, patches = plt.hist(deg_array, num_bins, normed=1, facecolor='blue', alpha=0.5)
  # add a 'best fit' line
  y = mlab.normpdf(bins, mu, sigma)
  plt.plot(bins, y, 'r--')
  </code></pre>
  
  <p>Does this approach work at all here, or am I going about this in the wrong way completely?  Thanks...</p>