df1 <-data.frame(Mean = as.numeric(c("45.71329", "38.162915")), Std = as.numeric(c("7.366905257", "9.597423074")), Samples=c("C", "T"))
df2 <- data.frame(Samples=c("C","C","C","C", "T", "T","T","T"), Values=c(38.37464, 40.84156, 49.50789,54.12907, 26.72173, 34.76061,42.14296,49.02636 ))
ggplot(df1, aes(Samples, Mean)) +
geom_col(color = "black", width = 0.4) +
scale_fill_grey() +
theme_classic() +
geom_errorbar(aes(ymin = Mean - Std, ymax = Mean + Std),color = "black",width = .1) +
ylim(0,60) +
geom_point(df2, mapping = aes(x=Samples, y= Values))
Hi everyone,
I have some problems plotting this data. After the run of this code I obtain this barplot:
I would need to color the points in C and T in the same way. The lower one in C with the same color as the lower one in T, the higher one in C with the same color as the higher one in T (the same for the other in the middle).
How can I do to color the points of my choice?