PlotVariable: PlotVariable

View source: R/5_plotFunctions.R

PlotVariableR Documentation

PlotVariable

Description

Plot a variable for all nodes

Usage

PlotVariable(
  fsom,
  variable,
  variableName = "",
  colorPalette = FlowSOM_colors,
  lim = NULL,
  ...
)

Arguments

fsom

FlowSOM object

variable

A vector containing a value for every cluster

variableName

Label to show on the legend

colorPalette

Color palette to use. Can be a function or a vector.

lim

Limits for the scale

...

Additional arguments to pass to PlotFlowSOM, e.g. view, backgroundValues, equalNodeSize ...

Details

Plot FlowSOM grid or tree, colored by node values given in variable

See Also

PlotStars, QueryStarPlot, PlotFlowSOM, PlotLabels, PlotNumbers, PlotMarker, PlotPies, PlotSD

Examples

# Build FlowSOM model
fileName <- system.file("extdata", "68983.fcs", package = "FlowSOM")
flowSOM.res <- FlowSOM(fileName, 
                       compensate = TRUE, transform = TRUE, scale = FALSE,
                       colsToUse = c(9, 12, 14:18),
                       nClus = 10,
                       seed = 1)
                       
# Plot some random values
rand <- runif(flowSOM.res$map$nNodes)
PlotVariable(flowSOM.res, 
             variable = rand,
             variableName = "Random")
             
PlotVariable(flowSOM.res, 
             variable = flowSOM.res$metaclustering,
             variableName = "Metaclustering") %>% 
  AddLabels(labels = flowSOM.res$metaclustering)             
   

SofieVG/FlowSOM documentation built on Feb. 1, 2024, 11:33 a.m.