in this question scale_x_date and how to make it equidistant? i tried to find a solution for the problem of the equidistance in the x-axis caused by the non existence of some months in ym data .a guy there suggested to me use factor() .if fact that wa s ok except that i can not anymore order my x-axis chronologically as i was enjoying in my first plot which i uploaded in my first post. iused scale_x-date in for that plot but this does not work for the factor() trick.
 dt<-data.frame(M_Datum=c("2018-02-05","2018-02-15","2018-02-10","2018-02-13","2017-02-05","2017-02-15","2017-02-10","2017-02-23","2020-02-25","2012-02-15","2020-02-10","2020-02-13"),Yield=c(4,47,18,10,22,50,70,120,150,400,60,78))
        
        dt[,1]<-as.Date(format(as.Date(dt[,1]), "%Y-%m-01"))
       
        dr<-data.frame("M_Datum"=dt$M_Datum,"Yield"=dt$Yield)
      
        
        
        
        mydf=aggregate(Yield ~ M_Datum, dr, length) 
        
        
        koka<-data.frame("M_Datum"=mydf$M_Datum,"Yiel"=mydf$Yield)
        
        
        
        ggplot(koka, aes(x=factor(format(M_Datum, "%b %Y")), y=Yiel,group = 1)) + 
          geom_point(size=7,colour="#EF783D",shape=17) +
          geom_line(color="#EF783D")+
          
          theme(axis.text.x = element_text(angle = 0, vjust = 0.5, hjust=1))+
          theme(axis.text.y.left = element_text(color = "#EF783D"),
                axis.title.y.left = element_text(color = "#EF783D"))+
          ylab("Wafer Quantity")+
          xlab("")
        
        
        
        
        
        
        
        
        
      
      

 
     
    