Get startedGet started for free

More ggnet Plotting Options

The real power of ggnet and other alternatives to igraph is that they offer a way to generate advanced plots with just a little parameterization. In the earlier example comparing the two plotting methods, they were somewhat similar. However, in this lesson we'll show how you can make more advanced plots. We'll take the Twitter data set and using igraph add several vertex attributes, centrality and community, and plot them quickly using ggnet.

The centrality and community membership attributes you created in the last exercise are still present.

This exercise is part of the course

Case Studies: Network Analysis in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Convert to a network object
retweet_net <- ___(___)

# Plot with ggnet2
ggnet2(
  ___
  # Set the node size to cent
  ___ = "___", 
  # Set the node color to comm
  ___ = "___", 
  # Set the color palette to Spectral
  ___ = "___", 
)
Edit and Run Code