From 139350b89fe96c19cf83fe56f26b2bb767d3d963 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 26 Sep 2025 10:55:34 +0200 Subject: [PATCH 1/6] rename just arguments --- R/theme.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/R/theme.R b/R/theme.R index 07a13db64a..de5172e0c6 100644 --- a/R/theme.R +++ b/R/theme.R @@ -416,7 +416,7 @@ theme <- function(..., legend.key.spacing, legend.key.spacing.x, legend.key.spacing.y, - legend.key.justification, + legend.key.just, legend.frame, legend.ticks, legend.ticks.length, @@ -429,12 +429,12 @@ theme <- function(..., legend.position.inside, legend.direction, legend.byrow, - legend.justification, - legend.justification.top, - legend.justification.bottom, - legend.justification.left, - legend.justification.right, - legend.justification.inside, + legend.just, + legend.just.top, + legend.just.bottom, + legend.just.left, + legend.just.right, + legend.just.inside, legend.location, legend.box, legend.box.just, From b1463cc744b369f06bba0262edb0ea26a542812f Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 26 Sep 2025 10:55:52 +0200 Subject: [PATCH 2/6] mass deprecate justification arguments --- R/theme.R | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/R/theme.R b/R/theme.R index de5172e0c6..153ec9332c 100644 --- a/R/theme.R +++ b/R/theme.R @@ -545,6 +545,21 @@ fix_theme_deprecations <- function(elements) { elements$legend.position.inside <- elements$legend.position elements$legend.position <- "inside" } + just_settings <- c( + "legend.key.just", + paste0("legend.just", c("", ".top", ".bottom", ".left", ".right", ".inside")) + ) + justification_settings <- gsub("\\.just", "\\.justification", just_settings) + for (i in which(justification_settings %in% names(elements))) { + deprecate_warn0( + "4.0.1", # TODO: double check intended version before merging + paste0("theme(", justification_settings[i], ")"), + paste0("theme(", just_settings[i], ")") + ) + elements[[just_settings[i]]] <- elements[[justification_settings[i]]] + elements[[justification_settings[i]]] <- NULL + } + elements } From 20e4c83ff7cf528d84716121c6f35d18756f2a2f Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 26 Sep 2025 10:57:36 +0200 Subject: [PATCH 3/6] redocument `theme()` --- R/theme.R | 14 +++++++------- man/theme.Rd | 26 +++++++++++++------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/R/theme.R b/R/theme.R index 153ec9332c..8bb720b6f2 100644 --- a/R/theme.R +++ b/R/theme.R @@ -86,7 +86,7 @@ #' between legend keys given as a `unit`. Spacing in the horizontal (x) and #' vertical (y) direction inherit from `legend.key.spacing` or can be #' specified separately. `legend.key.spacing` inherits from `spacing`. -#' @param legend.key.justification Justification for positioning legend keys +#' @param legend.key.just Justification for positioning legend keys #' when more space is available than needed for display. The default, `NULL`, #' stretches keys into the available space. Can be a location like `"center"` #' or `"top"`, or a two-element numeric vector. @@ -112,11 +112,11 @@ #' "vertical") #' @param legend.byrow whether the legend-matrix is filled by columns #' (`FALSE`, the default) or by rows (`TRUE`). -#' @param legend.justification anchor point for positioning legend inside plot +#' @param legend.just anchor point for positioning legend inside plot #' ("center" or two-element numeric vector) or the justification according to #' the plot area when positioned outside the plot -#' @param legend.justification.top,legend.justification.bottom,legend.justification.left,legend.justification.right,legend.justification.inside -#' Same as `legend.justification` but specified per `legend.position` option. +#' @param legend.just.top,legend.just.bottom,legend.just.left,legend.just.right,legend.just.inside +#' Same as `legend.just` but specified per `legend.position` option. #' @param legend.location Relative placement of legends outside the plot as a #' string. Can be `"panel"` (default) to align legends to the panels or #' `"plot"` to align legends to the plot as a whole. @@ -280,15 +280,15 @@ #' #' # Position #' p2 + theme(legend.position = "none") -#' p2 + theme(legend.justification = "top") +#' p2 + theme(legend.just = "top") #' p2 + theme(legend.position = "bottom") #' #' # Or place legends inside the plot using relative coordinates between 0 and 1 -#' # legend.justification sets the corner that the position refers to +#' # legend.just sets the corner that the position refers to #' p2 + theme( #' legend.position = "inside", #' legend.position.inside = c(.95, .95), -#' legend.justification = c("right", "top"), +#' legend.just = c("right", "top"), #' legend.box.just = "right", #' legend.margin = margin_auto(6) #' ) diff --git a/man/theme.Rd b/man/theme.Rd index ad95fb1d86..008fdf1c09 100644 --- a/man/theme.Rd +++ b/man/theme.Rd @@ -86,7 +86,7 @@ theme( legend.key.spacing, legend.key.spacing.x, legend.key.spacing.y, - legend.key.justification, + legend.key.just, legend.frame, legend.ticks, legend.ticks.length, @@ -99,12 +99,12 @@ theme( legend.position.inside, legend.direction, legend.byrow, - legend.justification, - legend.justification.top, - legend.justification.bottom, - legend.justification.left, - legend.justification.right, - legend.justification.inside, + legend.just, + legend.just.top, + legend.just.bottom, + legend.just.left, + legend.just.right, + legend.just.inside, legend.location, legend.box, legend.box.just, @@ -236,7 +236,7 @@ between legend keys given as a \code{unit}. Spacing in the horizontal (x) and vertical (y) direction inherit from \code{legend.key.spacing} or can be specified separately. \code{legend.key.spacing} inherits from \code{spacing}.} -\item{legend.key.justification}{Justification for positioning legend keys +\item{legend.key.just}{Justification for positioning legend keys when more space is available than needed for display. The default, \code{NULL}, stretches keys into the available space. Can be a location like \code{"center"} or \code{"top"}, or a two-element numeric vector.} @@ -275,11 +275,11 @@ placement of legends that have the \code{"inside"} position.} \item{legend.byrow}{whether the legend-matrix is filled by columns (\code{FALSE}, the default) or by rows (\code{TRUE}).} -\item{legend.justification}{anchor point for positioning legend inside plot +\item{legend.just}{anchor point for positioning legend inside plot ("center" or two-element numeric vector) or the justification according to the plot area when positioned outside the plot} -\item{legend.justification.top, legend.justification.bottom, legend.justification.left, legend.justification.right, legend.justification.inside}{Same as \code{legend.justification} but specified per \code{legend.position} option.} +\item{legend.just.top, legend.just.bottom, legend.just.left, legend.just.right, legend.just.inside}{Same as \code{legend.just} but specified per \code{legend.position} option.} \item{legend.location}{Relative placement of legends outside the plot as a string. Can be \code{"panel"} (default) to align legends to the panels or @@ -477,15 +477,15 @@ p2 # Position p2 + theme(legend.position = "none") -p2 + theme(legend.justification = "top") +p2 + theme(legend.just = "top") p2 + theme(legend.position = "bottom") # Or place legends inside the plot using relative coordinates between 0 and 1 -# legend.justification sets the corner that the position refers to +# legend.just sets the corner that the position refers to p2 + theme( legend.position = "inside", legend.position.inside = c(.95, .95), - legend.justification = c("right", "top"), + legend.just = c("right", "top"), legend.box.just = "right", legend.margin = margin_auto(6) ) From 5687cbdb942952b7f76f6c4042c34a1e27c8a3b5 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 26 Sep 2025 11:06:21 +0200 Subject: [PATCH 4/6] rename definitions --- R/theme-elements.R | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/R/theme-elements.R b/R/theme-elements.R index 3f69eacfb3..2886be5ca4 100644 --- a/R/theme-elements.R +++ b/R/theme-elements.R @@ -904,7 +904,7 @@ el_def <- function(class = NULL, inherit = NULL, description = NULL) { legend.key.spacing = el_def(c("unit", "rel"), "spacing"), legend.key.spacing.x = el_def(c("unit", "rel"), "legend.key.spacing"), legend.key.spacing.y = el_def(c("unit", "rel"), "legend.key.spacing"), - legend.key.justification = el_def(c("character", "numeric", "integer")), + legend.key.just = el_def(c("character", "numeric", "integer")), legend.frame = el_def(element_rect, "rect"), legend.axis.line = el_def(element_line, "line"), legend.ticks = el_def(element_line, "legend.axis.line"), @@ -918,26 +918,26 @@ el_def <- function(class = NULL, inherit = NULL, description = NULL) { legend.position.inside = el_def(c("numeric", "integer")), legend.direction = el_def("character"), - legend.justification = el_def(c("character", "numeric", "integer")), - legend.justification.top = el_def( + legend.just = el_def(c("character", "numeric", "integer")), + legend.just.top = el_def( c("character", "numeric", "integer"), - "legend.justification" + "legend.just" ), - legend.justification.bottom = el_def( + legend.just.bottom = el_def( c("character", "numeric", "integer"), - "legend.justification" + "legend.just" ), - legend.justification.left = el_def( + legend.just.left = el_def( c("character", "numeric", "integer"), - "legend.justification" + "legend.just" ), - legend.justification.right = el_def( + legend.just.right = el_def( c("character", "numeric", "integer"), - "legend.justification" + "legend.just" ), - legend.justification.inside = el_def( + legend.just.inside = el_def( c("character", "numeric", "integer"), - "legend.justification" + "legend.just" ), legend.location = el_def("character"), From 47b37cfb3c37ece756adfae65025d0cd3ab25147 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 26 Sep 2025 11:06:39 +0200 Subject: [PATCH 5/6] propagate throughout --- R/guide-legend.R | 4 ++-- R/guides-.R | 10 +++++----- R/theme-defaults.R | 4 ++-- R/theme-sub.R | 2 +- tests/testthat/_snaps/theme.md | 7 +++++-- tests/testthat/test-guide-legend.R | 6 +++--- tests/testthat/test-guides.R | 10 +++++----- tests/testthat/test-theme.R | 10 +++++----- 8 files changed, 28 insertions(+), 25 deletions(-) diff --git a/R/guide-legend.R b/R/guide-legend.R index 6378300c6d..f77019de9c 100644 --- a/R/guide-legend.R +++ b/R/guide-legend.R @@ -19,7 +19,7 @@ #' Arguments that apply to a single legend are respected, most of which have #' the `legend`-prefix. Arguments that apply to combined legends #' (the legend box) are ignored, including `legend.position`, -#' `legend.justification.*`, `legend.location` and `legend.box.*`. +#' `legend.just.*`, `legend.location` and `legend.box.*`. #' @param position A character string indicating where the legend should be #' placed relative to the plot panels. #' One of "top", "right", "bottom", "left", or "inside". @@ -179,7 +179,7 @@ GuideLegend <- ggproto( key = "legend.key", key_height = "legend.key.height", key_width = "legend.key.width", - key_just = "legend.key.justification", + key_just = "legend.key.just", text = "legend.text", theme.title = "legend.title", spacing_x = "legend.key.spacing.x", diff --git a/R/guides-.R b/R/guides-.R index fa50f5a79d..b67dcb76f2 100644 --- a/R/guides-.R +++ b/R/guides-.R @@ -500,7 +500,7 @@ Guides <- ggproto( } # prepare the position of inside legends - default_inside_just <- calc_element("legend.justification.inside", theme) + default_inside_just <- calc_element("legend.just.inside", theme) default_inside_position <- calc_element("legend.position.inside", theme) groups <- data_frame0( @@ -514,9 +514,9 @@ Guides <- ggproto( for (i in which(positions == "inside")) { # the actual inside position and justification can be set in each guide # by `theme` argument, here, we won't use `calc_element()` which will - # use inherits from `legend.justification` or `legend.position`, we only + # use inherits from `legend.just` or `legend.position`, we only # follow the inside elements from the guide theme - just <- params[[i]]$theme[["legend.justification.inside"]] + just <- params[[i]]$theme[["legend.just.inside"]] just <- valid.just(just %||% default_inside_just) coord <- params[[i]]$theme[["legend.position.inside"]] coord <- coord %||% default_inside_position %||% just @@ -541,7 +541,7 @@ Guides <- ggproto( if (position == "inside") { adjust <- theme( legend.position.inside = groups$key$coords[[i]], - legend.justification.inside = groups$key$justs[[i]] + legend.just.inside = groups$key$justs[[i]] ) } adjust <- add_theme(theme, adjust, "internal theme settings") @@ -615,7 +615,7 @@ Guides <- ggproto( stretch_y <- any(unlist(lapply(heights, unitType)) == "null") # Global justification of the complete legend box - global_just <- paste0("legend.justification.", position) + global_just <- paste0("legend.just.", position) global_just <- valid.just(calc_element(global_just, theme)) if (position == "inside") { diff --git a/R/theme-defaults.R b/R/theme-defaults.R index bc91ba8520..bd8d098e19 100644 --- a/R/theme-defaults.R +++ b/R/theme-defaults.R @@ -218,7 +218,7 @@ theme_grey <- function(base_size = 11, base_family = "", legend.ticks.length = rel(0.2), legend.position = "right", legend.direction = NULL, - legend.justification = "center", + legend.just = "center", legend.box = NULL, legend.box.margin = margin_auto(0), legend.box.background = element_blank(), @@ -707,7 +707,7 @@ theme_test <- function(base_size = 11, base_family = "", legend.ticks.length = rel(0.2), legend.position = "right", legend.direction = NULL, - legend.justification = "center", + legend.just = "center", legend.box = NULL, legend.box.margin = margin_auto(0, unit = "cm"), legend.box.background = element_blank(), diff --git a/R/theme-sub.R b/R/theme-sub.R index 72a60ebf72..a7f4c347c4 100644 --- a/R/theme-sub.R +++ b/R/theme-sub.R @@ -105,7 +105,7 @@ theme_sub_legend <- function( spacing, spacing.x, spacing.y, margin, # Seys key, key.size, key.height, key.width, key.spacing, key.spacing.x, - key.spacing.y, key.justification, + key.spacing.y, key.just, # Settings byrow, position, direction, location, position.inside, # Justification diff --git a/tests/testthat/_snaps/theme.md b/tests/testthat/_snaps/theme.md index 180e0563a1..9dd2d9b150 100644 --- a/tests/testthat/_snaps/theme.md +++ b/tests/testthat/_snaps/theme.md @@ -150,6 +150,9 @@ [17] "axis.minor.ticks.r" "axis.ticks.length.theta" [19] "axis.ticks.length.r" "axis.minor.ticks.length.theta" [21] "axis.minor.ticks.length.r" "axis.line.theta" - [23] "axis.line.r" "complete" - [25] "validate" + [23] "axis.line.r" "legend.just" + [25] "legend.just.top" "legend.just.bottom" + [27] "legend.just.left" "legend.just.right" + [29] "legend.just.inside" "complete" + [31] "validate" diff --git a/tests/testthat/test-guide-legend.R b/tests/testthat/test-guide-legend.R index 2dd68fe01b..da05102dc1 100644 --- a/tests/testthat/test-guide-legend.R +++ b/tests/testthat/test-guide-legend.R @@ -186,7 +186,7 @@ test_that("absent titles don't take up space", { legend.title = element_blank(), legend.margin = margin(), legend.position = "top", - legend.justification = "left", + legend.just = "left", legend.key = element_rect(colour = "black"), axis.line = element_line(colour = "black") ) @@ -221,7 +221,7 @@ test_that("legend.byrow works in `guide_legend()`", { expect_doppelganger("legend.byrow = TRUE", p) }) -test_that("legend.key.justification works as intended", { +test_that("legend.key.just works as intended", { p <- ggplot(mtcars, aes(mpg, disp, colour = factor(cyl), size = drat)) + geom_point() + @@ -231,7 +231,7 @@ test_that("legend.key.justification works as intended", { scale_colour_discrete( labels = c("one line", "up\nto\nfour\nlines", "up\nto\nfive\nwhole\nlines") ) + - theme(legend.key.justification = c(1, 0)) + theme(legend.key.just = c(1, 0)) expect_doppelganger("legend key justification", p) diff --git a/tests/testthat/test-guides.R b/tests/testthat/test-guides.R index ae1bfe85bd..3f83b22d9d 100644 --- a/tests/testthat/test-guides.R +++ b/tests/testthat/test-guides.R @@ -274,13 +274,13 @@ test_that("guides are positioned correctly", { p2 + theme(legend.position.inside = c(0.5, 0.5)) ) expect_doppelganger("legend inside plot, bottom left", - p2 + theme(legend.justification = c(0,0), legend.position.inside = c(0,0)) + p2 + theme(legend.just = c(0,0), legend.position.inside = c(0,0)) ) expect_doppelganger("legend inside plot, top right", - p2 + theme(legend.justification = c(1,1), legend.position.inside = c(1,1)) + p2 + theme(legend.just = c(1,1), legend.position.inside = c(1,1)) ) expect_doppelganger("legend inside plot, bottom left of legend at center", - p2 + theme(legend.justification = c(0,0), legend.position.inside = c(0.5,0.5)) + p2 + theme(legend.just = c(0,0), legend.position.inside = c(0.5,0.5)) ) expect_doppelganger("legend inside plot, multiple positions", p2 + @@ -289,14 +289,14 @@ test_that("guides are positioned correctly", { position = "inside", theme = theme( legend.position.inside = c(0, 1), - legend.justification.inside = c(0, 1) + legend.just.inside = c(0, 1) ) ), fill = guide_legend( position = "inside", theme = theme( legend.position.inside = c(1, 0), - legend.justification.inside = c(1, 0) + legend.just.inside = c(1, 0) ) ) ) diff --git a/tests/testthat/test-theme.R b/tests/testthat/test-theme.R index 3f3fb9eeb9..1854141550 100644 --- a/tests/testthat/test-theme.R +++ b/tests/testthat/test-theme.R @@ -1026,11 +1026,11 @@ test_that("Legends can on all sides of the plot with custom justification", { ) + theme_test() + theme( - legend.justification.top = "left", - legend.justification.bottom = c(1, 0), - legend.justification.left = c(0, 1), - legend.justification.right = "bottom", - legend.justification.inside = c(0.75, 0.75), + legend.just.top = "left", + legend.just.bottom = c(1, 0), + legend.just.left = c(0, 1), + legend.just.right = "bottom", + legend.just.inside = c(0.75, 0.75), legend.location = "plot" ) From 46753a5130594c212909b6910ff6aff65505e2d5 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Fri, 26 Sep 2025 11:11:58 +0200 Subject: [PATCH 6/6] redocument --- man/guide_bins.Rd | 2 +- man/guide_colourbar.Rd | 2 +- man/guide_coloursteps.Rd | 2 +- man/guide_custom.Rd | 2 +- man/guide_legend.Rd | 2 +- man/subtheme.Rd | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/man/guide_bins.Rd b/man/guide_bins.Rd index da37012904..e3cae4df38 100644 --- a/man/guide_bins.Rd +++ b/man/guide_bins.Rd @@ -29,7 +29,7 @@ guide partially overrides, and is combined with, the plot's theme. Arguments that apply to a single legend are respected, most of which have the \code{legend}-prefix. Arguments that apply to combined legends (the legend box) are ignored, including \code{legend.position}, -\verb{legend.justification.*}, \code{legend.location} and \verb{legend.box.*}.} +\verb{legend.just.*}, \code{legend.location} and \verb{legend.box.*}.} \item{angle}{Overrules the theme settings to automatically apply appropriate \code{hjust} and \code{vjust} for angled legend text. Can be a single number diff --git a/man/guide_colourbar.Rd b/man/guide_colourbar.Rd index 1eced43c34..8eb1607a39 100644 --- a/man/guide_colourbar.Rd +++ b/man/guide_colourbar.Rd @@ -53,7 +53,7 @@ guide partially overrides, and is combined with, the plot's theme. Arguments that apply to a single legend are respected, most of which have the \code{legend}-prefix. Arguments that apply to combined legends (the legend box) are ignored, including \code{legend.position}, -\verb{legend.justification.*}, \code{legend.location} and \verb{legend.box.*}.} +\verb{legend.just.*}, \code{legend.location} and \verb{legend.box.*}.} \item{nbin}{A numeric specifying the number of bins for drawing the colourbar. A smoother colourbar results from a larger value.} diff --git a/man/guide_coloursteps.Rd b/man/guide_coloursteps.Rd index dc8ba71c78..082177e256 100644 --- a/man/guide_coloursteps.Rd +++ b/man/guide_coloursteps.Rd @@ -47,7 +47,7 @@ guide partially overrides, and is combined with, the plot's theme. Arguments that apply to a single legend are respected, most of which have the \code{legend}-prefix. Arguments that apply to combined legends (the legend box) are ignored, including \code{legend.position}, -\verb{legend.justification.*}, \code{legend.location} and \verb{legend.box.*}.} +\verb{legend.just.*}, \code{legend.location} and \verb{legend.box.*}.} \item{alpha}{A numeric between 0 and 1 setting the colour transparency of the bar. Use \code{NA} to preserve the alpha encoded in the colour itself diff --git a/man/guide_custom.Rd b/man/guide_custom.Rd index 2fa55193c4..344809f4b7 100644 --- a/man/guide_custom.Rd +++ b/man/guide_custom.Rd @@ -29,7 +29,7 @@ guide partially overrides, and is combined with, the plot's theme. Arguments that apply to a single legend are respected, most of which have the \code{legend}-prefix. Arguments that apply to combined legends (the legend box) are ignored, including \code{legend.position}, -\verb{legend.justification.*}, \code{legend.location} and \verb{legend.box.*}.} +\verb{legend.just.*}, \code{legend.location} and \verb{legend.box.*}.} \item{position}{A character string indicating where the legend should be placed relative to the plot panels. diff --git a/man/guide_legend.Rd b/man/guide_legend.Rd index e56efb0aff..b4eda39c4d 100644 --- a/man/guide_legend.Rd +++ b/man/guide_legend.Rd @@ -29,7 +29,7 @@ guide partially overrides, and is combined with, the plot's theme. Arguments that apply to a single legend are respected, most of which have the \code{legend}-prefix. Arguments that apply to combined legends (the legend box) are ignored, including \code{legend.position}, -\verb{legend.justification.*}, \code{legend.location} and \verb{legend.box.*}.} +\verb{legend.just.*}, \code{legend.location} and \verb{legend.box.*}.} \item{position}{A character string indicating where the legend should be placed relative to the plot panels. diff --git a/man/subtheme.Rd b/man/subtheme.Rd index c79c5b1e25..0d7ea41dbc 100644 --- a/man/subtheme.Rd +++ b/man/subtheme.Rd @@ -82,7 +82,7 @@ theme_sub_legend( key.spacing, key.spacing.x, key.spacing.y, - key.justification, + key.just, byrow, position, direction, @@ -150,7 +150,7 @@ theme_sub_strip( ) } \arguments{ -\item{axis.line, background, background.x, background.y, border, box, box.background, box.just, box.margin, box.spacing, byrow, caption, caption.position, clip, direction, frame, grid, grid.major, grid.major.x, grid.major.y, grid.minor, grid.minor.x, grid.minor.y, heights, justification, justification.bottom, justification.inside, justification.left, justification.right, justification.top, key, key.height, key.justification, key.size, key.spacing, key.spacing.x, key.spacing.y, key.width, line, location, margin, minor.ticks, minor.ticks.length, ontop, placement, position, position.inside, spacing, spacing.x, spacing.y, subtitle, switch.pad.grid, switch.pad.wrap, tag, tag.location, tag.position, text, text.position, text.x, text.x.bottom, text.x.top, text.y, text.y.left, text.y.right, ticks, ticks.length, title, title.position, widths}{Arguments that are renamed and passed on to \code{\link[=theme]{theme()}}.} +\item{axis.line, background, background.x, background.y, border, box, box.background, box.just, box.margin, box.spacing, byrow, caption, caption.position, clip, direction, frame, grid, grid.major, grid.major.x, grid.major.y, grid.minor, grid.minor.x, grid.minor.y, heights, justification, justification.bottom, justification.inside, justification.left, justification.right, justification.top, key, key.height, key.just, key.size, key.spacing, key.spacing.x, key.spacing.y, key.width, line, location, margin, minor.ticks, minor.ticks.length, ontop, placement, position, position.inside, spacing, spacing.x, spacing.y, subtitle, switch.pad.grid, switch.pad.wrap, tag, tag.location, tag.position, text, text.position, text.x, text.x.bottom, text.x.top, text.y, text.y.left, text.y.right, ticks, ticks.length, title, title.position, widths}{Arguments that are renamed and passed on to \code{\link[=theme]{theme()}}.} } \value{ A \code{theme}-class object that can be added to a plot.