Description Usage Arguments Details Value See Also Examples
View source: R/AnnotationFunction-function.R
Image Annotation
1 2 3 |
image |
A vector of file paths of images. The format of the image is inferred from the suffix name of the image file. NA values or empty strings in the vector means no image to drawn. |
which |
Whether it is a column annotation or a row annotation? |
border |
Wether draw borders of the annotation region? |
gp |
Graphic parameters for annotation grids. If the image has transparent background, the |
space |
The space around the image to the annotation grid borders. The value should be a |
width |
Width of the annotation. The value should be an absolute unit. Width is not allowed to be set for column annotation. |
height |
Height of the annotation. The value should be an absolute unit. Height is not allowed to be set for row annotation. |
This function supports image formats in png
, svg
, pdf
, eps
, jpeg/jpg
, tiff
.
png
, jpeg/jpg
and tiff
images are imported by readPNG
, readJPEG
and
readTIFF
, and drawn by grid.raster
. svg
images are firstly reformatted by rsvg::rsvg_svg
and then imported by readPicture
and drawn by grid.picture
. pdf
and eps
images are imported by PostScriptTrace
and readPicture
, later drawn by grid.picture
.
Different image formats can be mixed in the image
vector.
An annotation function which can be used in HeatmapAnnotation
.
https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-annotations.html#image-annotation
1 2 3 4 5 6 7 8 9 10 | # download the free icons from https://github.com/Keyamoon/IcoMoon-Free
## Not run:
image = sample(dir("~/Downloads/IcoMoon-Free-master/PNG/64px", full.names = TRUE), 10)
anno = anno_image(image)
draw(anno, test = "png")
image[1:5] = ""
anno = anno_image(image)
draw(anno, test = "some of png")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.