title: How to fit to a log scale
body: <p>I have the following points</p>
  
  <pre><code>0 4194304
  1 497420
  2 76230
  3 17220
  4 3595
  5 1697
  6 491
  7 184
  8 54
  9 15
  10 4
  11 4
  12 1
  13 1
  14 1
  15 1
  16 1
  17 1
  18 1
  19 1
  20 1
  21 1
  </code></pre>
  
  <p>If I plot them with a log scale on the y-axis they look roughly linear. How can I fit a straight line to this log scale so I can fit the data?</p>
  
  <p>My current code is very crude. For each x,y pair I do.</p>
  
  <pre><code>xcoords.append(x)
  ycoords.append(math.log(y))
  </code></pre>
  
  <p>And then at the end I do</p>
  
  <pre><code>plt.plot(xcoords,ycoords)
  plt.show()
  </code></pre>