Rounded legends for SOmap
SOleg(
x = NULL,
position = "topright",
col = NULL,
ticks = NULL,
tlabs = NULL,
breaks = NULL,
trim = -45,
type = "discrete",
label = "",
ladj = 0.5,
lsrt = 0,
lcex = 0.75,
tadj = 0.5,
tcex = 1,
rnd = NULL,
border_width = 2
)
numeric: object to obtain min and max values from for type = "continuous"
.
string: where you want the legend ("topleft", "topright", "bottomleft", or "bottomright").
character: colours to use.
numeric: number of ticks to include on the legend. Only used with type = "continuous"
.
character: tick labels. Required for type = "discrete"
, optional for type = "continuous"
if x
is given.
numeric: vector of tick positions for type = "continuous"
when x
is given.
numeric: trim
value that was used to create the SOmap object (see SOmap
).
string: type of legend ("discrete" or "continuous").
string: legend label.
numeric: distance to adjust the tick labels from the ticks.
numeric: angle of the tick labels.
numeric: size of the tick labels.
numeric: distance to adjust the title from the ticks.
numeric: size of the title text.
numeric: optional rounding factor for continuous legends using the link{round}
function.
numeric: thickness (in degrees of latitude) of the border.
An object of class "SOmap_legend". Printing or plotting this object will cause it to be added to the SOmap in the current graphics device.
if (FALSE) { # \dontrun{
SOmap()
## Discrete Legend
SOleg(position = "topleft", col = hcl.colors(5, "Viridis"),
tlabs = c("a", "b", "c", "d", "e"), trim = -45, label = "Species")
## Continuous Legend
SOleg(x = runif(100), position = "topright", col = hcl.colors(80, "Viridis"),
breaks = c(0.1, 0.2, 0.5, 0.9), trim = -45, label = "Species",
rnd = 1, type = "continuous")
} # }