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

circlize

Convert to polar coordinate system


Description

Convert to polar coordinate system

Usage

circlize(
    x, y,
    sector.index = get.current.sector.index(),
    track.index = get.current.track.index())

Arguments

x

Data points on x-axis. The value can also be a two-column matrix/data frame if you put x and y data points into one variable.

y

Data points on y-axis.

sector.index

Index for the sector to convert the coordinates.

track.index

Index for the track to convert the coordinates.

Details

This is the core function in the package. It transform data points from data coordinate system (in a specific cell) to the polar coordinate system.

Value

A matrix with two columns (theta and rou). rou is measured in degree.

Examples

pdf(NULL)
sectors = c("a", "b")
circos.initialize(sectors, xlim = c(0, 1))
circos.track(ylim = c(0, 1))
# x = 0.5, y = 0.5 in sector a and track 1
circlize(0.5, 0.5, sector.index = "a", track.index = 1)
circos.clear()
dev.off()

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.