pretty_cols_brewer | R Documentation |
This function is a simple wrapper for brewer.pal
and colorRampPalette
or other colour palette functions that generates pretty colour schemes.
pretty_cols_brewer(
zlim,
buffer = FALSE,
scheme = "YlOrRd",
select = 1:8,
pal = NULL,
n_breaks = 100,
rev = FALSE
)
zlim |
A numeric range that the colour scheme should span. |
buffer |
A logical input that defines whether or not to 'buffer' breaks along |
scheme |
A character that defines a colour scheme supported by |
select |
An integer vector that defines which colours to draw from the |
pal |
A colour palette function. If supplied |
n_breaks |
The number of breaks in the colour scheme (but see |
rev |
A logical value that defines whether or not to reverse sampled colours. |
This function is designed to work in conjunction with image.plot
.
The function returns a named list that contains the z limits (‘zlim’), a numeric vector of breaks (‘breaks’), the colour palette function (‘pal’) and the associated vector of colours (‘col’). This can be passed to image.plot
.
Edward Lavender
pretty_cols_split_heat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.