The Fruchterman-Reingold algorithm is a layout algorithm. It determines the position of the nodes of the graph. This is independent of the nodes' shape or labelling. In the book's example, remove vertex.label=NA
from the plot arguments to display labels. You can change the shape of the nodes with the vertex.shape
argument.
library(igraph)
library(gcookbook)
g <- graph.data.frame(madmen2, directed=TRUE)
plot(g, layout=layout.fruchterman.reingold, vertex.size=8, edge.arrow.size=0.5,
vertex.shape=sample(c("circle", "square", "rectangle"), vcount(g), replace=TRUE))
To fit the label inside the node, see Match vertex size to label size in igraph