Learn R Programming

phytools (version 0.2-40)

xkcdTree: Plot xkcd style tree

Description

Function plots a tree in the style of http://xkcd.com (for instance, http://xkcd.com/867/).

Usage

xkcdTree(tree, file=NULL, gsPath=NULL, fsize=2, lwd=7, color="blue",
     dim=c(8.5,11), jitter=0.001, waver=c(0.1,0.1), tilt=0, right=TRUE)

Arguments

tree
an object of class "phylo".
file
an output file name. If the ending ".pdf" is not provided, it will be automatically appended.
gsPath
for Windows, the full path to the Ghostscript executable. If not provided, the default for gs9.06 is used.
fsize
font size.
lwd
line width.
color
color for lines.
dim
vector of horizontal and vertical dimensions for the output PDF.
jitter
amount of stochasticity ("jitter") for plotting - higher is more jittery.
waver
a vector with approximate horizontal and vertical wavelength for plotting - lower is more wavery.
tilt
declination from horizontal (or vertical, if right=FALSE for tip labels, in degrees.
right
logical indicating whether to plot the tree with rightward orientation (if TRUE) or upwards.

Value

  • plots a tree to PDF.

Details

Uses package "extrafont" and font "xkcd.ttf". Before using, install package "extrafont" and add font "xkcd.ttf". Hopefully, if you have not done that, a sensible error will still be returned.

See Also

fancyTree, plot.phylo