getScale: Make an appropriate scale for a heatmap

Description Usage Arguments Value Examples

View source: R/SmoothHeatmap.R

Description

Make an appropriate scale for a heatmap

Usage

1
getScale(x, y)

Arguments

x

Min/max values for the heatmap

y

Min/max values for the heatmap

This function takes min/max values for a heatmap and generates a scale either starting, ending or centered on zero.

Value

numeric, length 2, a new scale

Examples

1
2
3
getScale(0.5, 5) # c(0, 5)
getScale(-6, -2) # c(-6, 6)
getScale(-6, 2) # c(-6, 6)

heatmaps documentation built on Nov. 8, 2020, 7:32 p.m.