title: How to use scale_x_date properly
body: <p>I am a new user in R and I hope you can help me.</p>
  
  <pre><code>setwd("C:/Users/USER/Desktop/Jorge")
  agua &lt;- read_excel("agua.xlsx")
  pbi &lt;- read_excel("PBIagro.xlsx")
  str(agua); 
  names(agua)[2] &lt;- "Variación";
  agua[,1] &lt;- as.Date(agua$Trimestre)
  
  lagpbi &lt;- lag(pbi$PBIAgropecuario, k=1)
  pbi[,3]&lt;- lagpbi; pbi &lt;- pbi[-c(1),]; 
  names(pbi)[3] &lt;- "PBIlag"
  
  growth &lt;- ((pbi$PBIAgropecuario-pbi$PBIlag)/pbi$PBIlag)*100
  Anual_growth &lt;- data.frame(growth); Anual_growth[,2] &lt;- pbi$Año; names(Anual_growth)[2] &lt;- "Año"
  
  
  # Plot
  Agro &lt;- ggplot(Anual_growth, aes(x=Año, y=growth)) +
    geom_line(color="steelblue") + 
    geom_point() +
    geom_text(aes(label = round(Anual_growth$growth, 1)),
              vjust = "inward", hjust = "inward", size=2.5, show.legend = FALSE) +
    xlab("") +
    theme_ipsum() +
    theme(axis.text.x=element_text(angle=60, hjust=1)) +
    ylim(-9.9,13.4) + 
    theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
          axis.line.x = element_blank(), plot.margin = unit(c(1,1,0.5,1),"cm"),
          axis.line.y = element_blank(), axis.text.x=element_text(face = "bold", size=8, 
          angle=1,hjust=0.95,vjust=0.2),
          axis.text.y = element_blank(), axis.title.y=element_blank())+
          scale_x_continuous("Año", labels = as.character(Anual_growth$Año), breaks = Anual_growth$Año)
  
  print(Agro)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/bRjh0.jpg" alt="enter image description here"></p>
  
  <p>The problem is that it shows all the years, but I only want pair years (in X-axis) or years with step equal to 2. 
  I hope you can really help me.
  Thank you.
  Notice that the X-axis variable is a numeric string.</p>