Learn R Programming

NetWeaver (version 0.0.6)

rc.plot.grColLegend: Plot Gradient Color Legend

Description

Plot gradient color legend at given position.

Usage

rc.plot.grColLegend(x, y, cols, at=NULL, legend=at,
	title='Color', width=0.1, height=0.3, gap=0,
	direction=c('vertical', 'horizontal'), cex.text=1, cex.title=1)

Arguments

x, y

numeric values of coordinates where the legend is plotted. See details.

cols

a vector of colors.

at

integers; index legend text in the color vector cols. See details.

legend

character strings of legend text with the same length of vector at.

title

character string of the legend title.

width

numeric, width of the color legend bar.

height

numeric, height of the color legend bar.

gap

numeric, size of the gap between two color blocks.

direction

plot the color legend bar in either vertical or horizontal direction.

cex.text

numeric, magnitude of the legend text.

cex.title

numeric, magnitude of the legend title.

Details

x and y set the coordinates of bottom left starting point. The extremes of the user coordinates of the plotting region can be found out by par('usr').

By default NULL, parameter at will be set as a vector with values 1, ceiling(length(cols)/2), and length(cols).

See Also

rc.plot.link, rc.plot.histogram

Examples

Run this code
# NOT RUN {
#This is not to be run alone. Please see tutorial vignette("netweaver") for usage.
# }

Run the code above in your browser using DataLab