Exercise

ggnet Basics

There are many ways to visualize a graph beyond the basic igraph plotting. A common framework is to use ggplot2, which provides a way to make high quality plots with minimal graphical parameter setting. In this lesson, we'll cover the basics of creating a plot with ggnet2. This package builds graph plots using the ggplot2 framework. While it produces nice graphics, it relies on graph objects from a different R library network, but it does make plots with a ggplot2 aesthetic without quite the formal grammar of graphics used by ggnetwork, as we'll see in the next lesson. Therefore, you'll notice a lot of overlap in the syntax with igraph (node.size is the same as vertex.size, and edge.size is the same name).

Instructions 1/2

undefined XP
    1
    2
  • Calculate the induced subgraph of retweet_graph and the vertices with IDs specified by verts.
  • Plot the subgraph. Some arguments to plot() have been specified for you, to make the plot look pretty.