From 9c7c410785743140062d517ce2ef8c21fb9bb55f Mon Sep 17 00:00:00 2001 From: mtennekes Date: Thu, 25 Apr 2024 15:38:06 +0200 Subject: [PATCH] tm_layout unnamed title message added --- R/tm_layout.R | 5 +++++ examples/tm_symbols.R | 2 +- man/tm_symbols.Rd | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/R/tm_layout.R b/R/tm_layout.R index d618c917..181b2004 100644 --- a/R/tm_layout.R +++ b/R/tm_layout.R @@ -88,6 +88,11 @@ tm_layout = function( ) { args = lapply(as.list(match.call()[-1]), eval, envir = parent.frame()) + if (!missing(modes) && is.character(modes)) { + title = modes + args$modes = NULL + } + if (!is.null(title) || (!is.null(main.title))) { title1 = if (!is.null(title)) { title.args = args[substr(names(args), 1, 5) == "title"] diff --git a/examples/tm_symbols.R b/examples/tm_symbols.R index cd671ab9..84c48c17 100644 --- a/examples/tm_symbols.R +++ b/examples/tm_symbols.R @@ -34,7 +34,7 @@ tm_shape(land) + library(sf) x = st_as_sf(cbind(expand.grid(x = -51:-47, y = 20:24), id = seq_len(25)), coords = c("x", "y"), crs = 4326) -tm_shape(x, bbox = bb(x, ext = 1.1)) + +tm_shape(x, bbox = bb(x, ext = 1.2)) + tm_symbols(shape = "id", size = 2, lwd = 2, diff --git a/man/tm_symbols.Rd b/man/tm_symbols.Rd index 64e34622..d63668e5 100644 --- a/man/tm_symbols.Rd +++ b/man/tm_symbols.Rd @@ -337,7 +337,7 @@ tm_shape(land) + library(sf) x = st_as_sf(cbind(expand.grid(x = -51:-47, y = 20:24), id = seq_len(25)), coords = c("x", "y"), crs = 4326) -tm_shape(x, bbox = bb(x, ext = 1.1)) + +tm_shape(x, bbox = bb(x, ext = 1.2)) + tm_symbols(shape = "id", size = 2, lwd = 2,