condorPlotCommunities: Plot adjacency matrix with links grouped and colored by...

View source: R/CONDOR.R

condorPlotCommunitiesR Documentation

Plot adjacency matrix with links grouped and colored by community

Description

This function will generate the network link 'heatmap' with colored dots representing within-community links and black dots between-community links

Usage

condorPlotCommunities(
  condor.object,
  color_list,
  point.size = 0.01,
  xlab = "SNP",
  ylab = "Gene"
)

Arguments

condor.object

output of either condorCluster or condorModularityMax

color_list

vector of colors accepted by col inside the plot function. There must be as many colors as communities.

point.size

passed to cex in the plot

xlab

x axis label

ylab

y axis label

Value

produces a plot output.

Note

For the condor paper http://arxiv.org/abs/1509.02816, I used 35 colors from the "Tarnish" palette with "hard" clustering

References

http://tools.medialab.sciences-po.fr/iwanthue/ for a nice color generator at

Examples

r = c(1,1,1,2,2,2,3,3,3,4,4);
b = c(1,2,3,1,2,4,2,3,4,3,4);
reds <- c("Alice","Sue","Janine","Mary")
blues <- c("Bob","John","Ed","Hank")
elist <- data.frame(red=reds[r],blue=blues[b])
condor.object <- createCondorObject(elist)
condor.object <- condorCluster(condor.object)
condorPlotCommunities(condor.object,
color_list=c("darkgreen","darkorange"),point.size=2,
xlab="Women",ylab="Men")

netZoo/netZooR documentation built on Oct. 16, 2024, 10:23 p.m.