Hi I have done a plot where the x values is a string with the year and week value. ex. "2016-13"
This is an example of the code, here there is not overlapping because there is an small simple but in the real sample there is:
#install.packages("ggplot2")
library(ggplot2)
day_week<-c("2016-01","2016-02","2016-03","2017-01","2017-02","2017-40")
freq<-c(5,6,8,10,13,16)
x<-data.frame(day_week,freq)
ggplot(x, aes(x=day_week, y=freq))+ geom_bar(stat="identity")+ggtitle("plot")+xlab("weeks")+ylab("freq")
The problem is that when I do the plot the x lab appears all overlaped because there are many time labels. Is there any way I can put the year-week value every 4 weeks for example. Right now the year_week value is an string.
Thanks in advance, I am not managing to solve this !