Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

circos.rect

Draw rectangle-like grid


Description

Draw rectangle-like grid

Usage

circos.rect(
    xleft, ybottom, xright, ytop,
    sector.index = get.current.sector.index(),
    track.index = get.current.track.index(),
    rot = 0,
    ...)

Arguments

xleft

x for the left bottom points

ybottom

y for the left bottom points

xright

x for the right top points

ytop

y for the right top points

sector.index

Index for the sector

track.index

Index for the track

rot

Rotation of the rectangles. The value is measured clockwise in degree. Rotation is relative to the center of the rectangles.

...

pass to polygon

Details

The name for this function is circos.rect because if you imagine the plotting region as Cartesian coordinate, then it is rectangle. in the polar coordinate, the up and bottom edge become two arcs.

This function can be vectorized.

Examples

circos.initialize(c("a", "b", "c", "d"), xlim = c(0, 10))
circos.track(ylim = c(0, 10), panel.fun = function(x, y) {
    for(rot in seq(0, 360, by = 30)) {
        circos.rect(2, 2, 6, 6, rot = rot)
    }
}, track.height = 0.5)

circlize

Circular Visualization

v0.4.12
MIT + file LICENSE
Authors
Zuguang Gu
Initial release
2021-1-8

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.