Alternatively to @Greg's answer (that I think should be the validated answer), you can get the same plot by adding annotation in place of facet labeling:library(tidyverse)ggplot(df, aes(x=n.fjernet,y=os.neck)) + geom_point(aes(color=uiccc),shape=20, size=5,alpha=0.7) + geom_quantile(quantiles = 0.5,col="black", size=1,linetype=2) + facet_wrap(.~factor(uiccc)) + scale_fill_manual(values=cols) + scale_colour_manual(values=cols) + scale_x_continuous(breaks = seq(0,50, by=10), name="Lymph nodal yield") + scale_y_continuous(name="Time to death") + theme(#strip.text.x = element_text(size=12,face="bold", colour = cols), #strip.text.y = element_text(size=12, face="bold"), #strip.background = element_rect(fill="white"), strip.background = element_blank(), strip.text = element_text(color = "transparent"), legend.position="none", plot.margin = unit(c(1,3,1,1), "lines")) + coord_cartesian(clip = "off",ylim = c(0,175))+ geom_text(data = . %>% distinct(uiccc), aes(label = factor(uiccc), color = uiccc), y = 200, x = 30, hjust = 0.5, fontface = "bold") 这篇关于为什么从facet_wrap中剥离文本颜色与element_text颜色不对应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-09 00:40