title: scale_x_date remove extra month on axis (ggplot2 2.2.0.9)
body: <p>I am using a line chart with a time scale and the last point is December 30th. However, with scale_x_date, January shows up on the scale even though there is data point for that month.</p>
  
  <p>the scale should really stop at the last month but I believe this is because of the day. Is there a way to have the scale stick to the actual months in the data?</p>
  
  <p>I am using this to format the scale:</p>
  
  <pre><code>#with lubridate
  data$month &lt;- ymd(data$month)
  
  #in the plot
  scale_x_date(date_breaks = "1 month", date_labels ="%b %y")
  </code></pre>
  
  <p>Reproducible example:</p>
  
  <pre><code>library(lubridate)
  library(ggplot2)
  
  cities &lt;- c("city1")
  month &lt;- c("2016-08-01", "2016-09-30", "2016-10-30", "2016-11-30", "2016-12-30")
  num &lt;- c(23287, 23889, 25026, 26116, 29758)
  
  data &lt;- data.frame(cities, month, num)
  data$month &lt;- ymd(data$month)
  
  gg &lt;- ggplot(data, aes(month, num, group = 1)
  gg &lt;- gg + geom_line(position = "identity", color="#6baed6")
  gg &lt;- gg + scale_y_continuous(expand = (c(0.1,0)))
  gg &lt;- gg + scale_x_date(expand = c(0, 0), date_labels ="%b %y")
  gg &lt;- gg + labs(x = NULL, y = NULL)
  gg &lt;- gg + theme(strip.background=element_blank())
  gg &lt;- gg + theme_bw()
  gg &lt;- gg + theme(panel.border = element_blank())
  gg &lt;- gg + theme(panel.grid.major = element_blank())
  gg &lt;- gg + theme(panel.grid.minor = element_blank())
  gg &lt;- gg + theme(axis.ticks=element_blank())
  gg &lt;- gg + theme(axis.text.x=element_text(size=12))
  gg &lt;- gg + theme(axis.text.y=element_text(size=12))
  gg
  </code></pre>
  
  <p>In, this example, without expand(), January is added even though there is no data point in January.</p>
  
  <p>There is one data point per month and my goal is to display the data by month. I could convert to factor but this is not ideal. I understand the data has a day but surely there must be a way to do this.</p>