mf_legend_t: Plot a legend for a typology map

View source: R/mf_leg_t.R

mf_legend_tR Documentation

Plot a legend for a typology map

Description

Deprecated.

This function plots a legend for a typology map.

Usage

mf_legend_t(
  pos = "topright",
  val,
  pal,
  title = "Legend Title",
  title_cex = 0.8,
  val_cex = 0.6,
  col_na = "white",
  no_data = FALSE,
  no_data_txt = "No Data",
  frame = FALSE,
  border,
  bg,
  fg,
  cex = 1
)

Arguments

pos

position of the legend, one of "topleft", "top", "topright", "right", "bottomright", "bottom", "bottomleft", "left", "interactive" or a vector of two coordinates in map units (c(x, y)).

val

vector of categories.

pal

a set of colors

title

title of the legend

title_cex

size of the legend title

val_cex

size of the values in the legend

col_na

color for missing values

no_data

if TRUE a "missing value" box is plotted

no_data_txt

label for missing values.

frame

whether to add a frame to the legend (TRUE) or not (FALSE)

border

color of the boxes' borders

bg

background of the legend

fg

foreground of the legend

cex

size of the legend; 2 means two times bigger

Value

No return value, a legend is displayed.

Examples

## Not run: 
plot.new()
plot.window(xlim = c(0, 1), ylim = c(0, 1), asp = 1)
mf_legend_t(val = c("type A", "type B"), pal = c("navy", "tomato"))

## End(Not run)

mapsf documentation built on Nov. 21, 2023, 5:09 p.m.