visualization: Network visualization

Description Usage Arguments Value Examples

View source: R/visualization.R

Description

This function takes an igraph formatted network as input and exports a picture of the visulization. Mode of the layout, and size, color, shape of the nodes, edges and labels can be set according to the experiment data.

Usage

1
2
3
4
5
6
7
8
visualization(graph, layout = c("reingold.tilford", "circle", "random",
  "fruchterman.reingold", "sphere", "kamada.kawai", "lgl"),
  node.fill.color = "SkyBlue2", node.border.color = "Black",
  node.shape = c("circle", "square", "sphere", "csquare", "rectangle",
  "crectangle", "vrectangle", "none", "pie", "raster"), node.size = 15,
  node.label = "name", node.label.color = 1, node.label.size = 0.8,
  node.label.position = 0, edge.shape = 1, edge.width = 1,
  edge.color = "gray1", ...)

Arguments

graph

An igraph object.

layout

Mode of the layout, possible values are fruchterman.reingold, reingold.tilford, random, circle, kamada.kawai, lgl and sphere. See igraph for more information.

node.fill.color

The fill color of the vertex. Default value is SkyBlue2.

node.border.color

Border color the the vertex. Default value is Black.

node.shape

Shape of the vertex. currently circle, square, csquare, rectangle, crectangl, vrectangle and none are supported.

node.size

Size of the vertex. Default value is 15.

node.label

Label of the vertex. Specify NA to omit vertex labels. Default value is the vertex name.

node.label.color

Color of labels of the vertex. Default value is 1.

node.label.size

Font size of the vertex label. Default value is 0.8.

node.label.position

Positon of the vertex label. Default value is 0.

edge.shape

Shape of the edge. Default value is 1.

edge.width

Width of the edge. Default value is 1.

edge.color

Color of the edge. Default value is gray1.

...

Other arguments.

Value

A plot of the network.

Examples

1
2
3
4
5
local<-data.frame(1:5,2:6)
attribute<-data.frame(node=1:6,value=c(2.2,5.3,1.2,4.5,6.2,0.6))
net<-construction(input=local,local.net=TRUE,node.attribute=attribute)
visualization(net,layout="reingold.tilford")
visualization(net,layout="reingold.tilford",node.size=V(net)$value)

Example output

Loading required package: Rcpp
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: MCL
Loading required package: linkcomm
Loading required package: RColorBrewer

Welcome to linkcomm version 1.0-11

For a step-by-step guide to using linkcomm functions:
   > vignette(topic = "linkcomm", package = "linkcomm")
To run an interactive demo:
   > demo(topic = "linkcomm", package = "linkcomm")
To cite, see:
   > citation("linkcomm")
NOTE: To use linkcomm, you require read and write permissions in the current directory (see: help("getwd"), help("setwd"))

ProNet documentation built on May 30, 2017, 2:02 a.m.