对于我在ggplot2中的图例,我有两个类别,如何只让一个类别变为斜体而另一个不变?
以以下图表为例。我该如何将“Manual”设置为斜体?
library(ggplot2)
ggplot(data = mtcars, aes(x = as.factor(am), fill = as.factor(am))) +
geom_bar() +
scale_fill_discrete(
"Transmission",
breaks = c(0, 1),
labels = c("Automatic", "Manual")
)
该内容由reprex package(v0.3.0)于2020年01月01日创建
+ theme(legend.text.align = 0)
。有关此内容的更多信息,请参见此网址:https://dev59.com/518d5IYBdhLWcg3weiF- - user14353