Skip to content

Commit

Permalink
Make legend background transparent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mavam committed Jul 27, 2021
1 parent a969564 commit 190d18e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion figs/distributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ library(VGAM) # [dp]pareto
line_width = 1.3
point_size = 4
theme_set(theme_bw(base_size=20))
theme_update(legend.key=element_rect(colour="white"),
theme_update(legend.background=element_rect(fill=alpha("white", 0)),
legend.key=element_rect(colour="white"),
legend.key.width=unit(3, "lines"),
plot.margin=unit(rep(0, 4), "lines"))

Expand Down

0 comments on commit 190d18e

Please sign in to comment.