scale_x_bp | R Documentation |
scale_x_bp()
is the default scale for genomic x-axis. It wraps
ggplot2::scale_x_continuous()
using label_bp()
as default labeller.
scale_x_bp(..., suffix = "", sep = "", accuracy = 1)
label_bp(suffix = "", sep = "", accuracy = 1)
... |
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. |
A ggplot2 scale object with bp labels
A labeller function for genomic data
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.