title: How can I put number in x-axis of y-axis by myself?
body: <pre><code>y &lt;- c(2, 15, 8, 20,3,4, 7)
  x &lt;- c(2015, 2016, 2017, 2018, 2019, 2020, 2021)
  dat &lt;-data.frame(x,y)
  
  p&lt;-ggplot(dat, aes(x,y, label=y))+ geom_line()+xlab("") + ylab("")+ 
  theme(axis.text.y = element_text(face='bold',size=24),axis.text.x=     element_text(face='bold', size=20))+
  scale_y_continuous("", limits=c(0,30))+xlab("")+theme_bw()+geom_text(vjust=-1, colour="purple")
  </code></pre>
  
  <p>After I run this code, only 2016, 2018, 2020 show in the x-axis. I want to write all of <code>x &lt;- c(2015, 2016, 2017, 2018, 2019, 2020, 2021)</code> to the graph.</p>
  
  <p>Which command should I use for that? In y-axis, I would like to show 0,5,10,15,20,25,20 rather than 0,10,20,30.</p>