Network histogram plot
plot.nethist.Rd
Drawing heatmap()
using an nethist
object with an user-specified order.
Arguments
- x
a nethist object from
nethist()
.- type
One of
nethist
orprob
.- idx_order
A numeric vector for index label order, which must be a permutation of
x$cluster
. IfNA
, it uses1:max(x$clsuter)
.- prob
A logical variable indicating block probabilities are printed on the plot. Default is FALSE.
- digits
integer indicating the number of decimal places for probability
- prob.cex
A numerical value of
cex
of probabilities.- prob.col
A color vector for network histogram values/probabilities on each bin.
- y
a dummy variable for S3 methods. Never used in the plotting.
- ...
other arguments to pass to
stats::heatmap()
. See details.
Details
... includes various graphical parameters
passes to stats::heatmap()
, then graphics::image()
.
Examples
if (FALSE) {
set.seed(2022)
#Generating Erdos-Renyi graph
A <- igraph::sample_gnp(200, 0.05)
hist_A <- nethist(A)
plot(hist_A)
#with user-specified order
idx<- unique(hist_A$cluster)
plot(hist_A, idx_order = idx)
#User-speicifc bin color pallete (see [graphical parameters])
plot(hist_polblog, idx_order = ind, col = colorRampPalette(colors=c("#FFFFFF","#000000"))(50))
#Users can print p_mat on the plot using user-specific colors
plot(hist_polblog, idx_order = ind, prob= TRUE, prob.col = "blue",
col = colorRampPalette(colors=c("#FFFFFF","#000000"))(50))
}