Learn R Programming

flowWorkspace (version 3.16.0)

plot,GatingSet,missing-method: plot a gating tree

Description

Plot a tree/graph representing the GatingHierarchy

Usage

"plot"(x, y, ...)
"plot"(x, y, ...)

Arguments

x
GatingHierarchy or GatingSet. If GatingSet, the first sample will be used to extract gating tree.
y
missing or character specifies.
...
other arguments:
  • boolean: TRUE|FALSE logical specifying whether to plot boolean gate nodes. Defaults to FALSE.
  • showHidden: TRUE|FALSE logical whether to show hidden nodes
  • dir: character Default is NULL, which render the gating tree in regular R plot device. Otherwise it specifies a folder where the gating tree is output to a svg image with some interactivity (e.g. when click on each node, the actual gates will be displayed) This interactivity currently only works when the svg is rendered within a HTML webpage (e.g. generated as knitr report)
  • svg.par: a list of parameters passed to devSVGTips
  • png.par: a list of parameters passed to png
  • layout: See layoutGraph in package Rgraphviz
  • width: See layoutGraph in package Rgraphviz
  • height: See layoutGraph in package Rgraphviz
  • fontsize: See layoutGraph in package Rgraphviz
  • labelfontsize: See layoutGraph in package Rgraphviz
  • fixedsize: See layoutGraph in package Rgraphviz

Examples

Run this code
## Not run: 
#  #gs is a GatingSet
#  plot(gs) # the same as plot(gs[[1]])
#  #plot a substree rooted from 'CD4'
#  plot(gs, "CD4")
# 
#  # output as svg format with onclick event of each node displaying the gate(saved as png files) within pop-up window
#  plot(gs[[1]], dir = "myFolder")
# 
#  # customize the size of svg and png files
#  plot(gh, dir = "myFolder", svg.par =list(width = 7, height = 7), png.par = list(width = 200, height = 200)
# 
#  #each node link to multiple gates across samples
#  #here is the example code showing how to embed
#  #the svg output within knitr quick report
# 
#  #+ eval=T, results = "asis", message = F
#  svgFile <- plot(gs, dir = './svg', svg.par =list(width = 7, height = 7), png.par = list(width = 400, height = 400 ))
#  cat("<embed src=", svgFile, " type='image/svg+xml' />", sep = "")
# ## End(Not run)

Run the code above in your browser using DataLab