部分斜体,axis.text.x

前端之家收集整理的这篇文章主要介绍了部分斜体,axis.text.x前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
阿罗哈,

对于以下条形图:@H_301_3@

x <- ggplot(foo,aes(x=variety,y=percent)) + geom_bar()

以下斜体我的所有x轴文本:@H_301_3@

x + opts(axis.text.x=theme_text(face='italic'))

不过,我只想斜体化种名,而不是控制.@H_301_3@

levels(foo$variety)
"control"    "species1" "species2"     "species3"

有什么建议么?@H_301_3@

解决方法

尝试这个例子:
library(ggplot2)

ggplot(CO2,aes(y=uptake,x=Type,group=Type))+
  geom_point()+
  scale_x_discrete("Location",labels=expression(Quebec,italic(Mississippi)))

猜你在找的HTML相关文章