You can include for example ifelse()
function inside element_text()
to have different labels.
ggplot(iris,aes(Species,Petal.Length))+geom_boxplot()+
theme(axis.text.x=
element_text(face=ifelse(levels(iris$Species)=="setosa","bold","italic")))
Or you can provide vector of values inside element_text()
the same length as number of levels.
ggplot(iris,aes(Species,Petal.Length))+geom_boxplot()+
theme(axis.text.x = element_text(face=c("bold","italic","bold"),
size=c(11,12,13)))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…