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.
Arguments
- x
tmap object. A tmap object is created with
qtm
or by stackingtmap-element
s.- vp
viewport
to draw the plot in. This is particularly useful for insets.- return.asp
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 bytmap_save
to determine the aspect ratio of the map.- mode
the mode of tmap:
"plot"
(static) or"view"
(interactive). Seetmap_mode
for details.- show
logical that determines whether to show to map. Obviously
TRUE
by default, butshow=FALSE
can be useful for just obtaining the returned objects.- knit
should
knit_print
be enabled, or the normalprint
function?- options
options passed on to knitprint
- ...
not used
Value
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
)