getScale: Make an appropriate scale for a heatmap

Description Usage Arguments Value Examples

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)

mgperry/heatmaps documentation built on May 22, 2019, 8:53 p.m.