PlotEmbed: Helper function for plotting the embedding

View source: R/utils.R

PlotEmbedR Documentation

Helper function for plotting the embedding

Description

Convenience plotting function. Takes the embed matrix which is the output of EmbedSOM(), together with a multitude of arguments that set how the plotting is done.

Usage

PlotEmbed(
  embed,
  value = 0,
  red = 0,
  green = 0,
  blue = 0,
  fr = PlotId,
  fg = PlotId,
  fb = PlotId,
  fv = PlotId,
  powr = 0,
  powg = 0,
  powb = 0,
  powv = 0,
  sdsr = 1,
  sdsg = 1,
  sdsb = 1,
  sdsv = 1,
  clust = NULL,
  nbin = 256,
  maxDens = NULL,
  fdens = sqrt,
  limit = NULL,
  alpha = NULL,
  fsom,
  data,
  col,
  cluster.colors = ClusterPalette,
  expression.colors = ExpressionPalette,
  na.color = grDevices::rgb(0.75, 0.75, 0.75, if (is.null(alpha)) 0.5 else alpha/2),
  plotf = PlotDefault,
  ...
)

Arguments

embed

The embedding from EmbedSOM(), or generally any 2-column matrix of coordinates

value

The column of data to use for coloring the plotted points

red, green, blue

The same, for individual RGB components

fv, fr, fg, fb

Functions to transform the values before they are normalized

powv, powr, powg, powb

Passed to corresponding NormalizeColor() calls as pow

sdsv, sdsr, sdsg, sdsb

Passed to NormalizeColor() as sds

clust

Cluster labels (used as a factor)

nbin, maxDens, fdens

Parameters of density calculation, see PlotData()

limit

Low/high offset for NormalizeColor() (obsolete&ignored, will be removed)

alpha

Default alpha value of points

fsom

FlowSOM object

data

Data matrix, taken from fsom parameter by default

col

Overrides the computed point colors with exact supplied colors.

cluster.colors

Function to generate cluster colors, default ClusterPalette()

expression.colors

Function to generate expression color scale, default ExpressionPalette()

na.color

Color to assign to NA values

plotf

Plot function, defaults to graphics::plot() slightly decorated with pch='.', cex=1

...

Extra params passed to the plot function

Examples

EmbedSOM::PlotEmbed(cbind(rnorm(1e5),rnorm(1e5)))

EmbedSOM documentation built on July 5, 2022, 5:14 p.m.