Map component that adds a manual legend
Usage
tm_add_legend(
...,
labels,
type = "symbols",
title = "",
design = NULL,
orientation = NULL,
group = NA,
group.control = "check",
resize.as.group = FALSE,
z = NA_integer_
)
Arguments
- ...
visual variables and arguments passed on to
tm_legend()
. By default, the argumenttype
is set to"Symbols"
, which means that the supported visual variables are:"fill"
,"col"
,"shape"
,"size"
,"fill_alpha"
,"col_alpha"
,"lty"
,"lwd"
,"linejoin"
, and"lineend"
.- labels
labels
- type
the layer type from which the visual variables (see
...
) are taken. Options:"symbols"
(default),"lines"
,"polygons"
, and"text"
.- title
text of the title
- design
legend design
- orientation
legend orientation
- group
Name of the group to which this layer belongs. This is only relevant in view mode, where layer groups can be switched (see
group.control
)- group.control
In view mode, the group control determines how layer groups can be switched on and off. Options:
"radio"
for radio buttons (meaning only one group can be shown),"check"
for check boxes (so multiple groups can be shown), and"none"
for no control (the group cannot be (de)selected).- resize.as.group
resize.as.group
- z
z