I created a dynamic network using networkDynamic based on two files that contain the information for vertexes(nodes) and edges. When I animate the network using compute.animation and render.d3movie, the layout of the resulting network animation moves even though there are no changes to the structure of the network. How can I make the layout of the network stable?
First, I create a static network with the Static_Edges and Static_Nodes as input.
base_net <- network(Static_Edges, vertex.attr=Static_Nodes, matrix.type="edgelist",
loops=F, multiple=F, ignore.eval = F, directed = FALSE)
Second, I use the static network and add temporal data to make the network dynamic.
Test_Network <-networkDynamic(base.net = base_net, vertex.spells=Nodes[,c(2,3,1)],
edge.spells=Edges[,c(3,4,1,2)])
Third, I compute and visualize the animation as follows:
compute.animation(Test_Network, animation.mode='kamadakawai')
render.d3movie(Test_Network, displaylabels = TRUE, label = Test_Network %v% "id", label.cex = 0.5, animation.mode='kamadakawai', main='Kamada-Kawai layout', time.increment=5, rule="latest")
The network is computed and visualized without any errors.
However, I would have expected the network to be fairly stable with some vertexes and edges being added at different points in time. However, the layout of the network is constantly moving and I can't figure out how to make the layout more stable.
Your help is highly appreciated!