title: How to adjust x-axis in ggplot?
body: <p>I have a plot of depth of fish individuals over time. The background represents the temperature, the grey dots is the raw depth data, and the black line is the geom_smooth line of raw data (image of plot is attached here). I used ggplot to make the graphs, but my x-axis (= date/time) is slightly moved to the right. I need the axis to be adjusted in the middle (standardized). This is my very long code for the plot:</p>
  <pre><code>tibble(y=c(-7:0)) %&gt;% 
    expand_grid(TBRtemperature %&gt;% select(`Date and Time (UTC)`, Temperature)) %&gt;% 
    rename(dt=&quot;Date and Time (UTC)&quot;) %&gt;% 
    filter(yday(dt)&gt;136&amp;yday(dt)&lt;147) %&gt;% 
    mutate(dt=with_tz(dt, &quot;Europe/Oslo&quot;)) %&gt;% 
    ggplot(aes(dt, y, fill=Temperature)) + 
    geom_tile() +
    scale_fill_gradientn(colours = c(&quot;lightblue&quot;, &quot;white&quot;, &quot;red&quot;)) +
    scale_x_datetime(expand = c(0,0)) +
    scale_y_continuous(expand = c(0,0)) +
    geom_point(data=fbd_TBR %&gt;% filter(yday(dt)&gt;136&amp;yday(dt)&lt;147, n()&gt;100), aes(dt, -Data/10, group=paste0(ID, Trial)), colour=&quot;grey50&quot;, alpha=0.2) +
    geom_smooth(data=fbd_TBR %&gt;% filter(yday(dt)&gt;136&amp;yday(dt)&lt;147, n()&gt;100), aes(dt, -Data/10, group=paste0(ID, Trial), colour=paste0(ID, sep=&quot; - &quot;, Weight)), colour=&quot;black&quot;) +
    labs(y=&quot;Depth (m)&quot;, x=(&quot;Time (days)&quot;), title = &quot;Trial 2&quot;) +
    facet_wrap(~paste(ID, sep = &quot; - &quot;, Weight)) + 
    theme_classic() +
    theme(plot.title = element_text(face=&quot;bold&quot;), strip.text = element_text(face = &quot;bold&quot;))
  </code></pre>
  <p>Anyone who knows how the axis can be adjusted?</p>
  <p><a href="https://i.stack.imgur.com/tDq4o.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tDq4o.jpg" alt="Depth of fish individuals over time. The background represents the temperature, the grey dots is the raw depth data, and the black line is the geom_smooth line of raw data" /></a></p>