R: Specialised colour palette with set of 21 maximally...
getcol
R Documentation
Specialised colour palette with set of 21 maximally contrasting colours
Description
Special colour palette developed to maximise the contrast between
colours. Colours were selected for visualising groups of points on xy or xyz plots
on a white background. Because of this, there are few pastel colours are in this palette.
getcol contains 2 palettes of 12 and 21 colours.
Usage
getcol(nc = c(1:3), palette = NULL, test = FALSE)
Arguments
nc
Numeric. Integer or vector in range 1 to 21. This selects colours from palette
palette
A character to select either palette "colours1" or
"colours2". colours1 contains 12 colours, colours2
contains 21 colours
test
A logical, if TRUE a plot will be drawn to display the
palettes colours1, colours2 and any selected colours.
Details
Colours1 contains the 12 colours,"red","blue"
,"green","cyan","magenta","yellow", "grey","black","brown", "orange", "violet", "purple"). These were choosen, as these are compatible with rasmol and chime, that are used in html3D. Colours2
contains 21 colours. These were selected so as to maximise the
contrast between groups.
For other colour palettes in R, see colors, palette, rainbow, heat.colors,
terrain.colors, topo.colors or cm.colors.
Also see the library RColorBrewer
Value
A vector containing a list of colours.
Author(s)
Aedin Culhane
See Also
See also colors, palette, rainbow, heat.colors,
terrain.colors, topo.colors or cm.colors, RColorBrewer
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(made4)
Loading required package: ade4
Loading required package: RColorBrewer
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Loading required package: scatterplot3d
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/made4/getcol.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getcol
> ### Title: Specialised colour palette with set of 21 maximally contrasting
> ### colours
> ### Aliases: getcol
> ### Keywords: color hplot
>
> ### ** Examples
>
> getcol(3)
[1] "red" "blue" "green"
> getcol(c(1:7))
[1] "red" "blue" "green" "brown" "magenta" "orange" "cyan"
> getcol(10, test=TRUE)
[1] "red" "blue" "green" "brown" "magenta" "orange" "cyan"
[8] "black" "grey" "violet"
> getcol(c(1:5, 7, 15, 16), palette="colours2",test=TRUE)
[1] "#E41A1C" "#0000FF" "#00FF00" "#FFA500" "#E7298A" "#00FFFF" "#4DAF4A"
[8] "#800000"
>
>
>
>
>
> dev.off()
null device
1
>