plotEmbedding: Plot 2D embedding

View source: R/plot.R

plotEmbeddingR Documentation

Plot 2D embedding

Description

Plot 2D embedding

Usage

plotEmbedding(
  emb,
  groups = NULL,
  colors = NULL,
  cex = 0.6,
  alpha = 0.4,
  gradientPalette = NULL,
  zlim = NULL,
  s = 1,
  v = 0.8,
  min.group.size = 1,
  show.legend = FALSE,
  mark.clusters = FALSE,
  mark.cluster.cex = 2,
  shuffle.colors = FALSE,
  legend.x = "topright",
  gradient.range.quantile = 0.95,
  verbose = FALSE,
  unclassified.cell.color = "lightgrey",
  group.level.colors = NULL,
  xlab = NA,
  ylab = NA,
  ...
)

Arguments

emb

dataframe with x and y coordinates

groups

factor annotations for rows on emb for visualizing cluster annotations

colors

color or numeric values for rows on emb for visualizing gene expression

cex

point size

alpha

point opacity

gradientPalette

palette for colors if numeric values provided

zlim

range for colors

s

saturation of rainbow for group colors

v

value of rainbow for group colors

min.group.size

minimum size of group in order for group to be colored

show.legend

whether to show legend

mark.clusters

whether to mark clusters with name of cluster

mark.cluster.cex

cluster marker point size

shuffle.colors

whether to shuffle group colors

legend.x

legend position ie. 'topright', 'topleft', 'bottomleft', 'bottomright'

gradient.range.quantile

quantile for mapping colors to gradient palette

verbose

verbosity

unclassified.cell.color

cells not included in groups will be labeled in this color

group.level.colors

set group level colors. Default uses rainbow.

xlab

x-axis label.

ylab

y-axis label.

...

Additional parameters to pass to BASE::plot

Value

None

Examples

data(mOB)
pos <- mOB$pos
gexp <- normalizeCounts(mOB$counts, log=FALSE, verbose=FALSE)['Camk4',]
plotEmbedding(pos, colors=scale(gexp)[,1], zlim=c(-2,2), cex=3)


JEFworks/MERingue documentation built on June 11, 2022, 4:16 a.m.