xp <- data.frame(cbind(x=c(1,7/3,4,13/2),p=c(1/6,1/6,1/6,1/2),sp=c(1/6,1/3,1/2,1)))
ggplot(aes(x=x),data = xp) + geom_point(aes(y=sp),data = xp,col="#00FFFF") + geom_bar(aes(y=p), width=.025, stat="identity") + xlim(0,8) + ylab("Probabilité") + stat_ecdf(aes(x=x,weight=p),geom = "step",col="#00FFFF", lty=2)+ geom_point(aes(y=p),data = xp)+ annotate("text", x = .5, y = .95,
label = paste(expression(p[X])),
parse=TRUE) + annotate("text", x = .5, y = .875,
label = paste(expression(F[X])),
parse=TRUE,col="#00FFFF") + geom_segment(aes(x = 0, y = .95, xend = .3, yend = .95), data = xp) + geom_segment(aes(x = 0, y = .90, xend = .3, yend = .90), data = xp, col="#00FFFF", lty=2)
#> Warning: Ignoring unknown aesthetics: weight