hc_png-HilbertCurve-method: Save Hilbert curve as a PNG figure

Description Usage Arguments Details Value Author(s) Examples

Description

Save Hilbert curve as a PNG figure

Usage

1
2
## S4 method for signature 'HilbertCurve'
hc_png(object, file = "HilbertCurve.png")

Arguments

object

A HilbertCurve-class object.

file

file name. If the suffix of the file name is not .png, it will be added automatically no matter you like it or not.

Details

A PNG figure with resolution of 2^level x 2^level is generated.

Only the body of the Hilbert curve will be written to PNG file.

This function only works under 'pixel' mode.

Value

No value is returned.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

1
2
3
4
5
6
7
8
9
hc = HilbertCurve(1, 100, level = 9, mode = "pixel")

x = sort(sample(100, 20))
s = x[1:10*2 - 1]
e = x[1:10*2]
ir = IRanges(s, e)

hc_layer(hc, ir)
hc_png(hc, file = "test.png")

eilslabs/HilbertCurve documentation built on May 16, 2019, 1:23 a.m.