阿罗哈,
对于以下条形图:
x <- ggplot(foo,aes(x=variety,y=percent)) + geom_bar()
以下斜体我的所有x轴文本:
x + opts(axis.text.x=theme_text(face='italic'))
不过,我只想斜体化种名,而不是控制.
levels(foo$variety) "control" "species1" "species2" "species3"
有什么建议么?
解决方法
尝试这个例子:
library(ggplot2) ggplot(CO2,aes(y=uptake,x=Type,group=Type))+ geom_point()+ scale_x_discrete("Location",labels=expression(Quebec,italic(Mississippi)))