circos.initialize | R Documentation |

Initialize the circular layout

circos.initialize( sectors = NULL, x = NULL, xlim = NULL, sector.width = NULL, factors = sectors, ring = FALSE)

`sectors` |
A |

`factors` |
The same as |

`x` |
Data on x-axes, a vector |

`xlim` |
Ranges for values on x-axes, see "details" section for explanation of the format |

`sector.width` |
Width for each sector. The length of the vector should be either 1 which means
all sectors have same width or as same as the number of sectors. Values for
the vector are relative, and they will be scaled by dividing their summation.
By default, it is |

`ring` |
Whether the sector represented as a ring. If yes, there should only be one sector in the circle. |

The function allocates the sectors according to the values on x-axis.
The number of sectors are determined by the `factors`

and the order
of sectors are determined by the levels of factors. In this function,
the start and end position for each sector on the circle (measured by degree)
are calculated according to the values on x-axis or by `xlim`

.

If `x`

is set, the length of `x`

must be equal to the length of `factors`

.
Then the data range for each sector are calculated from `x`

by splitting `factors`

.

If `xlim`

is set, it should be a vector containing two numbers or a matrix with 2 columns.
If `xlim`

is a 2-element vector, it means all sector share the same `xlim`

.
If `xlim`

is a 2-column matrix, the number of rows should be equal to the number of categories
identified by `factors`

, then each row of `xlim`

corresponds to the data range for each sector
and the order of rows is corresponding to the order of levels of `factors`

. If `xlim`

is a matrix
for which row names cover all sector names, `xlim`

is automatically adjusted.

Normally, width of sectors will be calculated internally according to the data range in sectors. But you can still set the width manually. However, it is not always a good idea to change the default sector width since the width can reflect the range of data in sectors. However, in some cases, it is useful to manually set the width such as you want to zoom some part of the sectors.

The function finally calls `plot`

with enforing aspect ratio to be 1 and be ready for adding graphics.

https://jokergoo.github.io/circlize_book/book/circular-layout.html

# There is no example NULL

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.