RiverScale: River Chart Scale

Description Usage Arguments Author(s) See Also Examples

View source: R/RiverScale.R

Description

This plots the scale of river charts.

Usage

1
2
RiverScale(length, label, riverlayout, loc = NA, scl.col = "black",
  scl.lwd = 1, lbl.cex = 0.5, lbl.pos = 4, lbl.ofs = 0.5)

Arguments

length

the length of the scale. The length is defined in the same units as the river length. The function will convert this real length into a segment with the same scale as the rivers, and plot it on the river chart.

label

a string defining a scale label indicating the real length the scale segment represents.

riverlayout

the output list of RiverLayout or RiverMap.

loc

location of scale. One or two values in the range [0, 1] to define left and bottom margin sizes. If loc = NA, use mouse to locate the arrow. ESC to confirm.

scl.col

scale colour.

scl.lwd

scale line width.

lbl.cex

scale label size.

lbl.pos

scale label position. 1 for below, 2 for left, 3 for above, and 4 for right. See par for details.

lbl.ofs

scale label position offset.

Author(s)

Feng Mao

See Also

RiverLayout, RiverDraw, RiverMap, par, locator.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(Ballinderry)

riverlayout <- RiverLayout(B.river$River,B.river$Length,
                           B.river$Parent,B.river$Position,
                           B.river$Distance, direction = -1)
RiverDraw(riverlayout)

RiverScale(2, "2 km", riverlayout, loc = c(0.8, 0.10),lbl.cex = 0.8)

# Use mouse to allocate the river scale
## RiverScale(2, "2 km", riverlayout, lbl.cex = 0.8)

rivervis documentation built on May 1, 2019, 7:28 p.m.