Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
阿罗哈,
对于以下条形图:
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)))