title: How to take the ln of a function in python?
body: <p>I used polyfit to find a fitline of a data set, but now I need to find the natural log of that fitline function and plot it. Here's what I have so far:</p>
  
  <pre><code>#Fit line for PD
  deg = 10
  zn = np.polyfit(l_bins, l_hits, deg)
  l_pn = np.poly1d(zn)
  pylab.plot(l_bins, l_pn(l_bins), '-g')
  ln_list = []
  for all in l_bins:
      ln_list.append(np.log(l_pn(all)))
  pylab.plot(l_bins, ln_list, '-b')
  </code></pre>
  
  <p>Is there a better or more correct way to do this?</p>