xkcdTree {phytools} | R Documentation |
Function plots a tree in the style of http://xkcd.com (for instance, http://xkcd.com/867/).
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)
tree |
an object of class |
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 |
logical indicating whether to plot the tree with rightward orientation (if |
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.
plots a tree to PDF.
Liam Revell liam.revell@umb.edu; an anonymous user also contributed much of the code for internally called function xkcdLine
.