l_layer_rasterImage.Rd
This function is very similar to the
rasterImage
function. It works with every loon plot
which is based on the cartesian coordinate system.
l_layer_rasterImage(widget, image, xleft, ybottom, xright, ytop, angle = 0, interpolate = FALSE, parent = "root", index = "end", ...)
widget | widget path as a string or as an object handle |
---|---|
image | a |
xleft | a vector (or scalar) of left x positions. |
ybottom | a vector (or scalar) of bottom y positions. |
xright | a vector (or scalar) of right x positions. |
ytop | a vector (or scalar) of top y positions. |
angle | angle of rotation (in degrees, anti-clockwise from positive x-axis, about the bottom-left corner). |
interpolate | a logical vector (or scalar) indicating whether to apply linear interpolation to the image when drawing. |
parent | parent widget path |
index | position among its siblings. valid values are 0, 1, 2, ..., 'end' |
... | argumnets forwarded to |
layer id of group or rectangles layer
For more information run: l_help("learn_R_layer.html#countourlines-heatimage-rasterimage")
#> loon layer "rectangles" of type rectangles of plot .l78.plot #> [1] "layer0"#> Warning: data length [2] is not a sub-multiple or multiple of the number of rows [3]p <- l_plot(showScales=TRUE, background="thistle", useLoonInspector=FALSE) l_layer_rasterImage(p, image, 100, 300, 150, 350, interpolate = FALSE)#> loon layer "rectangles" of type rectangles of plot .l79.plot #> [1] "layer0"l_layer_rasterImage(p, image, 100, 400, 150, 450)#> loon layer "rectangles" of type rectangles of plot .l79.plot #> [1] "layer1"l_layer_rasterImage(p, image, 200, 300, 200 + 10, 300 + 10, interpolate = FALSE)#> loon layer "rectangles" of type rectangles of plot .l79.plot #> [1] "layer2"l_scaleto_world(p) # from examples(rasterImage) # set up the plot region: op <- par(bg = "thistle") plot(c(100, 250), c(300, 450), type = "n", xlab = "", ylab = "")