In ggplot2, how can I make the legend have a semi-transparent background.
The following code, gives a fully transparent background (and positioning control)
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"))
But how can one control the level of alpha, I don't believe that element_rect
has that ability.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…