powered by
Plots a network from a 'assistnet' object
# S3 method for assistnet plot( x, layout = "kamadakawai", layout.par = list(), edge.thr = 0, edge.col.lim = NULL, edge.col.lab = NULL, node.size = NULL, node.size.lab = NULL, node.col = NULL, node.col.lim = NULL, node.col.lab = NULL, node.pal = colorRampPalette(c("white", "blue", "red")), edge.pal = colorRampPalette(c("white", "blue", "red")), ... )
A ggplot2 object
ggplot2
an object of class assistnet.
assistnet
character, network vertex layout algorithm (see gplot.layout) such as "kamadakawai" (the default).
gplot.layout
"kamadakawai"
a list of parameters for the network vertex layout algorithm (see gplot.layout).
numeric, threshold for edge values; values below the threshold are set to 0.
numeric vector of length two providing limits of the scale for edge color.
character, label for edge color legend.
character, indicating the name of the variable for node size (one of the columns of the nodeStats data frame in the x object, see assistnet).
nodeStats
x
character, label for node size legend.
character, indicating the name of the variable for node color (one of the columns of the nodeStats data frame in the x object, see assistnet).
numeric vector of length two providing limits of the scale for node color.
character, label for node color legend.
color palette for node colors.
color palette for edge colors.
other graphical parameters.
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
PbP <- PbPmanipulation(PbP.BDB) PbP.GSW <- subset(PbP, team=="GSW" & player!="") out <- assistnet(PbP.GSW) plot(out, layout="circle", edge.thr=30, node.col="FGM_ASTp", node.size="ASTPTS")
Run the code above in your browser using DataLab