Description Usage Arguments Details Value Author(s) Examples
Add a new layer to the Hilbert curve
1 2 3 4 |
object |
A |
ir |
an |
x1 |
if start positions are not integers, they can be set by |
x2 |
if end positions are not integers, they can be set by |
col |
a scalar or a vector of colors which correspond to intervals in |
border |
a scalar or a vector of colors for the borders of intervals. Set it to |
mean_mode |
Under 'pixel' mode, each pixel represents a small window. This argument provides methods to summarize value for the small window if the input intervals can not completely overlap with the window. See explanation in |
grid_line |
whether add grid lines to show blocks of the Hilber curve. It should be an integer number and there will be |
grid_line_col |
color for the grid lines |
overlay |
a self-defined function which defines how to overlay new layer to the plot. By default it is |
This function only works under 'pixel' mode.
Under "pixel" mode, color is the only graphic representation of values in the input intervals.
To make a more precise and robust color mapping, users may consider colorRamp2
to create
a color mapping function.
If you want to add more than one layers to the curve, remember to set colors with transparency.
overlay
argument is useful for changing color themes for the overlapped areas, please refer to the vignette
to see examples of how to swith color themes in easy ways.
No value is returned.
Zuguang Gu <z.gu@dkfz.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | hc = HilbertCurve(1, 100, level = 9, mode = "pixel")
x = sort(sample(100, 20))
s = x[1:10*2 - 1]
e = x[1:10*2]
require(IRanges)
ir = IRanges(s, e)
hc_layer(hc, ir)
hc = HilbertCurve(1, 100, level = 9, mode = "pixel")
hc_layer(hc, ir, grid_line = 3)
hc = HilbertCurve(1, 100, level = 9, mode = "pixel")
hc_layer(hc, ir, border = "black")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.