Statistical Computing ... > length(V(g)) [1] 441 > length(E(g)) [1] 840 > hist(degree(g), breaks=c(0,2,3,4), freq=TRUE, xlab='vertex degree', ylab='frequency', cex.lab=1.25, main='', col=c('gray10','gray40','gray70'), labels=TRUE, axes=FALSE, cex=2) The degree statistics of the 20x20 lattice can be analytically determined. There must exist 4 corner vertices each having a degree of 2. There must be 19