title: Fit a curve using matplotlib on loglog scale
body: <p>I am plotting simple 2D graph using loglog function in python as follows:</p>
  
  <pre><code>plt.loglog(x,y,label='X vs Y');
  </code></pre>
  
  <p>X and Y are both lists of floating numbers of <code>n</code> size.</p>
  
  <p>I want to fit a line on the same graph. I tried numpy.polyfit , but I am getting nowhere.</p>
  
  <p>How do you fit a line using polyfit if your graph is already in loglog scale?</p>