title: Why is this regression plot only plotting 2 of the 4 regression coefficients?
body: <p>I have the following set of data: <a href="https://archive.ics.uci.edu/ml/datasets/abalone" rel="nofollow noreferrer">https://archive.ics.uci.edu/ml/datasets/abalone</a></p>
  
  <p>I am trying to plot a regression for the whole weight against the diameter. </p>
  
  <p>A scatter plot of the data is clearly not a linear function. (I am unable to attach it for some reason.)</p>
  
  <p>Consider a quadratic regression model. I set it up like so:</p>
  
  <pre><code>abalone &lt;- read.csv("abalone.data")
  diameter &lt;- abalone$Diameter
  diameter2 &lt;- diameter^2
  whole &lt;- abalone$Whole.weight
  
  quadraticModel &lt;- lm( whole ~ diameter + diameter2)
  </code></pre>
  
  <p>This is fine and gives me the following when calling quadraticModel:</p>
  
  <pre><code>Call:
  lm(formula = whole ~ diameter + diameter2)
  
  Coefficients:
  (Intercept)     diameter    diameter2  
       0.3477      -3.3555      10.4968  
  </code></pre>
  
  <p>However, when I plot:</p>
  
  <pre><code>abline(quadraticModel)
  </code></pre>
  
  <p>I get the following warning:</p>
  
  <pre><code>Warning message:
  In abline(quadraticModel) :
    only using the first two of 3 regression coefficients
  </code></pre>
  
  <p>which means that I am getting a straight line plot which isn't what I am aiming for. Can someone please explain to me why this is happening and possible ways around it? I am also having the same issue with cubic plots etc. (They always just plot the first two coefficients.)</p>