Learn R Programming

rivervis (version 0.46.0)

RiverBlockChart: River Block Chart Plotting

Description

This function plots a river block chart to display qualitative data without the topological structure of the river network. The function does not require the output list from RiverLayout or RiverMap.

Usage

RiverBlockChart(site, river, distance, value, arrangement, h.gap = 0.1, w.gap = 0.25, w.gap.s = 0.1, r.gap = 0.25, block.col = NA, block.lwd = 1, border.col = "grey20", bg.col = "lightgrey", mar = 0.1, hw.rat = 1.5, site.shw = TRUE, site.pos = 1, site.ofs = 1.5, site.cex = 0.5, site.col = "black", site.order = "A", site.srt = 0, rvr.shw = TRUE, rvr.ofs = 1.5, rvr.cex = 0.7, rvr.col = "black", rvr.t.b = "b", rvr.order = NA, rvr.srt = 0, par.shw = TRUE, par.pos = 2, par.ofs = 1, par.cex = 0.6, par.adj = c(1, 0.5), par.col = "black", par.txt = NA)

Arguments

site
a character vector of site names.
river
a vector of rivers to which the sites belong.
distance
a vector. The along-the-river distance between the site and the mouth of the river.
value
a data frame containing the qualitative variables to be shown on the river block-chart.
arrangement
a vector indicating the block number for each line.
h.gap
vertical gap size between blocks in the plot. By default, the vertical gap is block height * 0.1
w.gap
horizontal gap size between sites. By default, the horizontal gap is largest block width * 0.25.
w.gap.s
horizontal gap size between small blocks when there are more than one block in each line. By default, the horizontal gap is largest block width * 0.1.
r.gap
horizontal gap size between rivers. By default, gap between rivers is block width * 0.25.
block.col
a vector of block colours. The length of vector should be as the same as the the number of levels of value.
block.lwd
a value of block line width.
border.col
a value of block border colour.
bg.col
a value of river background colour.
mar
a value of smallest margin size.
hw.rat
the ratio of block height and block width.
site.shw
show site names (TRUE) or not (FALSE).
site.pos
site position. 1 for below, 2 for left, 3 for above, and 4 for right. See par for details.
site.ofs
site position offset.
site.cex
site name size.
site.col
site colour.
site.order
order of sites within each river. Alphabetical order ("A"), river flow left ("L"), river flow right ("R").
site.srt
site label rotation in degrees.
rvr.shw
show river labels (TRUE) or not (FALSE).
rvr.ofs
river label position offset.
rvr.cex
river label size.
rvr.col
river label colour.
rvr.t.b
location of river label. "t" for top (above) and "b" for below (bottom).
rvr.order
order of rivers. Alphabetical order (NA) or a vector of custom order.
rvr.srt
river label rotation in degrees.
par.shw
show parameter labels (TRUE) or not (FALSE).
par.pos
parameter label position. 1 for below, 2 for left, 3 for above, and 4 for right. See par for details. It overrides par.adj if par.pos is not NULL.
par.ofs
parameter label position offset.
par.cex
parameter label size.
par.adj
parameter label adjustment. One or two values in [0,1] for x and y (optional) adjustment.
par.col
parameter label colour.
par.txt
parameter name.

See Also

par.

Examples

Run this code
data(Ballinderry)

RiverBlockChart(B.sitehm$Site, B.sitehm$River, B.sitehm$Distance,
                B.sitehm[4:9],  c(1,1,2,2), mar = 0.15, site.ofs = 1,
                site.cex = 0.7, site.order = "R",
                block.col = fivecolours)

RiverBlockChart(B.sitehm$Site, B.sitehm$River, B.sitehm$Distance,
                B.sitehm[4:9],  c(1,1,2,2), mar = 0.15,
                site.ofs = 1, site.cex = 0.7,
                rvr.order = c("Rock", "Killymoon-Claggan", "Ballinderry",
                              "Ballymully", "Kildress", "Kingsmill",
                              "Lissan", "Tulnacross"),
                block.col = fivecolours)

RiverBlockChart(B.sitehm$Site, B.sitehm$River, B.sitehm$Distance,
                B.sitehm[4:9],  c(1,1,2,2), mar = 0.15, site.ofs = 1,
                site.cex = 0.7, site.order = "R",
                par.txt = c("ChanVeg", "ChanFlow", "BankVegLeft",
                            "Right", "RipLULeft", "Right"),
                block.col = fivecolours)

Run the code above in your browser using DataLab