Description Usage Arguments Details Value See Also Examples

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).

1 | ```
closed_breaks_log2(lims)
``` |

`lims` |
Vector with lower and upper limits (in that order) of the data that you want breaks for. |

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.

Numeric vector with breaks.

1 2 3 | ```
# closed breaks include maximum, breaks_log do not:
closed_breaks_log2(lims = c(.01, 977.1))
scales::breaks_log()(c(.01, 977.1))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.