我正在用ggplot绘制一个geom_point,我想将它与从x-asis到点的一个段结合起来。如何指定段应该从x轴的转到x轴?
head(pValues_Both.m)
value
1 5.502
2 0.823
3 0.374
4 3.886
5 0.724
6 0.706
ggplot(pValues_Both.m, aes(x=seq_along(value),y=value)) + geom_segment(aes(yend=value), xend=0, colour="grey50") +
geom_point(size=3.5,colour="#2E64FE")发布于 2014-09-15 09:32:34
您还应该使用seq_along(value)作为aes() of geom_segment()中的xend=值。
ggplot(pValues_Both.m, aes(x=seq_along(value),y=value)) +
geom_point(size=3.5,colour="#2E64FE")+
geom_segment(aes(yend=0,xend=seq_along(value)), colour="grey50")https://stackoverflow.com/questions/25844644
复制相似问题