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()
)

Arguments

x1

Start of the arrow.

x2

End of the arrow.

y

Y-location of the arrow.

width

Width of the arrow. The value can be the one measured in the data coordinates or a grid::unit() object.

arrow_head_length

Length of the arrow head.

arrow_head_width

Width of the arrow head.

arrow_position

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.

tail

The shape of the arrow tail.

gp

Graphical parameters.

track_index

Index of the track.

Value

No value is returned.

See also

Note spiral_segments() also supports drawing line-based arrows.

Examples

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")