circos.labels {circlize}R Documentation

Add a label track

Description

Add a label track

Usage

circos.labels(
    sectors, x, labels,
    facing = "clockwise",
    niceFacing = TRUE,
    col = par("col"),
    cex = 0.8,
    font = par("font"),
    padding = 0.4,
    connection_height = mm_h(5),
    line_col = par("col"),
    line_lwd = par("lwd"),
    line_lty = par("lty"),
    labels_height = min(c(cm_h(1.5), max(strwidth(labels, cex = cex, font = font)))),
    side = c("inside", "outside"),
    labels.side = side,
    track.margin = circos.par("track.margin"))

Arguments

sectors

A vector of sector names.

x

Positions of the labels.

labels

A vector of labels.

facing

Facing of the labels. The value can only be "clockwise" or "reverse.clockwise".

niceFacing

Whether automatically adjust the facing of the labels.

col

Color for the labels.

cex

Size of the labels.

font

Font of the labels.

padding

Padding of the labels, the value is the ratio to the height of the label.

connection_height

Height of the connection track.

line_col

Color for the connection lines.

line_lwd

Line width for the connection lines.

line_lty

Line type for the connectioin lines.

labels_height

Height of the labels track.

side

Side of the labels track, is it in the inside of the track where the regions are marked?

labels.side

Same as side. It will replace side in the future versions.

track.margin

Bottom and top margins.

Details

This function creates two tracks, one for the connection lines and one for the labels.

If two labels are too close and overlap, this function automatically adjusts the positions of neighouring labels.

Examples

circos.initialize(sectors = letters[1:8], xlim = c(0, 1))
circos.track(ylim = c(0, 1))
circos.labels(c("a", "a", "b", "b"), x = c(0.1, 0.12, 0.4, 0.6), labels = c(0.1, 0.12, 0.4, 0.6))

[Package circlize version 0.4.16 Index]