1
私は各青い点をグループごとに対応する赤い点に接続しようとしています。しかし、私はgeom_segment
を使って問題があります。ヘルプThx。グループ化されたポイントをggplot2に1行ずつ接続します。
repl <- data.frame(title = c("A", "B", "C", "A", "B", "C"), diff = c(10.06, -1.89, 12.79, 10.06, -1.89, 12.79), id = c(1:6), acc= c(43, 50, 44, 43, 50, 44), variable= c(rep("A", 3), rep("B", 3)), value=c(43,50,44,53,48,56))
ggplot(repl, aes(value, title, y=reorder(title, diff), group=variable, color=variable)) +
geom_point(size=2, shape=8)+
geom_segment(aes(xend=value, x=value, y=title, yend=title), col='gray')
各グループのために、私はそれをどのように行う必要があり、横に2点を結ぶ線があるはず?
'variable'またはその間に行を接続しますか? –