Learn R Programming

rtemis (version 0.79)

colorPreview: Color Preview

Description

Very simple preview of colors

Usage

colorPreview(col, main = NULL, names = TRUE, names.y = 1.045,
  srt = 45, alpha = 1, ylim = c(0.95, 1.1), cex = 12, pch = 18,
  bg = "white", mar = c(0, 1.7, 1, 2.8), main.line = 0,
  filename = NULL, par.reset = TRUE, pdf.width = length(col) * 0.5,
  pdf.height = 2)

Arguments

col

Input color. Hexadecimal or any string that R recognizes. (See all with colors())

main

String: Plot title. Default = NULL

names

Logical: If TRUE, add lnames(col) if not NULL. Default = TRUE

names.y

Float: y position to place names. Adjust as needed. Default = 1.045

srt

Float: String rotation in degrees. Default = 45

alpha

Float: Alpha level. Default = 1

ylim

Float, vector, length 2: y axis limits. Default = c(0.95, 1.1)

cex

Float: Character expansion factor. Default = 26

pch

Integer or single character: The pch parameter of par

mar

Float, vector, length 4: Plot margins. Default = c(0, 1.7, 0.6, 2.8)

main.line

Float: Line to plot main Default = 0

filename

String, optional: Path to file to save plot

par.reset

Logical: If TRUE, reset par before exiting

pdf.width

Float: PDF output width

pdf.height

Float: PDF output height