scale_x_bp {gggenomes} | R Documentation |
X-scale for genomic data
Description
scale_x_bp()
is the default scale for genomic x-axis. It wraps
ggplot2::scale_x_continuous()
using label_bp()
as default labeller.
Usage
scale_x_bp(..., suffix = "", sep = "", accuracy = 1)
label_bp(suffix = "", sep = "", accuracy = 1)
Arguments
... |
Arguments passed on to |
suffix |
unit suffix e.g. "bp" |
sep |
between number and unit prefix+suffix |
accuracy |
A number to round to. Use (e.g.) Applied to rescaled data. |
Value
A ggplot2 scale object with bp labels
A labeller function for genomic data
Examples
# scale_x_bp invoked by default
gggenomes(emale_genes) + geom_gene()
# customize labels
gggenomes(emale_genes) + geom_gene() +
scale_x_bp(suffix = "bp", sep = " ")
# Note: xlim will overwrite scale_x_bp() with ggplot2::scale_x_continuous()
gggenomes(emale_genes) + geom_gene() +
xlim(0, 3e4)
# set limits explicitly with scale_x_bp() to avoid overwrite
gggenomes(emale_genes) + geom_gene() +
scale_x_bp(limits = c(0, 3e4))
[Package gggenomes version 1.0.0 Index]