Deprecated.
This function plots a legend for a choropleth map.
mf_legend_c(
pos = "topleft",
val,
pal,
title = "Legend Title",
title_cex = 0.8,
val_cex = 0.6,
val_rnd = 2,
col_na = "white",
no_data = FALSE,
no_data_txt = "No Data",
frame = FALSE,
border,
bg,
fg,
cex = 1
)
No return value, a legend is displayed.
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))
break labels
a set of colors.
title of the legend
size of the legend title
size of the values in the legend
number of decimal places of the values in the legend.
color for missing values
if TRUE a "missing value" box is plotted
label for missing values
whether to add a frame to the legend (TRUE) or not (FALSE)
color of the boxes' borders
background of the legend
foreground of the legend
size of the legend; 2 means two times bigger
if (FALSE) {
plot.new()
plot.window(xlim = c(0, 1), ylim = c(0, 1), asp = 1)
mf_legend_c(val = c(1, 2, 3, 4), pal = c("red1", "red3", "red4"))
}
Run the code above in your browser using DataLab