getBreaks: getBreaks

View source: R/misc.R

getBreaksR Documentation

getBreaks

Description

Produces symmetrical breaks for a color scale, with the scale steps increasing for large values, which is useful to avoid outliers influencing too much the color scale.

Usage

getBreaks(x, n, split.prop = 0.98, symmetric = TRUE)

Arguments

x

A matrix of log2FC (or any numerical values centered around 0)

n

The desired number of breaks.

split.prop

The proportion of the data points to plot on a linear scale; the remaining will be plotted on a scale with regular frequency per step (quantile).

symmetric

Logical; whether breaks should be symmetric around 0 (default TRUE)

Value

A vector of breaks of length = 'n'

Examples

dat <- rnorm(100,sd = 10)
getBreaks(dat, 10)

plger/sechm documentation built on Oct. 25, 2024, 8:22 p.m.