Draw thematic map. If the tmap mode is set to "plot"
(see tmap_mode
), the map is plot in the current graphics device. If the mode is set to "view"
, the map is shown interactively as an htmlwidget.
# S3 method for tmap
print(
x,
vp = NULL,
return.asp = FALSE,
mode = getOption("tmap.mode"),
show = TRUE,
knit = FALSE,
options = NULL,
...
)knit_print.tmap(x, ..., options = NULL)
tmap object. A tmap object is created with qtm
or by stacking tmap-element
s.
viewport
to draw the plot in. This is particularly useful for insets.
Logical that determines whether the aspect ratio of the map is returned. In that case, grid.newpage()
will be called, but without plotting of the map. This is used by tmap_save
to determine the aspect ratio of the map.
the mode of tmap: "plot"
(static) or "view"
(interactive). See tmap_mode
for details.
logical that determines whether to show to map. Obviously TRUE
by default, but show=FALSE
can be useful for just obtaining the returned objects.
should knit_print
be enabled, or the normal print
function?
options passed on to knitprint
not used
If mode=="plot"
, then a list is returned with the processed shapes and the metadata. If mode=="view"
, a leaflet
object is returned (see also tmap_leaflet
)