Hi i have yearly data from 2010 to 2050. i am trying make line plot so that my x-axis start from 2010 and end in 2050 showing 5 years interval i e i want x-axis break as ( 2
If you know exactly where you want your break values to be, then just tell ggplot
ggplot
plot1<- ggplot(test, aes(yr, y=value)) + geom_line()+ scale_x_date(breaks = seq(as.Date("2010-01-01"), as.Date("2050-12-31"), by="5 years"), labels=date_format("%Y")) + scale_y_continuous(breaks=seq(-4,6, by=1))