newmap.scale | R Documentation |
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.
newmap.scale(
x,
y,
relwidth = 0.15,
metric = TRUE,
ratio = TRUE,
col.line = "black",
...
)
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(). |
newmap.scale Add Scale to Existing Unprojected Map
The exact calculated scale is returned.
See maps::map.scale()
.
## Not run:
library("maps")
library("HelpersMG")
map("world", "China")
newmap.scale(col.line = "red", col="blue")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.