xBiheatmap
is supposed to visualise bipartitle graph communities
using heatmap.
xBiheatmap(g, which.communites = NULL, colormap = "spectral",
ncolors = 64, zlim = NULL, barwidth = 0.3, barheight = NULL,
nbin = 64, legend.title = "", x.rotate = 60, x.text.size = 3,
y.text.size = 3, legend.text.size = 4, legend.title.size = 6,
shape = 19, size = 0.5, plot.margin = unit(c(5.5, 5.5, 5.5, 5.5),
"pt"),
font.family = "sans", na.color = "transparent",
intercept.color = "grey95", intercept.size = 0.3)
an object of class "igraph" for a bipartitel graph with node attributes 'type', 'community' and 'contribution'
a vector specifying which communites are visualised. If NULL (by default), all communites will be used
short name for the colormap. It can be one of "jet" (jet colormap), "bwr" (blue-white-red colormap), "gbr" (green-black-red colormap), "wyr" (white-yellow-red colormap), "br" (black-red colormap), "yr" (yellow-red colormap), "wb" (white-black colormap), and "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta). Alternatively, any hyphen-separated HTML color names, e.g. "blue-black-yellow", "royalblue-white-sandybrown", "darkgreen-white-darkviolet". A list of standard color names can be found in http://html-color-codes.info/color-names
the number of colors specified over the colormap
the minimum and maximum z values for which colors should be plotted, defaulting to the range of the finite values of displayed matrix
the width of the colorbar. Default value is 'legend.key.width' or 'legend.key.size' in 'theme' or theme
the height of the colorbar. Default value is 'legend.key.height' or 'legend.key.size' in 'theme' or theme
the number of bins for drawing colorbar
the title of the colorbar. By default, it is ''
the angle to rotate the x tick labelings. By default, it is 60
the text size of the x tick labelings. By default, it is 6
the text size of the y tick labelings. By default, it is 6
the text size of the legend tick labelings. By default, it is 5
the text size of the legend titles. By default, it is 6
the number specifying the shape. By default, it is 19
the number specifying the shape size. By default, it is 2
the margin (t, r, b, l) around plot. By default, it is unit(c(5.5,5.5,5.5,5.5),"pt")
the font family for texts
the color for NAs. By default, it is 'grey80'
intercept color
intercept size
a ggplot2 object
# NOT RUN {
# 1) generate a random bipartite graph
set.seed(123)
g <- sample_bipartite(100, 50, p=0.1)
V(g)$name <- paste0('node_',1:vcount(g))
# }
# NOT RUN {
# 2) obtain its community
ig <- xBigraph(g)
# 3) heatmap of its community
gp <- xBiheatmap(ig)
# }
Run the code above in your browser using DataLab