Skip to contents
0.16.6 documentation

Complete canonical API text; task articles explain the workflows. Tutorials

Site guide · find your task

Label generic genomic features

Usage

Code
geom_feature_label(
  mapping = NULL,
  data = NULL,
  label_orientation = c("feature", "horizontal", "radial", "tangent"),
  label_side = c("outside", "inside", "auto"),
  label_overlap = c("hide", "nudge", "allow"),
  label_wrap = NULL,
  label_rotation = NULL,
  label_radial_offset = 0.04,
  label_circum_offset = NULL,
  label_circum_limit = NULL,
  position = "identity",
  show.legend = FALSE,
  inherit.aes = FALSE,
  ...
)

Arguments

mapping, data

Standard layer inputs. Map feature text with label.

label_orientation

One of "feature", "horizontal", "radial", or "tangent". "feature" keeps both internal and adjacent labels tangent to the feature direction; compact labels move beside the feature.

label_side

One of "inside", "outside", or "auto".

label_overlap

Fixed-label collision policy.

label_wrap

Optional character wrapping width.

label_rotation

Optional numeric/vector/list. Label rotation angle, default 0

label_radial_offset

Optional numeric/vector/list. Radial offset of labels, default 0.04

label_circum_offset

Optional numeric/vector/list. Circumferential offset of labels, default 0

label_circum_limit

Optional logical/vector/list. Whether to limit circumferential offset, default TRUE

position

Feature Position used for the label anchor. In coord_collinear(), an omitted Position shares the matching feature layer's lanes; an explicit Position changes only label anchors, leaving feature polygons in their own Position. If both inputs contain unique feature_id values, label inputs may be subsets or reordered; their accession, interval and strand must still agree. Without IDs, inheritance requires the same interval rows in order. Multiple matching geometry layers require an explicit label Position or unambiguous feature IDs.

show.legend, inherit.aes

Standard ggplot2 layer arguments.

...

Additional text parameters.

Value

A ggplot2 layer.