PlotModel: Create a 3D spinning plot for a given model

Description Usage Arguments Details Value Author(s) See Also

View source: R/phrapl-plot.R

Description

This uses rgl to create a depiction of a given model, complete with migration arrows. You can spin this using the cursor.

Usage

1
2
3
PlotModel(migrationIndividual, parameterVector = NULL, taxonNames = NULL, 
time.axis = FALSE, time.axis.col = "black", apply.base = FALSE, base.color = 
"black", new.window = TRUE)

Arguments

migrationIndividual

This is the chosen model. If you want model 17 from migrationArray, you could pass this in as migrationIndividual=migrationArray[[17]]

parameterVector

If you have numeric parameter estimates, you can pass them in here. This affects things like node height, migration rate arrow width, etc. Otherwise, it will plot a generic model.

taxonNames

If instead of population A, B, ... you want Oahu, Hawaii, ... you can pass them in as a vector.

time.axis

If you want to have a time axis, enter TRUE.

time.axis.col

If you want a particular color for the time axis, enter it here.

apply.base

This will draw a box at the rootward end of the population history. This can be convenient for 3D printing.

base.color

What color should the box be, if one is drawn.

new.window

If FALSE, overwrites the current image if one exists. By default, TRUE, so each time you run this function you create another window.

Details

This requires rgl, which periodically becomes hard to install on certain platforms.

Value

Creates a stunning image.

Author(s)

Brian O'Meara

See Also

SaveMovie, ~~~


phrapl documentation built on May 2, 2019, 4:52 p.m.