Learn R Programming

simone (version 1.0-4)

plot.simone.network: Graphical representation of a network

Description

Displays the network contained in an object of class simone.network.

Usage


# S3 method for simone.network
plot(x,
     y    = NULL,
     type = "default", last.coord=FALSE, ...)

Arguments

x

an object of class simone.network to display.

y

an optional simone.network object to compare x with.

type

network display types (see also details) are

"circle"

displays the network nodes on a circle shape.

"circles"

displays the network nodes on circle shapes. The different circles correspond to node classes.

"cluster"

(default) displays network nodes (no underlying shape is used)

"overlap"

display a unique graph in which 2 graphs are overlaid

"4graphs"

(default) displays the two networks, the intersection and the symmetric difference between the two networks.

last.coord

use last node coordinates if TRUE.

...

additionnal parameters

Details

This function plots a graph representation from a simone.network object. When available, the classification vector describing a partition of nodes is represented.

Different node layouts (see type option) can be chosen to represent networks:

  1. if a single simone.network object is provided, the available layouts are cluster (the default), circle (nodes are laid on one circle) and circles (nodes are laid on several circles, one circle for a node class);

  2. if two simone.network objects are provide, the available layouts are 4graphs (the default, which displays both networks as well as the intersection and the difference between them) and overlap (which overlay two networks, representing common edges in gray, edges present in the first network in blue and edges present in the second network in red).

See Also

plot.simone, simone

Examples

Run this code
# NOT RUN {
## data set and graph generation
lambda  <- 0.125
epsilon <- 0.00125
alpha <- c(1/3,1/3,1/3)

pi.affi <- matrix(epsilon,3,3)
diag(pi.affi) <- lambda

g1 <- rNetwork(p=200, pi=pi.affi, alpha=alpha)
g2 <- coNetwork(g1, delta=10)

plot(g1, type="cluster") # the default
plot(g1, type="circle" ) # one circle
plot(g1, type="circles" ) # one circle per cluster
plot(g1, g2, type="4graphs") # the default for multiple inputs
plot(g1, g2, type="overlap") # comparison of 2 networks on an unique graph
# }

Run the code above in your browser using DataLab