How does one overcome overlapping points without jitter or transparency in ggplot2

后端 未结 3 584
无人及你
无人及你 2021-02-06 10:20

I am starting to use ggplot2. I have some small n (about 30 or so) granular data with lots of overlap. Neither jitter nor alpha (transparency) are suitable. Instead a stripchart

3条回答
  •  隐瞒了意图╮
    2021-02-06 10:38

    You can use position_dodge.

    df <- data.frame(gp = rep(LETTERS[1:5], each =8), 
                     y = sample(1:4,40,replace=TRUE))
    qplot(gp,y,data=df,order=y,position=position_dodge(width=0.5))
    

    alt text http://img100.imageshack.us/img100/8760/dodgel.png

提交回复
热议问题