【发布时间】:2020-05-04 16:47:42
【问题描述】:
ggplot(mtcars, aes(x = mpg,
y = wt,
size = hp,
colour = as.factor(cyl))) +
geom_point() +
theme(legend.direction = "vertical",
legend.box = "horizontal",
legend.position = "bottom")
给我
如何以某种方式生成图例,其中 cyl-label 保持垂直而 hp 类别水平排列?
【问题讨论】:
标签: ggplot2 alignment legend direction