hc_segments-HilbertCurve-method.Rd
Add line segments to Hilbert curve
# S4 method for HilbertCurve
hc_segments(object, ir = NULL, x1 = NULL, x2 = NULL,
gp = gpar(lty = 1, lwd = 1, col = 1))
A HilbertCurve-class
object.
an IRanges
object which specifies the input intervals.
if start positions are not integers, they can be set by x1
.
if end positions are not integers, they can be set by x2
.
graphic parameters for lines. It should be specified by gpar
. Note you cannot set linejoin
and lineend
.
A data frame which contains coordinates (in the 2D space) of segments.
hc = HilbertCurve(1, 100, level = 4, reference = TRUE)
x = sort(sample(100, 20))
s = x[1:10*2 - 1]
e = x[1:10*2]
require(IRanges)
ir = IRanges(s, e)
hc_segments(hc, ir)