# NOT RUN {
# generate a graph
some_graph = graph.ring(10)
# add names to nodes
V(some_graph)$name = letters[1:vcount(some_graph)]
# extract edgelist
edgelist = get.edgelist(some_graph)
# (default) arc diagram
arcplot(edgelist, labels=V(some_graph)$name, las=1)
# get x-axis coordinates of nodes
xcoords = node_coords(edgelist, labels=V(some_graph)$name)
# arc diagram with various labels
arcplot(edgelist, show.labels=FALSE, show.nodes=TRUE)
mtext(V(some_graph)$name, side=1, line=0, at=xcoords)
mtext(rep("node",10), side=1, line=1, at=xcoords, col="gray90")
# }
Run the code above in your browser using DataLab