50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


phenology (version 4.0.4)

map.scale2: Add Scale to Existing Unprojected Map

Description

Adds a scale to an existing map, both as a ratio and a distance gauge. If x or y are not specified, this will be taken to be near the lower left corner of the map.

Usage

map.scale2(x, y, relwidth = 0.15, metric = TRUE, ratio = TRUE,
  col.line = "black", ...)

Arguments

x
Location of left end of distance gauge.
y
Location of left end of distance gauge.
relwidth
Proportion of width of display to be used for the scale. The default is 0.15.
metric
If TRUE, the distance gauge will be in km, otherwise miles.
ratio
If FALSE, the scale ratio of the map is not displayed.
col.line
The color of lines for the gauge.
...
Further plotting parameters may be specified as for the command text().

Value

  • The exact calculated scale is returned.

Details

map.scale2 Add Scale to Existing Unprojected Map

Examples

Run this code
library("maps")
library("phenology")
map("world", "China")
map.scale2(col.line = "red", col="blue")

Run the code above in your browser using DataLab