Last data update: 2014.03.03

R: Exploratory visualization of information spread of biological...
plot.spiral.graphR Documentation

Exploratory visualization of information spread of biological networks

Description

Plots a graph in a spirical fashion, highly connected nodes are placed at center.

Usage


## S3 method for class 'spiral.graph'
plot(x, tp=61, vertex.color=NULL, 
color.random=FALSE, rank.function=NULL,tkplot=FALSE,
v.size=2, e.size=.5,e.curve=.5, v.lab=FALSE, bg="black",
e.col="grey", skip=0, ...)

Arguments

x

x is a graph object created from an adjacency matrix or from a tabular data of two columns using graph() function available in igraph

tp

is a numeric value, a tuning parameter to get different spirical shapes.

color.random

is alogical value, if TRUE, picks colors randomly and assign to nodes depending on their degree

rank.function

is a 'function' class returns a two column matrix with number of rows equal to the total nodes in the graph.

tkplot

it is a boolean variable, if it is true, function will use 'tkplot' function to plot a graph, if it is false function will use plot function with the black background.

v.size

is a numeric value or a numeric vector which contains numeric values to assign the size of nodes.

e.size

is a numeric value to assign the width to edges.

e.curve

is a positive numeric value that adjusts the curvature of the edges.

v.lab

is a logical value to show vertex label.

bg

name of a color or a hexadecimal code of a color. This option is used to color the background of the plot. The default option is "black".

e.col

is a character or a hexadecimal color value to set the color of edges.

vertex.color

is a vector of colors assign colors to nodes depending on their degree, from high to low.

skip

is an integer value to plot nodes away from the center.

...

... parameter for other inputs.

Details

This layout function plots network in a spiral fashion.

Value

returns a list object of 'netbiov' class

Author(s)

Shailesh Tripathi, Frank Emmert-Streib

References

http://bio-complexity.com/

Examples

  g <- barabasi.game(500)
  x <- plot.spiral.graph(g, 121 )
  x <- plot.spiral.graph(g, 120,rank.function=layout.reingold.tilford,
vertex.color="red", e.col="green")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(netbiov)
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

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/netbiov/plot.spiral.graph.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.spiral.graph
> ### Title: Exploratory visualization of information spread of biological
> ###   networks
> ### Aliases: plot.spiral.graph
> 
> ### ** Examples
> 
>   g <- barabasi.game(500)
>   x <- plot.spiral.graph(g, 121 )
>   x <- plot.spiral.graph(g, 120,rank.function=layout.reingold.tilford,
+ vertex.color="red", e.col="green")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>