Draw arrows in the spiral direction
spiral_arrow(
x1,
x2,
y = get_track_data("ycenter", track_index),
width = get_track_data("yrange", track_index)/3,
arrow_head_length = unit(4, "mm"),
arrow_head_width = width * 2,
arrow_position = c("end", "start"),
tail = c("normal", "point"),
gp = gpar(),
track_index = current_track_index()
)
Start of the arrow.
End of the arrow.
Y-location of the arrow.
Width of the arrow. The value can be the one measured in the data coordinates or a grid::unit()
object.
Length of the arrow head.
Width of the arrow head.
Position of the arrow. If the value is "end"
, then the arrow head is drawn at x = x2
. If the value
is "start"
, then the arrow head is drawn at x = x1
.
The shape of the arrow tail.
Graphical parameters.
Index of the track.
No value is returned.
Note spiral_segments()
also supports drawing line-based arrows.
spiral_initialize()
spiral_track()
spiral_arrow(0.3, 0.6, gp = gpar(fill = "red"))
spiral_arrow(0.8, 0.9, gp = gpar(fill = "blue"), tail = "point", arrow_position = "start")