g_legend | R Documentation |
Creates a colorscale legend for a dataset in grob format
g_legend( data, data.type = "numeric", variable, center.zero, cols, val.limits, dark.theme = TRUE )
data |
data.frame with values that should be mapped onto colorscale |
data.type |
input data type, e.g. "factor", "numeric", "character", ... |
variable |
character string specifying tha name of the column (variable) containing values |
center.zero |
Specifies whether or not the colorscale should be centered at zero |
cols |
Character vector with color ids to be used in colorscale |
val.limits |
Specifies the limits for values in colorscale |
dark.theme |
Should a dark theme be used? |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.