title: Adding regression line via abline(lm(y~x)) in R produces odd result with -log10
body: <p>In my field of study, it is well-established that there is a linear relationship between two variables  -log10(x) and y.</p>
  
  <p>I made the following scatterplot in R, with the code:</p>
  
  <pre><code>plot(-log10(LDR2EUR$V5),LDR2EUR$V6,ylab="r2 to rs13169313", xlab="log10(association p-value)",col=ifelse(LDR2EUR$V6==1,'purple',LDR2EUR$V7), pch=20)
  </code></pre>
  
  <p>and I then attempted to add a regression line via:</p>
  
  <pre><code>abline(lm(LDR2EUR$V6~-log10(LDR2EUR$V5)))
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/8dqCn.png" alt="enter image description here"></p>
  
  <p>However, the line does not fit the data like a best fit line should.</p>
  
  <p>I am wondering if the poor line fit may have to do with the -log10? </p>
  
  <p>Since</p>
  
  <pre><code>cor(LDR2$V6,-log10(LDR2$V5))
  </code></pre>
  
  <p>returns 0.9776906 it seems to me that a horizontal line should not result, but rather a line similar to the line y=x.</p>
  
  <p>Any guidance would be much appreciated.</p>