3
我想更改ggplot中点的形状和颜色填充,这是我的部分工作代码,颜色图例仍然是黑色。更改ggplot中点的颜色填充和形状
ID<-rep(c("KO", "WT"), each=4)
O<-rep(c("HP", "NN"), each=2, times=2)
Methionine<-rep(c("- Methionine", "+ Methionine"), each=2, times=2)
mean.1<-sample(50:100, 8)
se.1<-runif(8, min=1, max=3)
mydata<-data.frame(ID, O, Methionine, mean.1, se.1)
ggplot(mydata, aes(x=O, y=mean.1, ymax=max(mean.1), shape=Methionine, fill=ID)) +
geom_errorbar(aes(ymin=mean.1-se.1, ymax=mean.1+se.1), size=1,colour="black", width=.15) +
geom_point(size = 10) +
scale_shape_manual(labels=c("+ Methionine", "- Methionine"),
values = c(21,22))+
scale_fill_manual(name=bquote(bold(paste(alpha, " "))), values = cols)
我指出它在ggplot函数的第一行 – Al14
是真的我没有看到Methione is shape – Nate
'scale_color_manual'不起作用 – Al14