View source: R/cmrMultiplexPlot.R
cmrMultiplexPlot | R Documentation |
igraph plotting for CMRnet object
cmrMultiplexPlot( nets, fixed_locs = c(TRUE, FALSE), locs = NULL, dynamic = c(TRUE, FALSE), rows = 3, layer_colours )
nets |
A list of multiplex igraph networks output by |
fixed_locs |
(TRUE/FALSE). Whether to keep the the locations of the nodes fixed between network windows or allow them to change |
locs |
A matrix or dataframe giving x and y coordinates of all nodes in the full network. Can be used to provide user-defined layouts to the graph - helpful for plotting locations in geographic space |
dynamic |
(TRUE/FALSE). If true this function will plot networks for the different network windows sequentially in the same plot window with a delay. If false then this function will plot the networks in a single, multipanel figure |
rows |
Sets the number of rows in the multipanel figure if dynamic=FALSE |
layer_colours |
Set the colour of the plane and nodes for each layer of the multiplex network. Needs to be a vector the same length as the number of layers in the network |
This function plots multiplex movement networks produced by CMRnet. It is developmental and it has fairly basic functionality currently. Networks can be plotted sequentially (dynamic=TRUE) or in a single multi-panelled figure (dynamic=FALSE)
A series of network plots showing the multiplex movement network from each network window
## Not run: # load in data data(cmrData2) # set parameters mindate<-"2010-01-01" maxdate<-"2015-01-01" intwindow<-60 netwindow<-12 overlap<-0 multimovenetdat <- MultiMoveNetCreate( data = cmrData2, intwindow = intwindow, mindate = mindate, maxdate = maxdate, netwindow = netwindow, overlap = overlap, nextonly = TRUE ) # convert to networks networks<-cmr_igraph(movenetdat,type="movement") cmrMultiplexPlot(nets=networks, fixed_locs=TRUE, dynamic=FALSE, rows=2, layer_colours=c("firebrick","dodgerblue")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.