title: Why isn't the coefficient for the linear model showing up the same on the plot? in R
body: <p>I am stumped by R. And this might not be the best forum for this type of question, so apologies if I should post this elsewhere.</p>
  
  <p>I have a linear regression through some data that looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/FxrJ0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FxrJ0.jpg" alt="enter image description here"></a></p>
  
  <p>But when I call on the coefficients of the linear model, it reads: </p>
  
  <pre><code>&gt; fit$coefficients
  (Intercept)   data$logA 
  3.1370219   0.1718147 
  </code></pre>
  
  <p>And obviously the y-intercept is more like 2 and not 3. How can this be?!</p>
  
  <p>Here's my code:</p>
  
  <pre><code>data &lt;- read.csv("Diamond1976_Table1.csv",header=T,sep=",") # read the csv file 
  # Make the first species-area curve
  Area &lt;- data$A_mi2
  Slow &lt;- data$S_low
  plot(Area, Slow, xlab = "Area (mi^2)",
       ylab = "Species Richness",
       pch = 15, cex = 1, col = "skyblue")
  
  # Take the logarithm of the data
  data$logS_low = log(data$S_low)
  data$logS_mt = log(data$S_mt)
  data$logA = log(data$A_mi2)
  
  # Log plot
  plot(data$logA, data$logS_low, xlab = "Log area",
       ylab = "Log species richness", main = "Log-log plot Diamond (1976)",
       pch = 15, cex = 1, col = "skyblue")
  fit &lt;- lm(data$logS_low ~ data$logA) # tilda is "explained by"
  abline(fit)
  summary(fit)
  fit$coefficients
  </code></pre>
  
  <p>Can anyone find an obvious mistake? I can post the data if that's helpful but I feel like someone can explain why this is happening without the data. </p>