Skip to content

Commit 190d18e

Browse files
committed
Make legend background transparent
More recent versions of ggplot cause the legend background to lay on top of the borders of grid, thereby creating a big ugly gap. Making the background transparent is the easiest fix, and works well for our theme.
1 parent a969564 commit 190d18e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

figs/distributions.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ library(VGAM) # [dp]pareto
1414
line_width = 1.3
1515
point_size = 4
1616
theme_set(theme_bw(base_size=20))
17-
theme_update(legend.key=element_rect(colour="white"),
17+
theme_update(legend.background=element_rect(fill=alpha("white", 0)),
18+
legend.key=element_rect(colour="white"),
1819
legend.key.width=unit(3, "lines"),
1920
plot.margin=unit(rep(0, 4), "lines"))
2021

0 commit comments

Comments
 (0)