I am trying to produce a black-and-white network diagram using node symbols (point shapes) to differentiate node types, instead of using colors. However, I cannot find a way to do this using the gplot function in the package sna. Here's a simple example:
library(network)
library(sna)
set seed(100)
net <- as.network(matrix(sample(c(0:1),100,replace=TRUE),nrow=10,ncol=10))
symbols <- rep(c(1:2),5)
gplot(net,pch=symbols)
At least with my version of r and sna, gplot just ignores pch. I found documentation here which seems to indicate that at one point vertex.pch could be used to set node symbols. However, this is no longer in the sna documentation and the following code results in an error:
gplot(net,vertex.pch=symbols)
Is there a way to substitute symbols for colors in a network plot, ideally using gplot (I am trying to produce some black and white versions of existing color plots, so I'd rather not start from scratch if possible)?