Подтвердить что ты не робот

Частичный курсив, axis.text.x

Алоха,

Для следующей гистограммы:

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" 

Любые предложения?

4b9b3361

Ответ 1

Попробуйте этот пример:

library(ggplot2)

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

enter image description here