map.scale: map.scale

map.scaleR Documentation

map.scale

Description

Draws a scale bar on a map.

Usage

map.scale(xc,yc,len,units,ndivs,subdiv=1,tcol='black',scol='black',sfcol='black')

Arguments

xc

The x-centre (in map units) of the scale bar

yc

The y-centre (in map units) of the scale bar

len

The length (in map units) of the scale bar

units

String specifying the name of the units for the scale bar

ndivs

The number of divisions (units marked) on the scale

subdiv

The fraction of units used to step along the divisions

tcol

The colour of text on the scale bar.

scol

The colour of the scale bar itself.

sfcol

The colour of the filled rectangles in the scale bar.

Details

Draws an alternating bar scale on a map. Returns no value.

Value

None (see above)

Author(s)

Chris Brunsdon

See Also

choro.legend

Examples

# Read in map data for New Haven
data(newhaven)
# Plot census block boundaries
plot(blocks)
# Add a map scale
map.scale(534750,152000,miles2ft(2),"Miles",4,0.5,sfcol='red')
# ... and a title
title('New Haven (CT)')

GISTools documentation built on Oct. 3, 2024, 1:08 a.m.