RiverBar: River Bar-Chart

Description Usage Arguments Author(s) See Also Examples

View source: R/RiverBar.R

Description

This plots bars for quantitative data on the river chart.

Usage

1
2
3
4
RiverBar(site, river, distance, value, riverlayout, range = NA, bar.w = 1,
  bar.col = NA, bd.col = "black", lbl.cex = 0.7, lbl.adj = c(0.5, 2),
  lbl.ofs = 0.5, lbl.col = "black", lbl.srt = 0, lbl.pos = NULL,
  lbl.shw = TRUE, pt.shw = FALSE)

Arguments

site

a character vector of site names.

river

a vector of rivers on which the sites are located.

distance

a vector. The along-the-river distances between the sites and the mouth of the river.

value

a data frame containing the variables to be shown on the bar-chart.

riverlayout

the output list of RiverLayout or RiverMap.

range

bar-chart value range. A vector of two values indicating lower limit and upper limit.

bar.w

relative width of each bar plotted in the diagram. The default value is 1.

bar.col

bar colour.

bd.col

bar border colour.

lbl.cex

label size.

lbl.adj

label adjustment. One or two values in [0,1] for x and y (optional) adjustment.

lbl.ofs

label position offset.

lbl.col

label colour.

lbl.srt

label angle.

lbl.pos

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

lbl.shw

show labels (TRUE) or not (FALSE).

pt.shw

show location point (TRUE) or not (FALSE).

Author(s)

Feng Mao

See Also

RiverLayout, RiverDraw, RiverMap, par.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(Ballinderry)

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

RiverDraw(riverlayout)

RiverBar(B.siteaspt$Site, B.siteaspt$River, B.siteaspt$Distance,
         B.siteaspt[4], riverlayout, range = c(0,8),
         bar.col = c("#5381FFFF"), lbl.adj = c(0.5,1.3))

RiverDraw(riverlayout)

RiverBar(B.siteaspt$Site, B.siteaspt$River, B.siteaspt$Distance,
         B.siteaspt[4:5], riverlayout, range = c(0,8),
         bar.col = c("#5381FFFF", "#FF3931FF"), lbl.adj = c(0.5,1.3))

Example output



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