Very simple preview of colors
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)
Input color. Hexadecimal or any string that R recognizes.
(See all with colors()
)
String: Plot title. Default = NULL
Logical: If TRUE, add lnames(col)
if not NULL. Default = TRUE
Float: y position to place names
. Adjust as needed. Default = 1.045
Float: String rotation in degrees. Default = 45
Float: Alpha level. Default = 1
Float, vector, length 2: y axis limits. Default = c(0.95, 1.1)
Float: Character expansion factor. Default = 26
Integer or single character: The pch
parameter of par
Float, vector, length 4: Plot margins. Default = c(0, 1.7, 0.6, 2.8)
Float: Line to plot main
Default = 0
String, optional: Path to file to save plot
Logical: If TRUE, reset par
before exiting
Float: PDF output width
Float: PDF output height