plot3d-SlingshotDataSet: Plot Slingshot output in 3D

Description Usage Arguments Details Value Examples

Description

Tools for visualizing lineages inferred by slingshot.

Usage

1
2
3
## S3 method for class 'SlingshotDataSet'
plot3d(x, type = NULL, add = FALSE,
  dims = seq_len(3), aspect = "iso", ...)

Arguments

x

a SlingshotDataSet with results to be plotted.

type

character, the type of output to be plotted, can be one of "lineages", curves, or both (by partial matching), see Details for more.

add

logical, indicates whether the output should be added to an existing plot.

dims

numeric, which dimensions to plot (default is 1:3).

aspect

either a logical indicating whether to adjust the aspect ratio or a new ratio, see plot3d.

...

additional parameters to be passed to lines3d.

Details

If type == 'lineages', straight line connectors between cluster centers will be plotted. If type == 'curves', simultaneous princiapl curves will be plotted.

When type is not specified, the function will first check the curves slot and plot the curves, if present. Otherwise, lineages will be plotted, if present.

Value

returns NULL.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
library(rgl)
data("slingshotExample")
rd <- cbind(rd, rnorm(nrow(rd)))
sds <- slingshot(rd, cl, start.clus = "1")
plot3d(sds, type = 'b')

# add to existing plot
plot3d(rd, col = 'grey50', aspect = 'iso')
plot3d(sds, lwd = 3, add = TRUE)

## End(Not run)

kstreet13/slingshot documentation built on Aug. 1, 2018, 5:35 a.m.