Learn R Programming

destiny (version 2.0.4)

plot.DPT: Plot DPT

Description

Plots diffusion components from a Diffusion Map and the accompanying Diffusion Pseudo Time (DPT)

Usage

plot.DPT(x, root = NULL, paths_to = integer(0L), dcs = 1:2,
  divide = integer(0L), w_width = 0.1, col_by = "dpt",
  col_path = rev(palette()), col_tip = "red", ..., col = NULL,
  legend_main = col_by)

# S4 method for DPT,numeric plot(x, y, ...)

# S4 method for DPT,missing plot(x, y, ...)

Arguments

x
A DPT object.
paths_to
Numeric Branch IDs. Are used as target(s) for the path(s) to draw.
dcs
The dimensions to use from the DiffusionMap
divide
If col_by = 'branch', this specifies which branches to divide. (see branch_divide)
w_width
Window width for smoothing the path (see smth.gaussian)
col_by
Color by 'dpt' (DPT starting at branches[[1]]), 'branch', or a veriable of the data.
col_path
Colors for the path or a function creating n colors
col_tip
Color for branch tips
...
Graphical parameters supplied to plot.DiffusionMap
col
See plot.DiffusionMap. This overrides col_by
legend_main
y, root
Root branch ID. Will be used as the start of the DPT. (default: lowest branch ID) (If longer than size 1, will be interpreted as c(root, branches))

Value

The return value of the underlying call is returned, i.e. a scatterplot3d or rgl object for 3D plots.

Examples

Run this code
data(guo_norm)
dm <- DiffusionMap(guo_norm)
dpt <- DPT(dm, branching = TRUE)
plot(dpt)
plot(dpt, 2L,      col_by = 'branch')
plot(dpt, 1L, 2:3, col_by = 'num_cells')
plot(dpt, col_by = 'DPT3')

Run the code above in your browser using DataLab