我想在不使用theme_classic()的情况下绘制一些东西。我怎样才能把传说的位置改成“底部”呢?
谢谢!
发布于 2022-03-02 13:58:30
我也很难回答你的问题;@JonSpring提供了有价值的代码和解释。
样本代码:
ggplot(diamonds, mapping = aes(x = clarity)) +
geom_bar(aes(fill = cut)) +
labs(x = NULL, y = NULL) +
guides(x = "none", y = "none")+
theme_classic()+
theme(legend.position = 'bottom', legend.direction = "horizontal")输出:

https://stackoverflow.com/questions/71314786
复制相似问题