Skip to content

Commit

Permalink
corrections last_tmap to `tmap_last() + pkg width overflow and links.
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Sep 19, 2023
1 parent 2dcb3e7 commit 612e44a
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
- added popup.vars to base layer functions
- bounding box (argument bbox in tm_shape) working in view mode
- geocode_OSM improved: a SpatialPointsDataFrame can now be returned
- last_map added, which retrieves the last produced map
- `tmap_last()` added, which retrieves the last produced map
- crop_shape can also handle polygons as cropping area
- append_data improved; the under and over coverage information can be retrieved with under_coverage and over_coverage
- interpolate parameter added to tm_rasters
Expand Down
36 changes: 18 additions & 18 deletions R/pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#' @section Quick plotting method:
#' \tabular{ll}{
#' [qtm()]\tab Plot a thematic map \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' @section Main plotting method:
#' Shape specification:
#' \tabular{ll}{
#' [tm_shape()]\tab Specify a shape object \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Aesthetics base layers:
Expand All @@ -38,13 +38,13 @@
#' [tm_markers()]\tab Create a layer of markers \cr
#' [tm_iso()]\tab Create a layer of iso/contour lines \cr
#' [tm_rgb()]\tab Create a raster layer of an image \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Faceting (small multiples)
#' \tabular{ll}{
#' [tm_facets()]\tab Define facets \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Attributes:
Expand All @@ -54,9 +54,9 @@
#' [tm_compass()]\tab Create a map compass \cr
#' [tm_credits()]\tab Create a text for credits \cr
#' [tm_logo()]\tab Create a logo \cr
#' `[tm_xlab] and [tm_ylab]`\tab Create axis labels \cr
#' [tm_xlab()] and [tm_ylab()]\tab Create axis labels \cr
#' [tm_minimap()]\tab Create a minimap (view mode only) \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Layout element:
Expand All @@ -66,7 +66,7 @@
#' [tm_view()]\tab Configure the interactive view mode \cr
#' [tm_style()]\tab Apply a predefined style \cr
#' [tm_format()]\tab Apply a predefined format \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Change options:
Expand All @@ -75,13 +75,13 @@
#' [ttm()]\tab Toggle between the modes \cr
#' [tmap_options()]\tab Set global tmap options (from [tm_layout()], [tm_view()], and a couple of others) \cr
#' [tmap_style()]\tab Set the default style \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' Create icons:
#' \tabular{ll}{
#' [tmap_icons()]\tab Specify icons for markers or proportional symbols \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#'
Expand All @@ -93,18 +93,18 @@
#' [tmap_animation()]\tab Create an animation \cr
#' [tmap_arrange()]\tab Create small multiples of separate maps \cr
#' [tmap_save()]\tab Save thematic maps (either as image or HTML file) \cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' @section Spatial datasets:
#' \tabular{ll}{
#' [World()]\tab World country data ([`sf`][`sf::sf`] object of polygons) \cr
#' [NLD_prov()]\tab Netherlands province data ([`sf`][`sf::sf`] object of polygons) \cr
#' [NLD_muni()]\tab Netherlands municipal data ([`sf`][`sf::sf`] object of polygons) \cr
#' [metro()]\tab Metropolitan areas ([`sf`][`sf::sf`] object of points) \cr
#' [rivers()]\tab Rivers ([`sf`][`sf::sf`] object of lines) \cr
#' [land()]\tab Global land cover ([`stars`][stars::st_as_stars()] object)\cr
#' --------------------------- \tab --------------------------------------------------------------------------------------------------- \cr
#' [`World`]\tab World country data ([`sf`][`sf::sf`] object of polygons) \cr
#' [`NLD_prov`]\tab Netherlands province data ([`sf`][`sf::sf`] object of polygons) \cr
#' [`NLD_muni`]\tab Netherlands municipal data ([`sf`][`sf::sf`] object of polygons) \cr
#' [`metro`]\tab Metropolitan areas ([`sf`][`sf::sf`] object of points) \cr
#' [`rivers`]\tab Rivers ([`sf`][`sf::sf`] object of lines) \cr
#' [`land`]\tab Global land cover ([`stars`][stars::st_as_stars()] object)\cr
#' --------------------------- \tab ------------------------------------------- \cr
#' }
#'
#' @author Martijn Tennekes \email{mtennekes@@gmail.com}
Expand All @@ -113,6 +113,6 @@
#' @concept statistical maps
#' @concept choropleth
#' @concept bubble map
#' @seealso `vignette("tmap_sneek_peek")`
#' @seealso `vignette("tmap_sneek_peek")`, <https://r-tmap.github.io/tmap/>
#' @references Tennekes, M., 2018, {tmap}: Thematic Maps in {R}, Journal of Statistical Software, 84(6), 1-39, \doi{10.18637/jss.v084.i06}
"_PACKAGE"
2 changes: 1 addition & 1 deletion R/tm_element.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tm_element_list_sel = function(tml, subclass) {

#' Retrieve the last map to be modified or created
#'
#' Retrieve the last map to be modified or created. Works in the same way as [ggplot2::last_plot()], although there is a difference: `last_map()` returns the last call instead of the stacked [`tmap-element`]s.
#' Retrieve the last map to be modified or created. Works in the same way as [ggplot2::last_plot()], although there is a difference: `tmap_last()` returns the last call instead of the stacked [`tmap-element`]s.
#'
#' @return call
#' @export
Expand Down
2 changes: 1 addition & 1 deletion demo/tutorials/legend_and_attributes_placement.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ map + tm_layout(legend.position=c("center", "center"),
# the normal position argument legend.position (together with legend.just) controls the position of the legend within the extra viewport

# print this map in normal mode:
last_map() + tm_layout(design.mode=FALSE)
tmap_last() + tm_layout(design.mode=FALSE)


# map attributes are controlled in a similar way
Expand Down
36 changes: 18 additions & 18 deletions man/tmap-package.Rd

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

2 changes: 1 addition & 1 deletion man/tmap_last.Rd

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

0 comments on commit 612e44a

Please sign in to comment.