Skip to contents

This function creates a continuous scale for genomic coordinates on the x-axis. It formats the axis labels in a genomic coordinate style (e.g., 1Mb, 500kb).

Usage

scale_x_genome(..., unit_suffix = "b", breaks = waiver(), labels = waiver())

Arguments

...

Additional arguments passed to scale_x_continuous

unit_suffix

Suffix to use for the unit (default: "b" for base pairs)

breaks

Breaks for the axis (default: waiver())

labels

Labels for the axis (default: waiver())

Value

A ggplot2 scale object

Examples

if (FALSE) { # \dontrun{
library(ggplot2)
p <- ggplot(data, aes(x = start)) + geom_point() + scale_x_genome()
} # }