tree_images: Add Image To Plotted Tree

Description Usage Arguments Details Author(s)

Description

Add images to the tree.

Usage

1
2
tree_images(images, offset = unit(0.5, "lines"), rot = 0, width = unit(1,
  "native"), name = NULL, gp = gpar())

Arguments

images

A named list of images; the name corresponds to the tip or node that it will be associated with. The actual images can be raster images (produced by as.raster) with it), a nativeRaster object or a matrix or array that as.raster can handle, or they can be vector images (class Picture, using the grImport package). The list may contain a mix of different types.

offset

Offset, in the time dimension. Watch out for tip/node labels (this will happily draw on top of the labels).

rot

Rotation of the image. May be a scalar or vector of the same length as images.

width

Width of the image, before rotation. Because rotation may eventually happen in two places this is potentially confusing. Don't use "native" units unless you want unpredictable results. Ironically, that is the default. May be a scalar or a vector of the same length as images.

name

Name to give the image within the tree

gp

Graphical parameters. According to the help for grid.raster all parameters will be ignored, including alpha, so this has no effect here. In future versions, vector images may allow use of some of these.

Details

Under heavy development at the moment, documentation pending.

There are two basic types of images that we might want to add: raster images (e.g., read by readPNG and plotted with grid.raster) and vector images (through a fairly torturous process).

Author(s)

Rich FitzJohn


richfitz/forest documentation built on May 27, 2019, 8:17 a.m.