title: Fit y=ax in Python
body: <p>I wanna fit this as y=ax. However, the code doesn't work. Can anyone could help me?</p>
  
  <pre><code>def func():
      return a * x
  
  F1 = [0.55, 0.45, 0.50, 0.65, 0.75, 0.80]
  r1 = [18.2, 18.4, 18.8, 19.5, 20.0, 20.2]
  
  plt.plot(F1, r1)
  popt = curve_fit(func, r1, F)  # I supose it only returns one value
  plt.plot(r1, popt * r1, 'g--')
  </code></pre>
  
  <p>The error is: </p>
  
  <pre><code>ValueError: Unable to determine number of fit parameters.
  </code></pre>