Learn R Programming

RGraphics (version 1.0-9)

ribbonLegend: Create a Ribbon Legend

Description

Creates a ribbon legend; a vertical bar broken into several colored cells, with an axis on the right-hand side.

Usage

ribbonLegend(nlevels=NULL, breaks=NULL, cols, 
             scale=range(breaks), 
             margin=unit(0.5, "lines"), 
             gp=NULL, vp=NULL, name=NULL)

Arguments

nlevels, breaks
Number of levels to be represented in the legend, specifed either as a number of (equal-sized) levels, or the break points between levels.
cols
The colors to be used for each level.
scale
The range of the scale on the legend.
margin
Space around the edges of the legend.
name
A character name for the grob.
gp
A gpar object containing graphical parameter settings or NULL.
vp
A viewport or NULL.