[英]How to change facet_wrap titles' colours?
df<-data.frame(c(1:5,11:15),c(1:10),c(1,1,1,1,1,2,1,2,1,2),c(rep('o',5),rep('m',5)))
colnames(df)<-c('a','b','c','d')
qplot(a,b,data=df,geom = 'point',color=factor(df$c))+facet_wrap(~d)+scale_colour_manual(values=c("blue","orange"))+theme(panel.background = element_rect(fill='white', colour='black'))
使用上面的代码,构面标题的背景为灰色。 如何将其更改为白色以适合整个情节?
我用+theme(panel.background=element_rect(fill='white', colour='black'),strip.background=element_rect(fill='white', colour='white'))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.