title: Fit a logarithmic curve to data points and extrapolate out in numpy
body: <p>I have a set of data points (x and y in the code). I would like to plot these points, and fit a curve to them that shows what value of x would be required to make y = 100.0 (y values are percentages). Here is what I have tried, but my curve is a polynomial of degree 3 (which I know is wrong). To me, the data looks logarithmic, but I do now know how to polyfit a logarithmic curve to my data.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  x = np.array([4,8,15,29,58,116,231,462,924,1848])
  y = np.array([1.05,2.11,3.95,7.37,13.88,25.46,43.03,64.28,81.97,87.43])
  
  for x1, y1 in zip(x,y):
      plt.plot(x1, y1, 'ro')
  
  z = np.polyfit(x, y, 3)
  f = np.poly1d(z)
  
  for x1 in np.linspace(0, 1848, 110):
      plt.plot(x1, f(x1), 'b+')
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UHHUd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UHHUd.png" alt="This is what I get so far"></a></p>