title: Uniform plot points in R -- Research / HW
body: <p><strong>This is for research I am doing for my Masters Program in Public Health</strong></p>
  
  <p>I am graphing data against each other, a standard x,y type deal, over top of that I am plotting a predicted line. I get what I think to be the most funky looking point/boxplot looking thing ever with an x axis that is half filled out and I don't understand why as I do not call a boxplot function. When I call the plot function it is my understanding that only the points will plot.</p>
  
  <p>The data I am plotting looks like this</p>
  
  <pre><code>TOTAL.LACE | DAYS.TO.FAILURE
  9          | 15
  16         | 7
  ...        | ...
  </code></pre>
  
  <p>The range of the TOTAL.LACE is from 0 to 19 and DAYS.TO.FAILURE is 0 - 30</p>
  
  <p>My code is as follows, maybe it is something before the plot but I don't think it is:</p>
  
  <pre><code># To control the type of symbol we use we will use psymbol, it takes
  # value 1 and 2
  psymbol &lt;- unique(FAILURE + 1)
  
  # Build a test frame that will predict values of the lace score due to
  # a patient being in a state of failure
  test &lt;- survreg(Surv(time = DAYS.TO.FAILURE, event = FAILURE) ~ TOTAL.LACE,
                  dist = "logistic")
  
  pred &lt;- predict(test, type="response") &lt;-- produces numbers from about 14 to 23
  summary(pred) 
  
  ord &lt;- order(TOTAL.LACE)
  tl_ord &lt;- TOTAL.LACE[ord]
  pred_ord &lt;- pred[ord]
  plot(TOTAL.LACE, DAYS.TO.FAILURE, pch=unique(psymbol)) &lt;-- Produces goofy graph
  lines(tl_ord, pred_ord) &lt;-- this produces the line not boxplots
  </code></pre>
  
  <p>Here is the resulting picture
  <img src="https://i.stack.imgur.com/WSrWa.jpg" alt="Goofy looking plot in R"></p>
  
  <p>Not to sure how to proceed from here, this is an off shoot of another problem I had with the same data set <a href="https://stackoverflow.com/questions/19433249/pch-in-plot-with-r">at this link here</a> I am not understanding why boxplots are being drawn, the reason being is I did not specifically call the <code>boxplot()</code> command so I don't know why they appeared along with point plots. When I issue the following command: <code>plot(DAYS.TO.FAILURE, TOTAL.LACE)</code> I only get points on the resulting plot like I expected, but when I change the order of what is plotted on <code>x</code> and <code>y</code> the boxplots show up, which to me is unexpected.</p>
  
  <p>Here is a link to sample data that will hopefully help in reproducing the problem as pointed out by @Dwin et all <a href="https://app.box.com/s/zfxjbipbdgvuk0795i7s" rel="nofollow noreferrer">Some Sample Data</a></p>
  
  <p>Thank you,</p>