다음 코드를 사용하여 그림을 만들고 있습니다.
d1 <- data.frame(time = c(0,15,60,120),
number = c(0, 5, 5, 10, 0, 20, 20, 25),
arm = c(rep("A",4), rep("B",4)))
ggplot(d1, aes(x = time, y = number, color = arm)) +
scale_color_grey(start = 0.6, end = 0.2, guide = F) +
geom_point(aes(shape = arm),
size = 3,
position = position_dodge(width=0)) +
geom_line(aes(),
position = position_dodge(width=0)) +
scale_x_continuous(name = "Time",breaks=c(0,15,60,120)) +
scale_shape_discrete(name = " ",
labels = c("A type","B type")) +
theme(axis.title.x=element_text(size=9),
legend.position = "top",
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) +
ylab("People")
그런데 A 형의 도트 색상이 회색이 아니라 검은 색임을 알았습니다.
어쨌든 수동으로 변경할 수 있습니까?
가능하다면 "scale_color_grey"기능을 유지하고 싶습니다.
감사!!
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다