title: Align time series ggplot
body: <p>I need to align the x axes on these plots, I think if I could change the width so they had the same width would work but I haven't been able to do it.
  <a href="https://i.stack.imgur.com/T4edT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T4edT.png" alt="misaligned plots" /></a></p>
  <p>my data looks like this:</p>
  <pre><code>&gt; x&lt;-as.data.frame(table(casosbog$fis))
  &gt; dput(x[1:10,c('Var1','Freq')])
  structure(list(Var1 = structure(1:10, .Label = c(&quot;2020-02-27&quot;, 
  &quot;2020-02-28&quot;, &quot;2020-03-01&quot;, &quot;2020-03-04&quot;, &quot;2020-03-05&quot;, &quot;2020-03-06&quot;, 
  &quot;2020-03-07&quot;, &quot;2020-03-08&quot;, &quot;2020-03-09&quot;, &quot;2020-03-10&quot;, &quot;2020-03-11&quot;, 
  &quot;2020-03-12&quot;, &quot;2020-03-13&quot;, &quot;2020-03-14&quot;, &quot;2020-03-15&quot;, &quot;2020-03-16&quot;, 
  &quot;2020-03-17&quot;, &quot;2020-03-18&quot;, &quot;2020-03-19&quot;, &quot;2020-03-20&quot;, &quot;2020-03-21&quot;, 
  &quot;2020-03-22&quot;, &quot;2020-03-23&quot;, &quot;2020-03-24&quot;, &quot;2020-03-25&quot;, &quot;2020-03-26&quot;, 
  &quot;2020-03-27&quot;, &quot;2020-03-28&quot;, &quot;2020-03-29&quot;, &quot;2020-03-30&quot;, &quot;2020-03-31&quot;, 
  &quot;2020-04-01&quot;, &quot;2020-04-02&quot;, &quot;2020-04-03&quot;, &quot;2020-04-04&quot;, &quot;2020-04-05&quot;, 
  &quot;2020-04-06&quot;, &quot;2020-04-07&quot;, &quot;2020-04-08&quot;, &quot;2020-04-09&quot;, &quot;2020-04-10&quot;, 
  &quot;2020-04-11&quot;, &quot;2020-04-12&quot;, &quot;2020-04-13&quot;, &quot;2020-04-14&quot;, &quot;2020-04-15&quot;, 
  &quot;2020-04-16&quot;, &quot;2020-04-17&quot;, &quot;2020-04-18&quot;, &quot;2020-04-19&quot;, &quot;2020-04-20&quot;, 
  &quot;2020-04-21&quot;, &quot;2020-04-22&quot;, &quot;2020-04-23&quot;, &quot;2020-04-24&quot;, &quot;2020-04-25&quot;, 
  &quot;2020-04-26&quot;, &quot;2020-04-27&quot;, &quot;2020-04-28&quot;, &quot;2020-04-29&quot;, &quot;2020-04-30&quot;, 
  &quot;2020-05-01&quot;, &quot;2020-05-02&quot;, &quot;2020-05-03&quot;, &quot;2020-05-04&quot;, &quot;2020-05-05&quot;, 
  &quot;2020-05-06&quot;, &quot;2020-05-07&quot;, &quot;2020-05-08&quot;, &quot;2020-05-09&quot;, &quot;2020-05-10&quot;, 
  &quot;2020-05-11&quot;, &quot;2020-05-12&quot;, &quot;2020-05-13&quot;, &quot;2020-05-14&quot;, &quot;2020-05-15&quot;, 
  &quot;2020-05-16&quot;, &quot;2020-05-17&quot;, &quot;2020-05-18&quot;, &quot;2020-05-19&quot;, &quot;2020-05-20&quot;, 
  &quot;2020-05-21&quot;, &quot;2020-05-22&quot;, &quot;2020-05-23&quot;, &quot;2020-05-24&quot;, &quot;2020-05-25&quot;, 
  &quot;2020-05-26&quot;, &quot;2020-05-27&quot;, &quot;2020-05-28&quot;, &quot;2020-05-29&quot;, &quot;2020-05-30&quot;, 
  &quot;2020-05-31&quot;, &quot;2020-06-01&quot;, &quot;2020-06-02&quot;, &quot;2020-06-03&quot;, &quot;2020-06-04&quot;, 
  &quot;2020-06-05&quot;, &quot;2020-06-06&quot;, &quot;2020-06-07&quot;, &quot;2020-06-08&quot;, &quot;2020-06-09&quot;, 
  &quot;2020-06-10&quot;, &quot;2020-06-11&quot;, &quot;2020-06-12&quot;, &quot;2020-06-13&quot;, &quot;2020-06-14&quot;, 
  &quot;2020-06-15&quot;, &quot;2020-06-16&quot;, &quot;2020-06-17&quot;, &quot;2020-06-18&quot;, &quot;2020-06-19&quot;, 
  &quot;2020-06-20&quot;, &quot;2020-06-21&quot;, &quot;2020-06-22&quot;, &quot;2020-06-23&quot;, &quot;2020-06-24&quot;, 
  &quot;2020-06-25&quot;, &quot;2020-06-26&quot;, &quot;2020-06-27&quot;, &quot;2020-06-28&quot;, &quot;2020-06-29&quot;, 
  &quot;2020-06-30&quot;, &quot;2020-07-01&quot;, &quot;2020-07-02&quot;, &quot;2020-07-03&quot;, &quot;2020-07-04&quot;, 
  &quot;2020-07-05&quot;, &quot;2020-07-06&quot;, &quot;2020-07-07&quot;, &quot;2020-07-08&quot;, &quot;2020-07-09&quot;, 
  &quot;2020-07-10&quot;, &quot;2020-07-11&quot;, &quot;2020-07-12&quot;, &quot;2020-07-13&quot;, &quot;2020-07-14&quot;, 
  &quot;2020-07-15&quot;, &quot;2020-07-16&quot;, &quot;2020-07-17&quot;, &quot;2020-07-18&quot;, &quot;2020-07-19&quot;, 
  &quot;2020-07-20&quot;, &quot;2020-07-21&quot;, &quot;2020-07-22&quot;, &quot;2020-07-23&quot;, &quot;2020-07-24&quot;, 
  &quot;2020-07-25&quot;, &quot;2020-07-26&quot;, &quot;2020-07-27&quot;, &quot;2020-07-28&quot;, &quot;2020-07-29&quot;, 
  &quot;2020-07-30&quot;, &quot;2020-07-31&quot;, &quot;2020-08-01&quot;, &quot;2020-08-02&quot;, &quot;2020-08-03&quot;, 
  &quot;2020-08-04&quot;, &quot;2020-08-05&quot;, &quot;2020-08-06&quot;, &quot;2020-08-07&quot;, &quot;2020-08-08&quot;, 
  &quot;2020-08-09&quot;, &quot;2020-08-10&quot;, &quot;2020-08-11&quot;, &quot;2020-08-12&quot;, &quot;2020-08-13&quot;, 
  &quot;2020-08-14&quot;, &quot;2020-08-15&quot;, &quot;2020-08-16&quot;, &quot;2020-08-17&quot;, &quot;2020-08-18&quot;, 
  &quot;2020-08-19&quot;, &quot;2020-08-20&quot;, &quot;2020-08-21&quot;, &quot;2020-08-22&quot;, &quot;2020-08-23&quot;, 
  &quot;2020-08-24&quot;, &quot;2020-08-25&quot;, &quot;2020-08-26&quot;, &quot;2020-08-27&quot;, &quot;2020-08-28&quot;, 
  &quot;2020-08-29&quot;, &quot;2020-08-30&quot;, &quot;2020-08-31&quot;, &quot;2020-09-01&quot;, &quot;2020-09-02&quot;, 
  &quot;2020-09-03&quot;, &quot;2020-09-04&quot;, &quot;2020-09-05&quot;, &quot;2020-09-06&quot;, &quot;2020-09-07&quot;, 
  &quot;2020-09-08&quot;, &quot;2020-09-09&quot;, &quot;2020-09-10&quot;, &quot;2020-09-11&quot;, &quot;2020-09-12&quot;, 
  &quot;2020-09-13&quot;, &quot;2020-09-14&quot;, &quot;2020-09-15&quot;, &quot;2020-09-16&quot;, &quot;2020-09-17&quot;
  ), class = &quot;factor&quot;), Freq = c(1L, 1L, 3L, 1L, 5L, 6L, 10L, 5L, 
  5L, 11L)), row.names = c(NA, 10L), class = &quot;data.frame&quot;)
  </code></pre>
  <p>and</p>
  <pre><code>&gt; movilcolbog[1:10,c('date','MovilidadProm')]
           date MovilidadProm
  1  2020-02-15     7.0000000
  2  2020-02-16     4.6666667
  3  2020-02-17     5.3333333
  4  2020-02-18     7.5000000
  5  2020-02-19     2.6666667
  6  2020-02-20    -0.3333333
  7  2020-02-21     5.0000000
  8  2020-02-22     1.8333333
  9  2020-02-23    -7.3333333
  10 2020-02-24     3.5000000
  </code></pre>
  <p>as you can see both dataframes have different starting dates and dates frequencies, the rest of the code is as follows</p>
  <pre><code>library(ggplot2)
  library(gridExtra)
  
  plot2&lt;-ggplot(movilcolbaq,aes(date,MovilidadProm))+geom_line(aes(color=&quot;Mov.  BAQ&quot;),size=1)+
    geom_line(data=movilcolbog,aes(color=&quot;Mov.  BOG&quot;),size=1)+
    labs(color=&quot;Legend text&quot;)+
  labs(title='Movilidad promedio (con respecto a enero-febrero) BOG, BAQ',x='',y='Cambio de movilidad en %')+
        theme(legend.title=element_blank())
  
  plot1&lt;-ggplot(casosbog,aes(x=fis,fill='Casos Bog'))+geom_bar()+
  geom_bar(data=casosbar,aes(x=fis,fill='Casos Bar'),alpha=0.7)+
    scale_colour_manual(&quot;&quot;, values = c(&quot;Casos Bog&quot;=&quot;red&quot;, &quot;Casos Baq&quot;=&quot;blue&quot;))+
    theme(legend.title=element_blank())+labs(x='Fecha de inicio de síntomas',
                                              y='Casos',
                                              title='Fecha de inicio síntomas BAQ vs BOG vs MED',
                                             subtitle='Fuentes: INS y www.google.com/covid19/mobility/')
  
  grid.arrange(plot1,plot2)
  </code></pre>
  <p>I've tried changing the xlim but it hasn't worked</p>