假设我有例如
ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group)) + geom_boxplot()
Run Code Online (Sandbox Code Playgroud)
而且我不想显示图例.从图中隐藏或删除图例的最简单方法是什么?
theme(legend.position="none")像这样添加:
ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group)) +
geom_boxplot() +
theme(legend.position="none")
Run Code Online (Sandbox Code Playgroud)
(来源)
| 归档时间: |
|
| 查看次数: |
7576 次 |
| 最近记录: |