title: Days for major and hours for minor ticks
body: <p>I am very new to using r and to programming itself. My major is nutrition. However, I recently started to code in r for my research. I am having trouble in formatting the x-axis for a graph and have searched a lot of forums for answers. I am not sure if I used the right terms to get the answer. Any help or link to the answer is appreciated.</p>
  
  <p>My data consists of wheel counts that has been acquired every 5 minutes for a duration of two weeks. Accordingly, I am looking to label my X-axis to contain:</p>
  
  <ol>
  <li>dates as day 1, day 2, day 3, ........ day 4 as major labels.</li>
  <li>time as hours of day between two days as minor labels.
  This means that between two days, I need minor ticks representing the hours of the day.</li>
  <li>I want to add a background to the graph that where every 12 hours between days is represented by a white or a gray background. </li>
  </ol>
  
  <p>Right now, the following is the code I have used for the plot and looking for refining it based on the above needs:</p>
  
  <pre><code>p &lt;- ggplot(data=wheel_data, aes(x=date_time, y=rev_counts, group = group, color = group)) + 
       geom_smooth(method = "loess", span = 0.001) +
       scale_x_datetime(breaks = date_breaks("1 day"), label = date_format("%m-%d-%y"))
  </code></pre>