diff --git a/R/flex_mode.R b/R/flex_mode.R index 2aa258c7c..b037e9157 100644 --- a/R/flex_mode.R +++ b/R/flex_mode.R @@ -115,14 +115,14 @@ flex_mode_base <- function( legend.margin = ggplot2::margin(t = 0, r = base_size * -1, b = base_size * 0.75, l = base_size * 0.75), legend.spacing = grid::unit(base_size * 1, "pt"), + legend.spacing.y = grid::unit(base_size * 1.5, "pt"), legend.spacing.x = NULL, - legend.spacing.y = NULL, legend.key = ggplot2::element_rect(colour = legend_key_fill, fill = legend_key_fill), legend.key.size = grid::unit(base_size * 1.75, "pt"), legend.key.height = NULL, legend.key.width = NULL, legend.key.spacing = NULL, - legend.key.spacing.x = grid::unit(11, "pt"), + legend.key.spacing.x = grid::unit(base_size, "pt"), legend.key.spacing.y = grid::unit(base_size * 0.33, "pt"), legend.byrow = FALSE, legend.frame = NULL, @@ -131,9 +131,10 @@ flex_mode_base <- function( legend.ticks = ggplot2::element_line(colour = legend_ticks_colour, linewidth = legend_ticks_linewidth), legend.ticks.length = legend_ticks_length, legend.title.position = "top", - legend.box = NULL, + legend.box = "vertical", legend.box.background = NULL, legend.box.spacing = NULL, + legend.box.just = "left", legend.background = ggplot2::element_rect(colour = legend_background_fill, fill = legend_background_fill), panel.background = ggplot2::element_rect(colour = panel_background_fill, fill = panel_background_fill), panel.border = ggplot2::element_blank(), diff --git a/tests/testthat/_snaps/numeric-col/light-mode-b.svg b/tests/testthat/_snaps/numeric-col/light-mode-b.svg index a83161571..2d333a61d 100644 --- a/tests/testthat/_snaps/numeric-col/light-mode-b.svg +++ b/tests/testthat/_snaps/numeric-col/light-mode-b.svg @@ -19,447 +19,447 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + female male NA -170 -180 -190 -200 -210 -220 -230 -240 -170 -180 -190 -200 -210 -220 -230 -240 -170 -180 -190 -200 -210 -220 -230 -240 - - - - - - - - - -Torgersen -Dream -Biscoe - - - -Flipper length mm -Island - -Bill depth mm - - - - - - - - - -14 -16 -18 -20 - -Species - - - - - - -Adelie -Chinstrap -Gentoo +170 +180 +190 +200 +210 +220 +230 +240 +170 +180 +190 +200 +210 +220 +230 +240 +170 +180 +190 +200 +210 +220 +230 +240 + + + + + + + + + +Torgersen +Dream +Biscoe + + + +Flipper length mm +Island + +Bill depth mm + + + + + + + + + +14 +16 +18 +20 + +Species + + + + + + +Adelie +Chinstrap +Gentoo diff --git a/tests/testthat/_snaps/numeric-col/light-mode-r.svg b/tests/testthat/_snaps/numeric-col/light-mode-r.svg index 489d3588c..239c2eb6b 100644 --- a/tests/testthat/_snaps/numeric-col/light-mode-r.svg +++ b/tests/testthat/_snaps/numeric-col/light-mode-r.svg @@ -450,16 +450,16 @@ 16 18 20 - -Species - - - - - - -Adelie -Chinstrap -Gentoo + +Species + + + + + + +Adelie +Chinstrap +Gentoo diff --git a/tests/testthat/_snaps/numeric-col/light-mode-t.svg b/tests/testthat/_snaps/numeric-col/light-mode-t.svg index 285749279..fdde694c5 100644 --- a/tests/testthat/_snaps/numeric-col/light-mode-t.svg +++ b/tests/testthat/_snaps/numeric-col/light-mode-t.svg @@ -19,381 +19,381 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -female - -male - -NA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +female + +male + +NA 170 180 190 @@ -418,23 +418,23 @@ 220 230 240 - - - - - - - - - -Torgersen -Dream -Biscoe - - - + + + + + + + + + +Torgersen +Dream +Biscoe + + + Flipper length mm -Island +Island Bill depth mm @@ -450,16 +450,16 @@ 16 18 20 - -Species - - - - - - -Adelie -Chinstrap -Gentoo + +Species + + + + + + +Adelie +Chinstrap +Gentoo