title: Plotting vertical and horizontal lines at 0 using R's different graphing systems
body: <p>I've checked for an answer to my problem, and the closest I could find was here: <a href="https://stackoverflow.com/questions/30699560/why-does-plot-behave-differently-for-same-but-scaled-data">Why does plot behave differently for same but scaled data?</a>. I understand atomic objects and already convert to a data frame.</p>
  
  <p>I've loaded some chemical Reaction data:</p>
  
  <pre class="lang-r prettyprint-override"><code>   library(car)
  
      theURL &lt;- "http://lib.stat.cmu.edu/datasets/Andrews/T30.1"
      theNames &lt;- c("Table", "Number", "Row", "Experiment", "Temperature", 
      "Concentration", "Time", "Unchanged", "Converted", "Unwanted")
      Reaction &lt;- read.table(theURL, header = F , col.names = theNames)
      Reaction &lt;- Reaction[-c(1:4)]
  </code></pre>
  
  <p>I then draw a scatterplot; solid lines through the mean of X and the mean of Y; dotted lines at means ± 2SDs. Also a segment of slope Sy/Sx drawn at ± 5SDs because I couldn't get <code>abline()</code> to draw it.</p>
  
  <pre class="lang-r prettyprint-override"><code>    scatterplot(Reaction$Temperature, Reaction$Converted, smooth = FALSE, 
      regLine = FALSE, grid = FALSE, xlim = c(150, 185), xlab = "Temperature", ylab = "% Converted", main = "Reaction Results", ylim = c(45, 70))
      TempMean = mean(Reaction$Temperature)
      ConvMean = mean(Reaction$Converted)
      TempSD = sd(Reaction$Temperature)
      ConvSD = sd(Reaction$Converted)
      abline(col = c("red", "green"), v = TempMean, h = ConvMean)
      abline(col = "green", lty = "dotted", v = (c(TempMean - 2*TempSD, TempMean + 2*TempSD)))
      abline(col = "red", lty = 3, h = (c(ConvMean - 2*ConvSD, ConvMean + 2*ConvSD)))
      segments(TempMean - 5*TempSD, ConvMean - 5*ConvSD, TempMean + 5*TempSD, ConvMean + 5*ConvSD)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/JMqHZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JMqHZ.png" alt="Bonferroni(?) Limits for bivariate data"></a></p>
  
  <p>...and now the big reveal. If I scale everything, the scatterplot essentially does the same thing.</p>
  
  <pre class="lang-r prettyprint-override"><code>    # Scale Reaction Data
      Reaction.scaled &lt;- as.data.frame(scale(Reaction))
      # Mean and sd Lines
       scatterplot(Reaction.scaled$Temperature, Reaction.scaled$Converted, smooth = FALSE, regLine = FALSE, grid = FALSE, xlab = "Temperature", ylab = "% Converted", main = "Reaction Results")
      TempMean = mean(Reaction.scaled$Temperature)
      ConvMean = mean(Reaction.scaled$Converted)
      TempSD = sd(Reaction.scaled$Temperature)
      ConvSD = sd(Reaction.scaled$Converted)
      abline(col = c("red", "green"), v = TempMean, h = ConvMean)
      abline(col = "green", lty = "dotted", v = (c(TempMean - 2*TempSD, TempMean + 2*TempSD)))
      abline(col = "red", lty = 3, h = (c(ConvMean - 2*ConvSD, ConvMean + 2*ConvSD)))
      segments(TempMean - 5*TempSD, ConvMean - 5*ConvSD, TempMean + 5*TempSD, ConvMean + 5*ConvSD)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/r5zvt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r5zvt.png" alt="Scaled Plot"></a></p>
  
  <p>...but the drawing doesn't show the scaled mean at (0,0). I suspect this is something to do with high-level vs low-level graphics functions.</p>