title: How to plot monthly sales data correctly?
body: <p>I'm trying to plot the monthly sales data with RStudio, but the dates on the x-axis are not showing correctly.</p>
  
  <p>My code :- </p>
  
  <pre><code>uc_ts_plot &lt;- ggplot(monthly_sales, aes(DATE,DAUTONSA)) + geom_line(na.rm=TRUE) + 
    xlab("Month") + ylab("Auto Sales in Thousands") + 
    scale_x_date(labels = date_format(format= "%b-%Y"),
                 breaks = date_breaks("1 year")) + 
    stat_smooth(colour = "green")
  
  uc_ts_plot
  </code></pre>
  
  <p>I expect the dates on the x-axis to be displayed as Jan-2011, Jan-2012, as shown <a href="https://rstudio-pubs-static.s3.amazonaws.com/343096_90b218e393454f79a5012e7ad0913e76.html" rel="nofollow noreferrer">here</a>.</p>
  
  <p>All I'm getting is a 0001-01 at the left end and a 0002-01 at the right end of the x-axis.</p>