set_scale.colors: Set Colors to Be Used in Heatmaps Heatmaps

View source: R/params_functions.R View source: R/Package-Code5-Compiled.R

set_scale.colorsR Documentation

Set Colors to Be Used in Heatmaps Heatmaps

Description

Set and override the default colors to be used in heatmaps. Stored in the params list object, the default is c("blue","black","yellow")

Usage

set_scale.colors(colors)

Arguments

colors

vector of colors

Details

colors used to generate heatmaps

Please see params for more information about accessing and setting up these variables.

Note

In myHeatmap and myHeatmapByAnnotation, breaks and colors are set using these and other parameters. breaks <- seq(params$scale.range[1], params$scale.range[2],length.out=params$n.colors.range) my_cols=colorRampPalette(params$scale.colors)(n=params$n.colors.range-1)

Author(s)

~~Alison Moss~~

See Also

set_scale.range and set_n.colors.range

Examples

##initiate parameters
initiate_params()

#view heatmap with default colors
myHeatmap(RAGP_norm)

##switch to green-black-red heatmap
set_scale.colors(c("green","black","red"))
myHeatmap(RAGP_norm)

##custom color range
set_scale.colors(c("purple","blue","green","yellow","orange","red"))
myHeatmap(RAGP_norm)

axm323/dataVisEasy documentation built on Feb. 1, 2024, 11:53 p.m.