View source: R/non_Seurat_related.R
sankeyPlot | R Documentation |
version: 2.0 define flow color as source//done depend getSankeyData()
sankeyPlot(sankeyDt, colors = NULL)
sankeyDt |
dataset produced by getSankeyData |
colors |
a color list for sankeyDt$node$node |
getSankeyData( table(mtcars$gear, mtcars$carb)) sankeyDt2=getSankeyData(table(mtcars$gear, mtcars$carb),"Gear_", "Carb_") sankeyPlot(sankeyDt2 ) sankeyPlot( getSankeyData( table(mtcars$gear, mtcars$carb), "Gear_", "Carb_", colorMethod="source") ) sankeyPlot( getSankeyData( table(mtcars$gear, mtcars$carb), "Gear_", "Carb_", colorMethod="target") ) sankeyPlot( getSankeyData( table(mtcars$gear, mtcars$carb), "Gear_", "Carb_", colorMethod="static") ) library(RColorBrewer); mypalette_1=brewer.pal(8,"Set1") sankeyPlot(sankeyDt2, colors=mypalette_1 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.