Learn R Programming

dnc (version 1.2)

plot.dnc: Plot a dnc object.

Description

Construct 2D or 3D plots of the latent actor positions using the plot3D and plot3Drgl packages.

Usage

"plot"(x,aggregated=TRUE,plotRGL=TRUE, Lines=TRUE,colByComm=TRUE, INDEX=1:min(dim(x$pm$X)[1],3),...)

Arguments

x
A dnc class object
aggregated
Logical. Should the time points be aggregated, or should separate plots be made for each time point?
plotRGL
Logical. Should rgl interactive plot(s) be made? Ignored if length(INDEX)==2.
Lines
Logical. Should lines be drawn from the origin to the center of the communities?
colByComm
Logical. Should the actors be colored according to community membership?
INDEX
Vector. Which subset of the p dimensions should be plotted? Note: The length of this vector determines whether a 2D or 3D plot should be made.
...
Further arguments to be passed into points(), surf3D or points3D functions.

Details

This function utlizies functions from the plot3D and plot3Drgl packages for 3D functionality. To see what options you may pass into ..., see documentation for points in base R, plot3D::surf3D, or plot3D::points3D.

Examples

Run this code
  data(friendship)
  set.seed(123)
  dncObj <- dnc(friendship,M=4,p=3,method="Gibbs",
                controls=list(nDraws=250,burnin=50,
                              MaxItStg2=25,epsilonStg2=1e-15))
  par(mar=rep(0,4)+0.05)
  plot(dncObj,plotRGL=FALSE,pch=16,phi=60,lwd=2,cex=1.5)

Run the code above in your browser using DataLab