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 = 2,
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.
EDG
## Not run:
colors <- colorgradient_x(seq(-5, 5))
previewcolor(colors)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.