hisafe_root3D: Create a 3D plot of tree coarse root topology

Description Usage Arguments Details Author(s) See Also Examples

View source: R/roots.R

Description

Creates a 3D plot of tree coarse root topology. The plot is saved as soon as rgl has finished drawing it on the screen. The default view is typically not very good, so zooming/rotating the plot while it's drawing can allow you to save a better plot. rgl::rgl.snapshot can also be used directly to save the plot once the desired view is found.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
hisafe_root3D(
  hop,
  date,
  simu.name = NULL,
  tree.id = 1,
  color.var = paste0("treeRootDensity_", tree.id),
  color.palette = c("#FFFFD4", "#FED98E", "#FE9929", "#D95F0E", "#993404"),
  bg = "white",
  grid = FALSE,
  box = FALSE,
  output.path = NULL,
  ...
)

Arguments

hop

An object of class hop.

date

A character string of the date to plot, in the format "YYYY-MM-DD" or of class Date.

simu.name

A character vector of legnth 1 indicating the SimulationName within hop to plot.

tree.id

A numeric vector of lenght 1 indicating the tree id to plot.

color.var

A character string indicating the name of the voxels variable to use for coloring the roots.

color.palette

A character vector of colors for coloring the roots to pass to grDevices::colorRampPalette.

bg

A character string of hex value or R standard color name defining the plot background color.

grid

A logical indicating whether the plot should include an x,y,z grid.

box

A logical indicating whether the plot should include a boundign box.

output.path

A character string indicating the path to the directory where plots should be saved. If NULL, the experiment/simulation path is read from the hop object, and a directory is created there called "analysis/roots3D". The plot will be saved in this directory as "simu.name_date_root3D.png".

...

Other arguments passed to rgl::par3d.

Details

Key for voxel output "colonisationDirection":

Positive z (+z) is in the downward direction. Everything above specifies the direction from the parent voxel to the child voxel and is stored in the child.

Author(s)

Gregoire Talbot talbot@mailoo.org

Kevin Wolz

See Also

Other hisafe visualization functions: hisafe_slice(), hisafe_snapshot()

Examples

1
2
3
4
## Not run: 
root3D(hop = myhop, date = "2000-07-01")

## End(Not run)

kevinwolz/hisafer documentation built on Oct. 19, 2020, 4:43 p.m.