add.scalebar | R Documentation |
add.scalebar Add a scale bar to the plot.
add.scalebar(obj, len = 1, x0 = NA, y0 = NA, lwd = 2, ...)
obj: |
'phyloLayout' S3 object generated by 'tree.layout' |
len: |
length of scale bar to draw (defaults to 1) |
x0: |
(optional) override default horizontal placement of bar |
y0: |
(optional) override default vertical placement of bar. Note both x and y need to be specified to override the default. |
...: |
additional graphical parameters to pass to 'segments', such as 'cex', 'col' and 'lwd'. |
require(ape)
phy <- rcoal(30)
Y <- tree.layout(phy, type='r')
plot(Y)
add.scalebar(Y, len=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.