View source: R/plot_node_ages.R
plot_node_ages | R Documentation |
'plot_node_ages' plots a chronograms given in 'phy' and adds age data [points()] given in 'calibration_summary' to the corresponding nodes.
plot_node_ages( phy, time_depth = NULL, plot_type = "phyloch", mai1, mai2, mai3, mai4, omi1, omi2, omi3, omi4, title = "Chronogram", cex_title = graphics::par("cex"), pos_title = 1, cex_tiplabels = graphics::par("cex"), geologic_timescale = "strat2012", geologic_unit = "period", pos_axis = 1, cex_axis = graphics::par("cex"), axis_label = "Time (MYA)", center_axislabel = 0.5, cex_axislabel = graphics::par("cex"), calibration_summary, pch = 20, color_pch, transparent_pch = NULL, cex_pch = graphics::par("cex"), color_bars = "#80808050", lty_bars = "solid", lwd_bars = 7, add_legend = TRUE, cex_legend = cex_axislabel * 0.5, x_legend = NULL, y_legend = NULL, ... )
phy |
A 'phylo' object with branch length proportional to time. |
time_depth |
A numeric vector indicating the upper limit for the time scale on the x axis. |
plot_type |
A character vector of length one indicating the type of plot to generate. Options are:
|
mai1 |
A numeric value indicating internal plot margin sizes in inches. 'mai4' is particularly important as it indicates the space needed for plotting whole tip labels on the right margin of the plot. |
mai2 |
A numeric value indicating internal plot margin sizes in inches. 'mai4' is particularly important as it indicates the space needed for plotting whole tip labels on the right margin of the plot. |
mai3 |
A numeric value indicating internal plot margin sizes in inches. 'mai4' is particularly important as it indicates the space needed for plotting whole tip labels on the right margin of the plot. |
mai4 |
A numeric value indicating internal plot margin sizes in inches. 'mai4' is particularly important as it indicates the space needed for plotting whole tip labels on the right margin of the plot. |
omi1 |
A numeric value indicating outter plot margin sizes in inches. |
omi2 |
A numeric value indicating outter plot margin sizes in inches. |
omi3 |
A numeric value indicating outter plot margin sizes in inches. |
omi4 |
A numeric value indicating outter plot margin sizes in inches. |
title |
A character string providing the title for the plot. |
cex_title |
A numeric indicating character expansion for the title. Default to value given by 'graphics::par("cex")'. |
pos_title |
Indicates the line position of the title. Default to 1. |
cex_tiplabels |
A numeric value indicating **c**haracter **ex**pansion (i.e., size scaling factor) of tip labels in 'chronogram'. Default to value given by 'graphics::par("cex")'. |
geologic_timescale |
A dataframe of geochronological limits. |
geologic_unit |
A character vector used to select geological time units that shall be displayed. When using |
pos_axis |
Indicates the line position of the axis. Default to 1. |
cex_axis |
A numeric indicating character expansion for the axis. Default to value given by 'graphics::par("cex")'. |
axis_label |
A character string used to provide information on time units. Defaults to "Time (MYA)" (time in million years ago). If NULL, time units are not added. |
center_axislabel |
A numeric indicating centering position of time axis label. Default to 0.5. |
cex_axislabel |
A numeric indicating character expansion for the time axis label. Default to value given by 'graphics::par("cex")'. |
calibration_summary |
An output of [datelife:::summary.matchedCalibrations()] |
pch |
A numeric vector indicating the symbol to plot age points. See [graphics::par()] for options. Defaults to 20 = "bullet circle". |
color_pch |
A named vector of colors. Names must correspond to study names in 'calibration_summary$in_phy$references'. If vector is not named, colors will be recycled. |
transparent_pch |
A numeric value ranging from 10-99, indicating transparency for 'color_pch'. Default to 'NULL', no transparency. |
cex_pch |
A numeric value indicating **c**haracter **ex**pansion (i.e., size scaling factor) of node age point symbols defined by 'pch'. Default to 1. |
color_bars |
A character vector of one element indicating the color for node age distribution bars. Defaults to "#80808050", which is hex for gray ("#808080") with 50% transparency. |
lty_bars |
A numeric vector or character string indicating the plotting line type for bars. See [graphics::par()] for options. Default to "solid". |
lwd_bars |
A numeric vector indicating the line width for age distribution bars. See [graphics::par()] for options. Default to 7. |
add_legend |
Default to 'TRUE', adds a legend to the left of the plot. |
cex_legend |
A numeric value indicating **c**haracter **ex**pansion (i.e., size scaling factor) of legend. Default to one half the size of the axis label, 'cex_axislabel * 0.5'. |
x_legend |
the x co-ordinate to be used to position the legend on the left side of the plot. |
y_legend |
the y co-ordinate to be used to position the legend on the left side of the plot. |
... |
Arguments passed on to
|
Plot are margin sizes as defined by [graphics::par()$mai] and [graphics::par()$omi] are overruled within the function. To modify them you have to use the arguments 'mai1', 'mai2', 'mai3' and 'mai4', and omi1, omi2, omi3 and omi4.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.