Pages

Wednesday, February 8, 2012

New version of phenogram with user control of axis dimensions

An anonymous user request was recently made to add the potential to control the axis dimensions in phenogram. I guessed (correctly) that this would not be too hard, and so I have added this capability to the newest version of the function (direct link to code here).

This is specified as a list containing two components: trait and time. The former should be a vector of length 2 specifying the dimensions of the vertical (trait) axis; and the latter a vector of length 2 giving the desired dimensions on the horizontal (time since the root) axis.

Within the function itself, I have now added the following lines of code (before calling plot.window to create the graph):

This code just uses the vectors provide in axes to specify the dimensions in x & y for the plot - or, if none have been provided, it uses the range of x and nodeHeights(tree) (plus a little bit of extra space to print tip labels).

1 comment:

About this blog

This web-log chronicles the development of new tools for phylogenetic analyses in the phytools R package. Unless you a reading a very recent page of the blog, I recommend that you install the latest CRAN version of phytools (or latest beta release) before attempting to replicate any of the analyses of this site. That is because the linked functions may be archived, and very likely have been replaced by newer versions.