drawGraph: Draw a social network graph

Description Usage Arguments How to use it Examples

Description

Creates a two-dimensional plot of a social-network graph.

Usage

1
2
drawGraph(dnet, communities = T, design = layout.auto, color = "darkred",
  labelSize = 0.5, nodeSize = 3)

Arguments

dnet

A docNetwork object

communities

Logical. If TRUE (default), the function will use the communities data in docNetwork@communities slot and assign different colors to each community. If FALSE, the color will be determine by the color parameter.

design

Options for the design of the graph layout. All options inherited from the igraph package. Default is layout.auto, but other common options include layout.fructerman.reingold or layout.circle. Note that these layout options are actually R objects in the igraph environment, and so should not be placed in quotation marks when used here.

color

A string that defines the color of the nodes in the graph, if you want all nodes to be a single color. Default is dark red.

labelSize

A numeric value that sets the size of the labels for the nodes. To remove the labels altogether (often necessary for larger graphs), just set the size to 0.

nodeSize

A numeric value that sets the size of the nodes.

sub

Logical. If true, only a subset of the graph will be printed.

How to use it

drawGraph offers only a few options regarding layout. It's designed to generate easy-to-read results quickly. More advanced plotting options are available directly through igraph.

Examples

1
2
drawGraph(dnet)
drawGraph(dnet, labelSize = 0)

michaelgavin/htn documentation built on May 22, 2019, 9:50 p.m.