inst/tinytest/test_layoutLayer.R

library(sf)
library(sp)
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="cartography"), quiet = TRUE)
plot(st_geometry(mtq))
expect_silent(layoutLayer())
plot(st_geometry(mtq))
expect_silent(layoutLayer(tabtitle=TRUE, postitle = "right", south = TRUE))
expect_silent(layoutLayer(tabtitle = TRUE, postitle = "center", north = TRUE, 
                          theme = "blue.pal", extent = mtq))
expect_silent(layoutLayer(tabtitle = TRUE, postitle = "center", north = TRUE, 
                          theme = "blue.pal", extent = as(mtq, "Spatial")))
expect_silent(layoutLayer(scale=5, horiz = FALSE, author="    AUTHOR"))

Try the cartography package in your browser

Any scripts or data that you put into this service are public.

cartography documentation built on Sept. 14, 2023, 5:08 p.m.