title: Change grid line behavior in ggplot2
body: <p>Say I have the following data:</p>
  
  <pre><code>require(ggplot2)
  set.seed(123)
  data &lt;- data.frame(x = sample(1:20, 100, replace = TRUE))
  </code></pre>
  
  <p>I want to create a dot plot of <code>data$x</code>, so this is what I do:</p>
  
  <pre><code>ggplot(data, aes(x)) +
    geom_dotplot(binwidth = 1) +
    scale_x_continuous(breaks = seq(1, 20, 1)) +
    scale_y_continuous(breaks = NULL)
  </code></pre>
  
  <p>Which gives me this:</p>
  
  <p><img src="https://i.stack.imgur.com/xgVLO.png" alt="dotplot1"></p>
  
  <p>I would like to get rid of those vertical grid lines, so I add <code>theme(line = element_blank())</code> to my ggplot statement. The problem is that command also eliminates the tick marks, which I would like to keep. <strong>How can I hide the grid lines whilst keeping their respective ticks</strong>?</p>
  
  <p>I would also like to know how I can change the grid lines so they'll be drawn every <code>1:20</code>, not at every 0.5 mark.</p>
  
  <p>I've looked for those answers in <code>?title()</code> and <code>?geom_dotplot</code>, tried a couple of things, to no avail. Appreciate the help!</p>