Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

iplotLegend

Plots Legend for Color Ramp


Description

Plots legend for color ramp.

Usage

iplotLegend(colramp, ncol = NULL,
            cex.axis = par("cex.axis"), border = FALSE,
            mar = c(0, 0, 0, 3), las = 1, ...)

Arguments

colramp

Function defining color ramp, e.g. IDPcolorRamp

ncol

Number of individual colors in color ramp. See details.

cex.axis

Magnification to be used for labels.

border

Logical. When TRUE, a border is drawn around the individual colors in the legend.

mar

Margin. See par.

las

Orientation of labels on axis. See par.

...

Additional arguments to par

Details

A color ramp of ncol+1 individual colors is plotted, starting with the background color (= color 0). When ncol = NULL a color ramp of 101 individual colors is plotted. The color at the bottom is labeled by '0', the color at the top by 'max'.

Author(s)

Rene Locher

Examples

## Not run: 
par(oma = rep(2, 4))
layout(matrix(c(1, 2), ncol = 2),
      width = c(lcm(par("csi")*5*2.54), 1),
      heights = 1)
## End(Not run)
iplotLegend(IDPcolorRamp, ncol = 15)

IDPmisc

'Utilities of Institute of Data Analyses and Process Design (www.zhaw.ch/idp)'

v1.1.20
GPL (>= 3)
Authors
Rene Locher [aut, cre], Andreas Ruckstuhl [ctb]
Initial release
2020-01-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.