title: R - change X axis values to categories
body: <p>I am trying to draw a scatter dot plot for this data</p>
  
  <pre><code>head(data)
    Subject Length  Verdict
  1     2   4575  Partial
  2     2   5060  Partial
  3     2   8978 5'DEFECT
  4     2   7224  Partial
  5     2   7224  Partial
  6     7   8978 5'DEFECT
  </code></pre>
  
  <p>I get a scatter dot plot as such:</p>
  
  <p><a href="https://i.stack.imgur.com/zNnaS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zNnaS.png" alt="Scatter dot plot"></a></p>
  
  <p>I have patients 1,2,6,7,10 for example. R is taking the names of my subjects and using them as an x-value. I want to change that so the data points appear above each patient (not treated as a value, but rather as a category).</p>
  
  <p>Appreciate your help!</p>
  
  <p>Here's the code I wrote to get this scatter dot plot:</p>
  
  <pre><code>ggplot(final,
         aes(x=Subject,y=Length,colour=Verdict,shape=Verdict), group=Subject) +
    geom_point(position=position_jitter(width=0.1,height=0)) +
    scale_shape_manual(values=c(5,0,1,4,6)) +
    scale_colour_manual(values=c("blue","red","green","black","violet")) +
    scale_y_continuous(breaks=c(2000,4000,6000,8000,10000)) +
    labs(y="Amplicon Size in bps")
  </code></pre>