Learn R Programming

cartography (version 1.3.0)

legendPropLines: Legend for Proportional Lines Maps

Description

Plot legend for proportional lines maps

Usage

legendPropLines(pos = "topleft", title.txt = "Title of the legend", title.cex = 0.8, cex = 1, values.cex = 0.6, var, lwd, col = "red", frame = FALSE, values.rnd = 0)

Arguments

pos
position of the legend, one of "topleft", "top", "topright", "left", "right", "bottomleft", "bottom", "bottomright".
title.txt
title of the legend.
title.cex
size of the legend title.
cex
size of the legend. 2 means two times bigger.
values.cex
size of the values in the legend.
var
vector of values.
lwd
a vector giving the width of the lines.
col
color of symbols.
frame
whether to add a frame to the legend (TRUE) or not (FALSE).
values.rnd
number of decimal places of the values in the legend.

Examples

Run this code
data("nuts2006")
plot(nuts0.spdf)
box()
legendPropLines(pos = "topleft", title.txt = "Title",
                title.cex = 0.8, values.cex = 0.6, cex = 2,
                var = nuts1.df$pop2008,
                lwd = nuts1.df$pop2008/1000000,
                col="red", frame=TRUE, values.rnd=2)

Run the code above in your browser using DataLab