Sector Class
Sector
Sector(
name: str,
size: float | tuple[float, float],
rad_lim: tuple[float, float],
clockwise: bool = True,
)
Circos Sector Class
PARAMETER | DESCRIPTION |
---|---|
name
|
Sector name
TYPE:
|
size
|
Sector size (or range)
TYPE:
|
rad_lim
|
Sector radian limit region
TYPE:
|
clockwise
|
Sector coordinate direction (clockwise or anti-clockwise).
TYPE:
|
add_track
add_track(
r_lim: tuple[float, float], *, r_pad_ratio: float = 0, name: str | None = None
) -> Track
Add track to sector
PARAMETER | DESCRIPTION |
---|---|
r_lim
|
Radius limit region (0 - 100)
TYPE:
|
r_pad_ratio
|
Radius padding ratio for plot data (0 - 1.0)
TYPE:
|
name
|
Track name. If None,
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
track
|
Track
TYPE:
|
get_track
Get track by name
PARAMETER | DESCRIPTION |
---|---|
name
|
Track name
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
track
|
Target name track
TYPE:
|
get_lowest_r
Get lowest radius position of sector from tracks data
RETURNS | DESCRIPTION |
---|---|
lowest_r
|
Lowest radius position. If no tracks found,
TYPE:
|
x_to_rad
Convert x coordinate to radian in sector start-end range
PARAMETER | DESCRIPTION |
---|---|
x
|
X coordinate
TYPE:
|
ignore_range_error
|
Ignore x coordinate range error
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
rad
|
Radian coordinate
TYPE:
|
axis
Plot axis
By default, simple black axis params(fc="none", ec="black", lw=0.5
) are set.
PARAMETER | DESCRIPTION |
---|---|
**kwargs
|
Patch properties (e.g.
TYPE:
|
text
text(
text: str,
x: float | None = None,
r: float = 105,
*,
adjust_rotation: bool = True,
orientation: str = "horizontal",
ignore_range_error: bool = False,
**kwargs
) -> None
Plot text
PARAMETER | DESCRIPTION |
---|---|
text
|
Text content
TYPE:
|
x
|
X position. If None, sector center x is set.
TYPE:
|
r
|
Radius position. By default, outer position
TYPE:
|
adjust_rotation
|
If True, text rotation is auto set based on
TYPE:
|
orientation
|
Text orientation (
TYPE:
|
ignore_range_error
|
If True, ignore x position range error
(ErrorCase:
TYPE:
|
**kwargs
|
Text properties (e.g.
TYPE:
|
line
line(
*,
r: float | tuple[float, float],
start: float | None = None,
end: float | None = None,
arc: bool = True,
**kwargs
) -> None
Plot line
PARAMETER | DESCRIPTION |
---|---|
r
|
Line radius position (0 - 100). If r is float, (r, r) is set.
TYPE:
|
start
|
Start position (x coordinate). If None,
TYPE:
|
end
|
End position (x coordinate). If None,
TYPE:
|
arc
|
If True, plot arc style line for polar projection. If False, simply plot linear style line.
TYPE:
|
**kwargs
|
Patch properties (e.g.
TYPE:
|
rect
rect(
start: float | None = None,
end: float | None = None,
r_lim: tuple[float, float] | None = None,
**kwargs
) -> None
Plot rectangle
PARAMETER | DESCRIPTION |
---|---|
start
|
Start position (x coordinate). If None,
TYPE:
|
end
|
End position (x coordinate). If None,
TYPE:
|
r_lim
|
Radius limit region. If None, (0, 100) is set.
TYPE:
|
**kwargs
|
Patch properties (e.g.
TYPE:
|
raster
raster(
img: str | Path | Image.Image,
*,
size: float = 0.05,
x: float | None = None,
r: float = 105,
rotation: int | float | str | None = None,
border_width: int = 0,
label: str | None = None,
label_pos: str = "bottom",
label_margin: float = 0.1,
imshow_kws: dict[str, Any] | None = None,
text_kws: dict[str, Any] | None = None
) -> None
Plot raster image
This method is experimental. API may change in the future release.
PARAMETER | DESCRIPTION |
---|---|
img
|
Image for plotting (
TYPE:
|
size
|
Image size (ratio to overall figure size)
TYPE:
|
x
|
X position. If None, sector center x position is set.
TYPE:
|
r
|
Radius position
TYPE:
|
rotation
|
Image rotation setting.
If
TYPE:
|
border_width
|
Border width in pixel. By default, 0 is set (no border shown).
TYPE:
|
label
|
Image label. If None, no label shown.
TYPE:
|
label_pos
|
Label plot position (
TYPE:
|
label_margin
|
Label margin
TYPE:
|
imshow_kws
|
Axes.imshow properties https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.imshow.html
TYPE:
|
text_kws
|
Text properties (e.g.
TYPE:
|