gagplot2에서 "변경됨"이 "예"인 점이 빨간색 점이고, 나머지가 회색이고, "중요"가 "중요"인 점이 추가 점이있는 gplplot을 만들고 싶습니다 하숙 인은 녹색이고, 나머지는 회색 테두리가있다.ggplot2의 다중 피쳐 스 캐터 플롯
ggplot(df, aes(x = a, y = b)) +
geom_point(aes(col = Changed)) +
geom_point(aes(col = Significant)) +
scale_color_manual(values = c("green", "red","grey", "grey")) +
theme_bw(base_size = 12) + theme(legend.position = "bottom")
입력 데이터 :이 일을
structure(list(a = c(4.31316551, 5.7663368, 2.49063318, 5.83090286,
3.11188057, 9.58084417, 4.08696886, 3.11188057, 6.43800344, 1.77771123,
4.22594833), b = c(0.848363512, 0.045492721, 0.049883076, 0.136202457,
0.572585532, 0.175069609, 0.000782666, 0.848363512, 0.254619199,
0.378181529, 0.848363512), Significant = structure(c(1L, 2L,
2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L), .Label = c("no", "yes"), class = "factor"),
Change = structure(c(1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L,
1L, 1L), .Label = c("no", "yes"), class = "factor")), .Names = c("a",
"b", "Significant", "Change"), class = "data.frame", row.names = c(NA,
-11L))
당신은 데이터 샘플을 추가 할 수 있습니다를 – MorganBall
업데이트 버전을 참조하십시오하시기 바랍니다 여기 내 시도이다 – user2904120