xBiheatmap | R Documentation |
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)
g |
an object of class "igraph" for a bipartitel graph with node attributes 'type', 'community' and 'contribution' |
which.communites |
a vector specifying which communites are visualised. If NULL (by default), all communites will be used |
colormap |
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 |
ncolors |
the number of colors specified over the colormap |
zlim |
the minimum and maximum z values for which colors should be plotted, defaulting to the range of the finite values of displayed matrix |
barwidth |
the width of the colorbar. Default value is 'legend.key.width' or 'legend.key.size' in 'theme' or theme |
barheight |
the height of the colorbar. Default value is 'legend.key.height' or 'legend.key.size' in 'theme' or theme |
nbin |
the number of bins for drawing colorbar |
legend.title |
the title of the colorbar. By default, it is ” |
x.rotate |
the angle to rotate the x tick labelings. By default, it is 60 |
x.text.size |
the text size of the x tick labelings. By default, it is 6 |
y.text.size |
the text size of the y tick labelings. By default, it is 6 |
legend.text.size |
the text size of the legend tick labelings. By default, it is 5 |
legend.title.size |
the text size of the legend titles. By default, it is 6 |
shape |
the number specifying the shape. By default, it is 19 |
size |
the number specifying the shape size. By default, it is 2 |
plot.margin |
the margin (t, r, b, l) around plot. By default, it is unit(c(5.5,5.5,5.5,5.5),"pt") |
font.family |
the font family for texts |
na.color |
the color for NAs. By default, it is 'grey80' |
intercept.color |
intercept color |
intercept.size |
intercept size |
a ggplot2 object
xBigraph
, xHeatmap
# 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) ## End(Not run)