previewcolor | R Documentation |
Preview one or multiple colors using little rhombi with their little labels up top
previewcolor(
x,
main = NULL,
bg = "#333333",
main.col = "#b3b3b3",
main.x = 0.7,
main.y = 0.2,
main.adj = 0,
main.cex = 0.9,
main.font = 1,
width = NULL,
xlim = NULL,
ylim = c(0, 2.2),
asp = 1,
labels.y = 1.55,
label.cex = NULL,
mar = c(0, 0, 0, 1),
par.reset = TRUE,
filename = NULL,
pdf.width = 8,
pdf.height = 2.5
)
x |
Color, vector: One or more colors that R understands |
main |
Character: Title. Default = NULL, which results in
|
bg |
Background color. |
main.col |
Color: Title color |
main.x |
Float: x coordinate for |
main.y |
Float: y coordinate for |
main.adj |
Float: |
main.cex |
Float: character expansion factor for |
main.font |
Integer, 1 or 2: Weight of |
width |
Float: Plot width. Default = NULL, i.e. set automatically |
xlim |
Vector, length 2: x-axis limits. Default = NULL, i.e. set automatically |
ylim |
Vector, length 2: y-axis limits. |
asp |
Float: Plot aspect ratio. |
labels.y |
Float: y coord for labels. Default = 1.55 (rhombi are fixed and range y .5 - 1.5) |
label.cex |
Float: Character expansion for labels. Default = NULL, and is
calculated automatically based on length of |
mar |
Numeric vector, length 4: margin size. |
par.reset |
Logical: If TRUE, reset |
filename |
Character: Path to save plot as PDF. |
pdf.width |
Numeric: Width of PDF in inches. |
pdf.height |
Numeric: Height of PDF in inches. |
Nothing, prints plot
colors <- colorgradient.x(seq(-5, 5))
previewcolor(colors)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.