Learn R Programming

FlowSOM (version 1.4.0)

PlotClusters2D: Plot nodes on scatter plot

Description

Plot a 2D scatter plot. All cells of fsom$data are plotted in black, and those of the selected nodes are plotted in red. The nodes in the grid are indexed starting from the left bottom, first going right, then up. E.g. In a 10x10 grid, the node at top left will have index 91.

Usage

PlotClusters2D(fsom, marker1, marker2, nodes, main = "", col = "#FF0000", maxBgPoints = NULL, ...)

Arguments

fsom
FlowSOM object, as generated by BuildMST
marker1
Marker to plot on the x-axis
marker2
Marker to plot on the y-axis
nodes
Nodes of which the cells should be plotted in red
main
Title of the plot
col
Colors for all the cells in the selected nodes (ordered array)
maxBgPoints
Maximum number of background points to plot
...
Other parameters to pass on to plot

Value

Nothing is returned. A plot is drawn in which all cells are plotted in black and the cells of the selected nodes in red.

See Also

PlotNumbers,PlotCenters, BuildMST

Examples

Run this code
   # Read from file, build self-organizing map and minimal spanning tree
   fileName <- system.file("extdata","lymphocytes.fcs",package="FlowSOM")
   flowSOM.res <- ReadInput(fileName, compensate=TRUE,transform=TRUE,
                            scale=TRUE)
   flowSOM.res <- BuildSOM(flowSOM.res,colsToUse=c(9,12,14:18))
  flowSOM.res <- BuildMST(flowSOM.res)
   
   # Plot cells
   PlotClusters2D(flowSOM.res,1,2,91)

Run the code above in your browser using DataLab