spiral_arrow: Draw arrows in the spiral direction

Description Usage Arguments Value See Also Examples

View source: R/graphics.R

Description

Draw arrows in the spiral direction

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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 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

Graphics parameters.

track_index

Index of the track.

Value

No value is returned.

See Also

Note spiral_segments also supports drawing line-based arrows.

Examples

1
2
3
4
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")

spiralize documentation built on Feb. 6, 2022, 1:06 a.m.