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

showColors

Displays vectors of colors


Description

Displays colors produced by a color vector col and labels them by the corresponding number of the element of col.

Usage

showColors(col = IDPcolorRamp(20),
           ntm = min(length(col), 20),
           border = TRUE, mar = rep(0,4))

Arguments

col

Color vector

ntm

Approximate number of labels printed

border

Shall border be drawn between the colors in the legend: TRUE / FALSE

mar

Margin. cf par

Author(s)

Rene Locher

See Also

Examples

showColors(IDPcolorRamp(5))
showColors(IDPcolorRamp(200),border=FALSE)
showColors(IDPcolorRamp(200),border=FALSE,ntm=5)

showColors(IDPcolorRamp(4,
                        colInt = data.frame(
                            h = c(0.47, 0.28, 0.22, 0.2, 0.00),
                            s = c(0.3, 0.55, 0.75, 0.75, 0.75),
                            v = c(1, 1, 1, 1, 1)),
                        fr     = c(0.2,0.2,0.2))
           ,border=FALSE)

showColors(IDPcolorRamp(200,
                        t(col2hsv(c("darkviolet","blue",
                                    "green","yellow","red"))),
                        fr=rep(0.25,3)),border=FALSE)

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.