Skip to contents

Plot cell type composition as bar charts.

Usage

plot_composition(
  results,
  type = c("global", "per_spot"),
  top_spots = 20,
  colors = NULL
)

Arguments

results

Results from run_cytospace.

type

Type of plot:

"global"

Overall cell type proportions

"per_spot"

Proportions per spot (stacked bars)

top_spots

Number of top spots for per_spot plot. Default is 20.

colors

Named vector of colors.

Value

A ggplot2 object.