简体   繁体   中英

Graph visualization using prefuse is too dense

The graph I have created using prefuse (shown below) is too dense! There are many nodes linking to many other nodes. Is there anyway I could display this more spread out?

Thanks in advance!

在此输入图像描述

Are you using a force based layout? If so, change the force parameters of your layout, or try a different layout action (radial, fructherman-rheinhold, etc). Most of the prefuse layouts have flexible layout parameters, which should fix your problem.

In particular, use ForceDirectedLayout.getForceSimulator() to retrieve the ForceSimulator object for your layout, then change the parameters in your force array, which you can obtain via ForceSimulator,getForces()

The default forces for the default ForceSimulator behind a ForceDirectedLayout are organized as follows:

index0 is NBodyForce:

  • Parameter 0 is gravitational force
  • Parameter 1 is distance
  • Parameter 2 is barnes-hut theta (a simulation quality parameter)

index1 is DragForce (param 0 is drag)

index 2 is Spring force (for edges)

  • Parameter 0 is Spring Coefficient (how snappy the spring is)
  • Parameter 1 is Spring (equilibrium) length

I would suggest taking a look at Gephi . You get quite a lot of flexibility when it comes to layouts that should help.

为什么你不使用JUNG ,即使它变得密集,Jung给出了zoomin和缩小的选项,这可能会解决你的问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM