archidraw {archiDART}R Documentation

Plotting Vectorized Root Systems

Description

Plotting vectorized root systems for selected observation dates using Data Analysis of Root Tracings (DART) output files and RSA data encoded with the Root System Markup Language (RSML). More information can be found in Delory et al (2016), Le Bot et al (2010), and Lobet et al (2015).

Usage

archidraw(inputlie=NULL, inputrsml=NULL, res=NULL, unitlength="px", rsml.connect=FALSE,
          rsml.date=NULL, unitangle="d", rotation=0, numdate=NULL, finalscale=NULL,
          coldate=par("col"), twod=NULL, main=NULL, xlab=NULL, ylab=NULL, zlab=NULL, 
          xlim=NULL, ylim=NULL, zlim=NULL,...)

Arguments

inputlie

A character string specifying the path to the folder containing the lie files created by DART. This argument could be the same as inputrsml.

inputrsml

A character string specifying the path to the folder containing the RSML files. This argument could be the same as inputlie.

res

Mandatory for DART files only. If images were acquired with a flatbed scanner: a numeric value specifying the resolution of the images used to vectorize the root systems with DART (resolution is expressed in dots/inch). If images were acquired with a digital camera: the ratio between the length of a reference object located on the image expressed in pixels and the actual length of the same object expressed in inches. For DART files, this argument must be specified if unitlength="mm" or unitlength="cm". For RSML files, the resolution is imported from the metadata and does not need to be specified as an argument.

unitlength

A character string specifying the unit of length that must be used to plot the root systems. The value acceptable for this argument could be either “px” for pixels, “cm” for centimetres or “mm” for millimetres.

rsml.connect

Only used for RSML files. A logical value that must be specified when is.null(inputrsml)=FALSE. If TRUE, the lateral roots are connected to their parent root (see details). If FALSE, no connection is made between daughter and mother roots.

rsml.date

Only used for RSML files. A numeric value specifying the root system age (the unit of time is defined by the user). If rsml.date=NULL, a default value of 1 is used by the function. If the root system age is stored as a continuous function along the root segments, a character string specifying the name/label of the function can be used (see details).

unitangle

A character string specifying the unit that must be used to express the calculated angles. The value acceptable for this argument could be either “d” for degrees (default value) or “r” for radians.

rotation

A numeric value specifying the angle (expressed in unitangle) that must be used to perform a clockwise rotation of 2D root systems (see details).

numdate

A numeric value or a vector of numeric values specifying the identification number of all observation dates at which the root system(s) must be plotted (see details).

finalscale

A logical value that must be specified when is.null(numdate)=FALSE. If TRUE, the root system architecture at the selected observation dates is plotted with the same axis scales to that used to draw the root system architecture at the last observation date. If FALSE, the root system architecture at each observation date is plotted using different axis ranges of coordinates (xlim and ylim).

coldate

A vector specifying the color(s) that must be used to plot the root system(s) at the selected observation dates (see details).

twod

When RSML files contain 3D RSA data, should the root systems be plotted in 2D? This argument can be NULL (3D plots) or a character vector giving the name of the axes to plot (can be c(“x”, “y”), c(“x”, “z”), or c(“y”, “z”)).

main

A character string giving a main title for the plot. When main=NULL, the default title for each plot is the name of the corresponding lie/RSML file.

xlab

A character string giving a label for the X axis. When xlab=NULL, the default label for the X axis is X (unitlength).

ylab

A character string giving a label for the Y axis. When ylab=NULL, the default label for the Y axis is Y (unitlength).

zlab

A character string giving a label for the Z axis. When zlab=NULL, the default label for the Z axis is Z (unitlength).

xlim

A numeric vector (length=2) giving the X limits of the plot using the same unit as unitlength.

ylim

A numeric vector (length=2) giving the Y limits of the plot using the same unit as unitlength.

zlim

A numeric vector (length=2) giving the Z limits of the plot using the same unit as unitlength.

...

Additional graphical parameters (see details).

Details

To run archidraw efficiently, DART and RSML files must have been saved with their appropriate extension (.lie or .rsml). By default (when numdate=NULL), only the root system architecture at the last observation date is plotted.

If the number of elements specified in coldate is lower than the number of observation dates, archidraw replicates the elements stored in coldate to plot the root system(s). When the number of elements specified in coldate is greater than the number of observation dates, only the first corresponding elements in coldate are used by archidraw to plot the root system(s).

After reading the RSML files located in inputrsml, the data associated with each root system are converted into a data frame possessing the same structure as the lie files created by DART. The archidraw function then uses these data frames to plot the root system(s).

The argument rsml.date is used to create a tps file for each root system located in inputrsml. If the root system age is stored as a continuous function along the root segments, the rsml.date argument can be a character string specifying the name/label of the function. For instance, the root system age at the first apparition of each node is stored as a continuous function called “age” in RSML files containing RSA data simulated with the ArchiSimple model (Pages et al (2013)). The “age” function attaches the root system age along the root segments, so that each node is associated with one age value. An RSML library containing 3D RSA data simulated with ArchiSimple is available here: doi: 10.5281/zenodo.208214.

The rsml.connect argument can be used to connect the lateral roots to their corresponding mother root. If rsml.connect=TRUE, each point starting a lateral root is connected to the nearest point located on its mother root. DBase is approximated by the distance between the parent root base and the point located on the mother root that is closest to the point starting a lateral root. Using RSML files, only RSA data associated with roots possessing a branching order lower or equal to 7 are used for the computation of RSA traits.

Due to technical limitations, it is sometimes easier to take a picture of a root system if it is rotated before image acquisition. In this case, the vectorized root system depicts a rotation compared with the natural plant root system. In order to make a correction, one can use rotation to specify an angle value expressed in unitangle to rotate the vectorized root system clockwise before plotting.

Additional graphical parameters can be used to personalize the graphical outputs (see par).

Making 3D plots with twod = NULL requires the rgl package, which is otherwise optional. If it is not installed (which can be annoying to do on some OSes), archidraw() will complain when you attempt a 3D plot but will still work normally for 2D.

Value

Returns a plot for each vectorized root system located in inputlie/inputrsml.

Author(s)

Benjamin M. Delory, Caroline Baudson, Yves Brostaux, Guillaume Lobet, Loic Pages, Patrick du Jardin, Pierre Delaplace

References

Delory B.M., Baudson C., Brostaux Y., Lobet G., du Jardin P., Pages L., Delaplace P. (2016) archiDART: an R package for the automated computation of plant root architectural traits, Plant and Soil, DOI: 10.1007/s11104-015-2673-4.

Le Bot J., Serra V., Fabre J., Draye X., Adamowicz S., Pages L. (2010) DART: a software to analyse root system architecture and development from captured images, Plant and Soil, DOI: 10.1007/s11104-009-0005-2.

Lobet G., Pound M.P., Diener J., Pradal C., Draye X., Godin C., Javaux M., Leitner D., Meunier F., Nacry P., Pridmore T.P., Schnepf A. (2015) Root System Markup Language: Toward a Unified Root Architecture Description Language, Plant Physiology, DOI: 10.1104/pp.114.253625.

Pages L., Becel C., Boukcim H., Moreau D., Nguyen C., Voisin, A-S. (2013) Calibration and evaluation of ArchiSimple, a simple model of root system architecture, Ecological Modelling, DOI: 10.1016/j.ecolmodel.2013.11.014.

See Also

par.

Examples

## Locate folder with DART and RSML files
path <- system.file("extdata", package="archiDART")

##-----------------
## DART files only
##-----------------

## Plot RSA at several observation dates
## One color for each observation date
archidraw(inputlie=path, res=75, unitlength="cm", numdate=c(15,31), finalscale=TRUE,
coldate=rainbow(31), lwd=2,las=1, bty="l", asp=1, xaxp=c(0,30,3), yaxp=c(0,90,9))

##-----------------
## RSML files only
##-----------------

## Plot RSA at the last observation date
## One color for each observation date
##2D plot
archidraw(inputrsml=path, unitlength="cm", rsml.date="age", coldate=rainbow(15), lwd=2,
twod=c("x", "y"), asp=1, las=1, bty="l")
          
##---------------------
## DART and RSML files
##---------------------

archidraw(inputlie=path, inputrsml=path, res=75, unitlength="cm", rsml.date="age",
coldate="black", twod=c("x", "y"), lwd=2, las=1, bty="l", asp=1)

[Package archiDART version 3.4 Index]