title: Line up columns of bar graph with points of line plot with ggplot
body: <p>Is there any way to line up the points of a line plot with the bars of a bar graph using ggplot when they have the same x-axis? Here is the sample data I'm trying to do it with.</p>
  
  <pre><code>library(ggplot2)
  library(gridExtra)
  
  data=data.frame(x=rep(1:27, each=5), y = rep(1:5, times = 27))
  yes &lt;- ggplot(data, aes(x = x, y = y))
  yes &lt;- yes + geom_point() + geom_line()
  
  other_data = data.frame(x = 1:27, y = 50:76  )
  
  no &lt;- ggplot(other_data, aes(x=x, y=y))
  no &lt;- no + geom_bar(stat = "identity")
  
  grid.arrange(no, yes)
  </code></pre>
  
  <p>Here is the output:</p>
  
  <p><img src="https://i.stack.imgur.com/TVi8Y.png" alt="enter image description here"></p>
  
  <p>The first point of the line plot is to the left of the first bar, and the last point of the line plot is to the right of the last bar. </p>
  
  <p>Thank you for your time. </p>