Learn R Programming

lvm4net (version 0.3)

plotY: Plot the adjacency matrix of the network

Description

Function to plot the adjacency matrix of the network.

Usage

plotY(Y, Ndata = NULL, EZ = NULL, VZ = NULL, dimZ = c(1, 2),
  labels = NULL, colPl = 1, colEll = rgb(0.6, 0.6, 0.6, alpha = 0.1),
  LEVEL = 0.95, pchplot = 20, pchEll = 19, pchPl = 19,
  cexPl = 1.1, arrowhead = FALSE, curve = NULL, lwdLine = 0.3,
  xlim = NULL, ylim = NULL, verbose = FALSE, ...)

Arguments

Y

list, or matrix containing a (N x N) binary adjacency matrix for each network view.

Ndata

number of network views

EZ

posterior mean latent positions

VZ

posterior variance latent positions, if specified draw ellipse

dimZ

dimensions of Z to be plotted, default dimZ = c(1, 2)

labels

text to be added in the plot representing the labels of each node. Default labels = NULL, no labels are shown

colPl

col for the points representing the nodes. Default colPl = NULL

colEll

col for the ellipses. Default rgb(.6, .6 ,.6 , alpha=.1)

LEVEL

levels of confidence bounds shown when plotting the ellipses. Default LEVEL = .95

pchplot

Default pchplot = 20

pchEll

pch for the ellipses. Default pchEll = 19

pchPl

pch for the points representing the nodes. Default pchPl = 19

cexPl

cex for the points representing the nodes. Default cexPl = 1.1

arrowhead

logical, if the arrowed are to be plotted. Default arrowhead = FALSE

curve

curvature of edges. Default curve = 0

lwdLine

lwd of edges. Default lwdLine = .3

xlim

range for x

ylim

range for y

verbose

if verbose = TRUE save the nodal positions

...

Arguments to be passed to methods, such as graphical parameters (see par).

Examples

Run this code
# NOT RUN {
N <- 20
Y <- network(N, directed = FALSE)[,]
plotY(Y)
# Store the positions of nodes used to plot Y, in order to redraw the plot using 
# the same positions
z <- plotY(Y, verbose = TRUE)
plotY(Y, EZ = z)
# }

Run the code above in your browser using DataLab