[英]lines to connect geom_jitter points in ggplot2
I am trying to connect the points from geom_jitter()
.我正在尝试连接
geom_jitter()
的点。
df<-data.frame(x = c(1, 1, 2, 2, 3, 3),
y = c(1, 1, 2 , 3, 6, 5),
z = c("A", "B", "A", "B", "A", "B"))
ggplot(df, aes(x = x, y = y, col = z)) +
geom_jitter() +
geom_line()
Now the lines and points are not connected.现在线和点没有连接。
将抖动(一些偏差)添加到您的数据中,然后绘制有偏差的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.