posteriorCurvePlot: Posterior curve plot.

Description Usage Arguments

View source: R/plotting.R

Description

Flexible methods for plotting posterior mean curves or samples of posterior mean curves.

Usage

1
2
3
4
posteriorCurvePlot(X, fit, posterior_mean = TRUE, nsamples = 50, nnt = 80,
  point_colour = "darkred", curve_colour = "black", point_alpha = 1,
  curve_alpha = 0.5, grid_nrow = NULL, grid_ncol = NULL,
  use_cowplot = TRUE, standardize_ranges = FALSE)

Arguments

X

The representation(s) passed to fitPseudotime (either a matrix or list of matrices)

fit

The stanfit object returned by fitPseudotime

posterior_mean

Logical. If TRUE (default) then the posterior mean curve is plotting at the MAP estimates of all inferred parameters. If FALSE, then nsamples will be randomly drawn from the posterior of the parameters and a curve plotted for each.

nsamples

The number of new points at which to calculate the posterior mean curves.

nnt

Number of new pseudo time points at which to plot the posterior mean curves.

point_colour

The colour of the points (cells) to draw

curve_colour

The colour of the curves to draw

point_alpha

The alpha (opacity) of the points

curve_alpha

The alpha (opacity) of the curves. Note that this is just a suggested value and the function will choose an appropriate value depending on the number of samples to plot. This is chosen as (1 - α) * exp(1 - nsamples) + α.

grid_nrow

If more than one representation is present then they're plotted in a grid. By default cowplot will choose the number of rows, but this overrides.

grid_ncol

If more than one representation is present then they're plotted in a grid. By default cowplot will choose the number of columns, but this overrides.

use_cowplot

Logical. Determines whether to use theme_cowplot or theme_bw.

standardize_ranges

Logical. If plotting multiple representations it can be useful to have x and y lims that don't depend on the fit (so plots align correctly). If this is set to FALSE, ggplot2 calculates the x and y limits. If this is set to TRUE, the x and y limits are set to the minimum and maximum of the X values plus or minus 6% of the range between them.


kieranrcampbell/pseudogp documentation built on May 20, 2019, 9:24 a.m.