【发布时间】:2013-04-27 12:10:46
【问题描述】:
在ggplot2中,如何使图例具有半透明背景。
下面的代码,给出了一个完全透明的背景(和定位控制)
plot <- plot + theme(legend.position=c(1,1),legend.justification=c(1,1),
legend.direction="vertical",
legend.box="horizontal",
legend.box.just = c("top"),
legend.background = element_rect(fill="transparent"))
但是怎么能控制alpha的水平,我不相信element_rect有这个能力。
【问题讨论】: