I am making a figure using the following codes:
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")
HOWEVER, I noticed that the dot color of Type A is not grey, but black.
Is there anyway that I can manually change it accordingly?
If possible, I would like to keep the function "scale_color_grey".
Thanks!!