Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tmap_grob

Export to grob object


Description

Export a tmap plot object to a grob object (from the grid package).

Usage

tmap_grob(tm)

Arguments

tm

tmap object

Value

A grob object when one page is generated, or a list of grob objects when multiple pages are generated.

Examples

## Not run: 
	
data(World)
m <- tm_shape(World) +
	tm_fill("well_being", id="name", title="Well-being")

grb = tmap_grob(m)

library(grid)

grid.newpage()
pushViewport(viewport(x = 0.1, y = 0.1, width = 0.2, height = 0.2))
grid.draw(grb)
upViewport()
pushViewport(viewport(x = 0.6, y = 0.6, width = 0.8, height = 0.8))
grid.draw(grb)
	

## End(Not run)

tmap

Thematic Maps

v3.3-1
GPL-3
Authors
Martijn Tennekes [aut, cre], Jakub Nowosad [ctb], Joel Gombin [ctb], Sebastian Jeworutzki [ctb], Kent Russell [ctb], Richard Zijdeman [ctb], John Clouse [ctb], Robin Lovelace [ctb], Jannes Muenchow [ctb]
Initial release
2021-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.