【发布时间】:2018-03-30 14:35:36
【问题描述】:
我想仅在图例中使显示气泡颜色的形状更大。我已经尝试了这个网站的几个建议,但到目前为止我一直很不走运。下面是一个基本示例。
在此示例中,我希望“齿轮”的大小为 10。这可能太大了,但我想先验证它是否正常工作。
library(ggplot2)
ggplot(mtcars
,aes(x=hp, y=disp, size=mpg, fill=factor(gear)))+
geom_point(shape=21)+
theme_bw()+
scale_size_continuous(range=c(2,15))+
guides(shape = guide_legend(override.aes = list(size = 10)))
【问题讨论】:
标签: r ggplot2 bubble-chart legend-properties