Draw links between points or/and intervals
circos.link(
sector.index1,
point1,
sector.index2,
point2,
rou = get_most_inside_radius(),
rou1 = rou,
rou2 = rou,
h = NULL,
h.ratio = 0.5,
w = 1,
h2 = h,
w2 = w,
col = "black",
lwd = par("lwd"),
lty = par("lty"),
border = col,
directional = 0,
arr.length = ifelse(arr.type == "big.arrow", 0.02, 0.4),
arr.width = arr.length/2,
arr.type = "triangle",
arr.lty = lty,
arr.lwd = lwd,
arr.col = col,
reduce_to_mid_line = FALSE)
Index for the first sector where one link end locates
A single value or a numeric vector of length 2. If it is a 2-elements vector, then the link would be a belt/ribbon.
Index for the other sector where the other link end locates
A single value or a numeric vector of length 2. If it is a 2-elements vector, then the link would be a belt/ribbon.
The position of the the link ends (if rou1
and rou2
are not set). It is the percentage of the radius of the unit circle.
By default its value is the position of bottom margin of the most inner track.
The position of end 1 of the link.
The position of end 2 of the link.
Height of the link, measured as percent to the radius to the unit circle. By default it is automatically infered.
systematically change the link height. The value is between 0 and 1.
Since the link is a Bezier curve, it controls the shape of Bezier curve.
Height of the bottom edge of the link if it is a ribbon.
Shape of the bottom edge of the link if it is a ribbon.
Color of the link. If the link is a ribbon, then it is the filled color for the ribbon.
Line (or border) width
Line (or border) style
If the link is a ribbon, then it is the color for the ribbon border.
0 for no direction, 1 for direction from point1
to point2
, -1 for direction from point2
to point1
.
2 for two directional. The direction is important when arrow heads are added.
Width of the arrows, pass to Arrowhead
.
Type of the arrows, pass to Arrowhead
. Default value is triangle
. There is an additional option
big.arrow
.
Length of the arrows, measured in 'cm', pass to Arrowhead
. If arr.type
is set to big.arrow
,
the value is percent to the radius of the unit circle.
Color of the arrows, pass to Arrowhead
.
Line width of arrows, pass to Arrowhead
.
Line type of arrows, pass to Arrowhead
.
Only use the middle points of point1
and point2
to draw the link.
Links are implemented as quadratic Bezier curves (https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Rational_B.C3.A9zier_curves ).
Drawing links does not create any track. So you can think it is independent of the tracks.
By default you only need to set sector.index1
, point1
, sector.index2
and point2
. The
links would look nice.
Please refer to the vignette for detailed explanation.
https://jokergoo.github.io/circlize_book/book/graphics.html#links
# NOT RUN {
# There is no example
NULL
# }
Run the code above in your browser using DataLab