Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout algorithm settings #214

Open
simull opened this issue Sep 14, 2023 · 1 comment
Open

Layout algorithm settings #214

simull opened this issue Sep 14, 2023 · 1 comment
Labels
question Further information is requested

Comments

@simull
Copy link

simull commented Sep 14, 2023

Hi,

thanks for this great project! I am plotting a network and try to specify layout settings (see below). When I specify the settings in the Sigma() function, only some of the settings seem to have an effect. I could not find in the description which of the settings are implemented in Sigma and which ones are not. First, it would be great to have more information in the documentation of how to adapt the layout. Second, is there a possibility to implement the functionalities of Gephi settings for ForceAtlas2 layout algorithm?

I try to increase the scaling ration or prevent_overlapping, for instance, but it does not affect the visualization of the network.

# Prepare ForceAtlas2 layout settings
layout = {
          # Behavior alternatives
              'outboundAttractionDistribution':True, 
              'linLogMode': True,
              'adjustSizes': False,
              'edgeWeightInfluence':0.5, 
          # Performance
              'itterTolerance':1.0,
              'barnesHutOptimize':True, 
              'barnesHutTheta': 1.2,
              'multiThreaded':False, # Not implemented
          # Tuning
              'scalingRatio':100.0,
              'strongGravityMode':False,
              'gravity':1,
              'prevent_overlapping':True
         }
Sigma(G, node_size=G.degree, layout=layout)
@Yomguithereal
Copy link
Member

Hello @simull,

the layout settings are documented here: https://graphology.github.io/standard-library/layout-forceatlas2#settings and should be given to the layout_settings kwarg, not layout which expects a mapping for nodes to their positions, if you have an extraneous layout of your graph to give (check out the API reference for more details.

Second, is there a possibility to implement the functionalities of Gephi settings for ForceAtlas2 layout algorithm?

The implementation of the ForceAtlas2 algorithm used by ipysigma is basically the same as Gephi and was written by the same author. The name of the settings differ somehow for historical reasons beyond my control, sorry :). This said, Gephi and ipysigma have different ways of handling positions on screen. To simplify, for UX reasons, ipysigma always rescale the graph on screen which means the anticollision of the FA2 algorithm in ipysigma cannot work very well. This said, why not using the anticollision algorithm provided by the widget after the FA2 algorithm ran?

@Yomguithereal Yomguithereal added the question Further information is requested label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants