@@ -143,7 +143,7 @@ theme_grey <- function(base_size = 11, base_family = "",
143
143
title = element_text(family = header_family ),
144
144
145
145
spacing = unit(half_line , " pt" ),
146
- margins = margin( half_line , half_line , half_line , half_line ),
146
+ margins = margin_auto( half_line ),
147
147
148
148
geom = element_geom(
149
149
ink = ink , paper = paper , accent = " #3366FF" ,
@@ -226,7 +226,7 @@ theme_grey <- function(base_size = 11, base_family = "",
226
226
strip.text = element_text(
227
227
colour = col_mix(ink , paper , 0.105 ),
228
228
size = rel(0.8 ),
229
- margin = margin( 0.8 * half_line , 0.8 * half_line , 0.8 * half_line , 0.8 * half_line )
229
+ margin = margin_auto( 0.8 * half_line )
230
230
),
231
231
strip.text.x = NULL ,
232
232
strip.text.y = element_text(angle = - 90 ),
@@ -341,7 +341,7 @@ theme_linedraw <- function(base_size = 11, base_family = "",
341
341
strip.text = element_text(
342
342
colour = paper ,
343
343
size = rel(0.8 ),
344
- margin = margin( 0.8 * half_line , 0.8 * half_line , 0.8 * half_line , 0.8 * half_line )
344
+ margin = margin_auto( 0.8 * half_line )
345
345
),
346
346
347
347
complete = TRUE
@@ -384,7 +384,7 @@ theme_light <- function(base_size = 11, base_family = "",
384
384
strip.text = element_text(
385
385
colour = paper ,
386
386
size = rel(0.8 ),
387
- margin = margin( 0.8 * half_line , 0.8 * half_line , 0.8 * half_line , 0.8 * half_line )
387
+ margin = margin_auto( 0.8 * half_line )
388
388
),
389
389
390
390
complete = TRUE
@@ -427,7 +427,7 @@ theme_dark <- function(base_size = 11, base_family = "",
427
427
strip.text = element_text(
428
428
colour = col_mix(ink , paper , 0.9 ),
429
429
size = rel(0.8 ),
430
- margin = margin( 0.8 * half_line , 0.8 * half_line , 0.8 * half_line , 0.8 * half_line )
430
+ margin = margin_auto( 0.8 * half_line )
431
431
),
432
432
433
433
complete = TRUE
@@ -557,7 +557,7 @@ theme_void <- function(base_size = 11, base_family = "",
557
557
),
558
558
title = element_text(family = header_family ),
559
559
spacing = unit(half_line , " pt" ),
560
- margins = margin( half_line , half_line , half_line , half_line ),
560
+ margins = margin_auto( half_line ),
561
561
axis.text = element_blank(),
562
562
axis.title = element_blank(),
563
563
axis.ticks.length = rel(0 ),
@@ -641,7 +641,7 @@ theme_test <- function(base_size = 11, base_family = "",
641
641
),
642
642
title = element_text(family = header_family ),
643
643
spacing = unit(half_line , " pt" ),
644
- margins = margin( half_line , half_line , half_line , half_line ),
644
+ margins = margin_auto( half_line ),
645
645
geom = element_geom(
646
646
ink = ink , paper = paper , accent = " #3366FF" ,
647
647
linewidth = base_line_size , borderwidth = base_line_size ,
@@ -690,7 +690,7 @@ theme_test <- function(base_size = 11, base_family = "",
690
690
legend.spacing = rel(2 ),
691
691
legend.spacing.x = NULL ,
692
692
legend.spacing.y = NULL ,
693
- legend.margin = margin (0 , 0 , 0 , 0 , " cm" ),
693
+ legend.margin = margin_auto (0 , unit = " cm" ),
694
694
legend.key = NULL ,
695
695
legend.key.size = unit(1.2 , " lines" ),
696
696
legend.key.height = NULL ,
@@ -705,7 +705,7 @@ theme_test <- function(base_size = 11, base_family = "",
705
705
legend.direction = NULL ,
706
706
legend.justification = " center" ,
707
707
legend.box = NULL ,
708
- legend.box.margin = margin (0 , 0 , 0 , 0 , " cm" ),
708
+ legend.box.margin = margin_auto (0 , unit = " cm" ),
709
709
legend.box.background = element_blank(),
710
710
legend.box.spacing = rel(2 ),
711
711
@@ -726,7 +726,7 @@ theme_test <- function(base_size = 11, base_family = "",
726
726
strip.text = element_text(
727
727
colour = col_mix(ink , paper , 0.105 ),
728
728
size = rel(0.8 ),
729
- margin = margin( 0.8 * half_line , 0.8 * half_line , 0.8 * half_line , 0.8 * half_line )
729
+ margin = margin_auto( 0.8 * half_line )
730
730
),
731
731
strip.text.x = NULL ,
732
732
strip.text.y = element_text(angle = - 90 ),
0 commit comments