Function to create a color key
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
x0, x1, y0, y1 |
Numeric scalars. Coordinates of the lower left and upper right points where the color key will be drawn as proportion of the plotting region. |
cols |
Character scalar. Colors specifications to create the color palette. |
tick.range, tick.marks |
Numeric vectors specifying the range and the tickmarks respectively. |
label.from, label.to |
Character scalar. Labels of the lower and upper values of the color key. |
nlevels |
Integer scalar. Number of levels to extrapolate. |
main |
Character scalar. Title of the colorkey. |
relative |
Logical scalar. When |
tick.args, label.args, main.args |
Lists of arguments passed to graphics::text for drawing ticks, labels and main respectively. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.