13.5 Using Text Labels in a Network Graph

13.5.1 Problem

You want to use text labels in a network graph.

13.5.3 Discussion

Another way to achieve the same effect is to modify the plot object, instead of passing in the values as arguments to plot(). To do this, use V()$xxx<- instead of passing a value to a vertex.xxx argument. For example, this will result in the same output as the previous code:

The properties of the edges can also be set, either with the E() function or by passing values to edge.xxx arguments (Figure 13.11):

A network graph with labeled and colored edges

Figure 13.11: A network graph with labeled and colored edges

13.5.4 See Also

See ?igraph.plotting for more information about graphical parameters in igraph.