spiral_highlight: Highlight a section of the spiral

View source: R/graphics.R

spiral_highlightR Documentation

Highlight a section of the spiral

Description

Highlight a section of the spiral

Usage

spiral_highlight(
  x1,
  x2,
  type = c("rect", "line"),
  padding = unit(1, "mm"),
  line_side = c("inside", "outside"),
  line_width = unit(1, "pt"),
  gp = gpar(fill = "red"),
  track_index = current_track_index()
)

Arguments

x1

Start location of the highlighted section.

x2

End location of the highlighted section.

type

Type of the highlighting. "rect" means drawing transparent rectangles covering the whole track. "line" means drawing annotation lines on top of the track or at the bottom of it.

padding

When the highlight type is "rect", it controls the padding of the highlighted region. The value should be a grid::unit() object or a numeric value which is the fraction of the length of the highlighted section. The length can be one or two. Note it only extends in the radial direction.

line_side

If the highlight type is "line", it controls which side of the track to draw the lines.

line_width

Width of the annotation line. Value should be a grid::unit() object.

gp

Graphical parameters.

track_index

Index of the track.

Value

No value is returned.

Examples

spiral_initialize(); spiral_track()
spiral_highlight(0.4, 0.6)
spiral_highlight(0.1, 0.2, type = "line", gp = gpar(col = "blue"))
spiral_highlight(0.7, 0.8, type = "line", line_side = "outside")

jokergoo/spiralize documentation built on June 16, 2024, 4:35 a.m.