closed_breaks_log2 {scUtils} | R Documentation |
Closed breaks for log scale
Description
Finds breaks that are powers of 2, and forces inclusion of upper and lower limits (displaying the closed interval). Including limits specifically is particularly useful for ggplot2's color/fill, as it emphasizes the meaning of maximal/minimal color intensities (see examples).
Usage
closed_breaks_log2(lims)
Arguments
lims |
Vector with lower and upper limits (in that order) of the data that you want breaks for. |
Details
The feat
function uses closed_breaks_log2
to color by
gene expression,
where the maximal expression gives valuable
intuition for a gene's overall expression strength.
For x- or y-axis (scale_*_log10
),
I still recommend breaks_log
from the scales package.
Value
Numeric vector with breaks.
See Also
Examples
# closed breaks include maximum, breaks_log do not:
closed_breaks_log2(lims = c(.01, 977.1))
scales::breaks_log()(c(.01, 977.1))
[Package scUtils version 0.1.0 Index]