Open th206 opened 2 years ago
I think it's not a good idea to use one function several times (and so just keep the last one). Can you try something like this :
visPhysics(solver = "forceAtlas2Based",forceAtlas2Based = list(gravitationalConstant = -500),stabilization = FALSE)
Thanks for the suggestion but unfortunately it didn't work. The below code generates single network with two separate cluster. Animation (stabilization) for one cluster (approx 60 nodes) stops immediately but the second cluster (approx 100) nodes keeps animating forever. See attached screenshot. In the circled second cluster, there are mulitple duplicate edges but they are not duplicate as they represent multiple sources to establish that relation.
output$cy <- renderVisNetwork({ visNetwork(node_ann, network_file,width = "100%",height = "700px", main=paste0("Network (",toupper(keyword),")")) %>% visOptions(highlightNearest = list(enabled =TRUE, degree = 2),nodesIdSelection = TRUE) %>% visInteraction(navigationButtons = TRUE, dragNodes=FALSE, dragView=FALSE,zoomView=FALSE) %>% visGroups(groupname = unique(node_ann$NodeType)[1],color = "green") %>% visGroups(groupname = unique(node_ann$NodeType)[2],color = "blue") })
I have tried various ways to disable the network stabilization but nothing works. For a smaller network the stabilization process doesn't take time but for a large network the stabilization process is never ending. I have also tried stabilization FALSE for single cluster network or more than one cluster network. It doesn't seem to work in any case. Any help is much appreciated.
visPhysics(solver = "forceAtlas2Based",forceAtlas2Based = list(gravitationalConstant = -500)) %>% visPhysics(stabilization = FALSE) %>%