Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/r-tmap/tmap
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Apr 26, 2024
2 parents fa7c6e5 + 078191d commit 6162aa3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions R/qtm.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#' plain interactive map is shown positioned according to the results of the
#' search query (from OpenStreetMap nominatim)
#' @param fill,col,size,shape,lwd,lty,fill_alpha,col_alpha Visual variables.
#' @param text,text_col,text_size Visual variables.
#' @param by data variable name by which the data is split, or a vector of two
#' variable names to split the data by two variables (where the first is used
#' for the rows and the second for the columns). See also [tm_facets()].
Expand Down
7 changes: 4 additions & 3 deletions examples/tm_symbols.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ tm_shape(land) +
## plot symbol shapes
########################

# create grid of 25 points in the Athlantic
# create grid of 25 points in the Atlantic
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)
atlantic_grid = cbind(expand.grid(x = -51:-47, y = 20:24), id = seq_len(25))
x = st_as_sf(atlantic_grid, coords = c("x", "y"), crs = 4326)

tm_shape(x, bbox = bb(x, ext = 1.2)) +
tm_shape(x, bbox = tmaptools::bb(x, ext = 1.2)) +
tm_symbols(shape = "id",
size = 2,
lwd = 2,
Expand Down
2 changes: 2 additions & 0 deletions man/qtm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/tm_symbols.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-v3.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ test_that("v3 syntax works", {
skip_on_cran()


expect_warning(tm_shape(World) + tm_fill("darkolivegreen3") + tm_format("World", title = "A green World"))
expect_warning(tm_shape(World) + tm_polygons(fill = "darkolivegreen3", col = NA) + tm_format("World", title = "A green World"))
expect_message(tm_shape(World) + tm_fill("darkolivegreen3") + tm_format("World", title = "A green World"))
expect_message(tm_shape(World) + tm_polygons(fill = "darkolivegreen3", col = NA) + tm_format("World", title = "A green World"))


# Data variable containing color values
Expand Down

0 comments on commit 6162aa3

Please sign in to comment.