File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,11 @@ Guides <- ggproto(
509
509
MoreArgs = list (theme = theme )
510
510
)
511
511
512
+ # Set spacing
513
+ theme $ legend.spacing <- theme $ legend.spacing %|| % unit(0.5 , " lines" )
514
+ theme $ legend.spacing.y <- theme $ legend.spacing.y %|| % theme $ legend.spacing
515
+ theme $ legend.spacing.x <- theme $ legend.spacing.x %|| % theme $ legend.spacing
516
+
512
517
Map(
513
518
grobs = grobs ,
514
519
position = levels(positions ),
@@ -538,11 +543,6 @@ Guides <- ggproto(
538
543
top = , bottom = c(" center" , " top" )
539
544
)
540
545
541
- # Set spacing
542
- theme $ legend.spacing <- theme $ legend.spacing %|| % unit(0.5 , " lines" )
543
- theme $ legend.spacing.y <- theme $ legend.spacing.y %|| % theme $ legend.spacing
544
- theme $ legend.spacing.x <- theme $ legend.spacing.x %|| % theme $ legend.spacing
545
-
546
546
# Measure guides
547
547
widths <- lapply(grobs , function (g ) sum(g $ widths ))
548
548
widths <- inject(unit.c(!!! widths ))
You can’t perform that action at this time.
0 commit comments