x 轴的斜体标签

Sag*_*lke 5 r ggplot2

如何用斜体标记 x 轴的单词?

代码:

nr$species <- factor(nr$species,
                     levels=c( "Gaur", "Sambar", "SpottedDeer", "IndianMuntjac", "WildBoar"))
Run Code Online (Sandbox Code Playgroud)

Rob*_*ach 8

使用theme更改ggplot 中文本的外观:

+ theme(axis.text.x = element_text(face = "italic"))
Run Code Online (Sandbox Code Playgroud)