sl.plot.colbar: Plot Colourbar

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/sl.plot.colbar.R

Description

Plot a spheRlab colourbar, vertically or horizontally, with a number of options.

Usage

1
sl.plot.colbar(colbar, breaks, vertical = FALSE, labels.at = rep(TRUE, length(breaks)), labels = as.character(signif(breaks, 3)), labels.side = "bottom", labels.cex = 1, ticks.length = 1, ticks.mirrored = FALSE, ratio = 0.1, triag.ends = FALSE, file.name = "~/sl.plot.colbar.pdf", width = 6)

Arguments

colbar

A spheRlab colourbar of length N (as returned by sl.colbar).

breaks

a vector of length N-1 specifying the breaks corresponding to colbar.

vertical

a logical value specifying whether the colourbar is to be plotted vertically (default). If vertical=FALSE, a horizontal colourbar is plotted.

labels.at

a vector of length N-1 with logical values specifying which breaks are to be labelled. By default all breaks are labelled (which can result in unwanted overlap).

labels

a vector of length N-1 with characters specifying the break labels. By default, labels are derived from breaks.

labels.side

NOT YET USED! - a character specifying the side of the colourbar at which the labels are to be placed.

labels.cex

a scalar specifying the relative size of the labels.

ticks.length

NOT YET USED!

ticks.mirrored

NOT YET USED!

ratio

a scalar specifying the ratio of width and length of the colourbar. By default ratio=0.1.

triag.ends

a logical value indicating whether the ends of the colourbar shall be triangular. By default triag.ends=FALSE. TRIANGULAR ENDS ARE NOT YET IMPLEMENTED!

file.name

a character specifying the output file name of the figure. By default file.name="~/sl.plot.colbar.pdf".

width

a scalar specifying the width of the figure.

Details

Colourbars in spheRlab follow the philosophy that they are plotted separately of the fields they annotate. Combining a plotted field and its colourbar subsequently is left to the user and his or her choice of external software (e.g., OpenOffice or the like). This substantially increases the simplicity and flexibility of plot handling within spheRlab.

Value

An integer giving the device into which the figure was plotted.

Note

NOTE THAT SO FAR THIS FUNCTION HAS UNUSED ARGUMENTS AND OTHER GAPS (INCLUDING HORIZONTAL PLOTTING) THAT NEED TO BE FILLED ASAP!

Author(s)

Helge Goessling

See Also

sl.colbar, sl.num2colbar

Examples

1
2
3
4
cb = sl.colbar(cols=list(c(1,0,0),c(.5,.5,.5),c(0,0,1)),N=10)
breaks = seq(.1,.9,.1)
## sl.plot.colbar(colbar=cb,breaks=breaks,file.name="~/sl.plot.colbar.pdf")
## Should result in a corresponding figure stored in the file '~/sl.plot.colbar.pdf'

helgegoessling/spheRlab documentation built on Sept. 29, 2017, 6:36 a.m.