-
Notifications
You must be signed in to change notification settings - Fork 40
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
Strange Axis BoundingBox "diamond" #79
Comments
Hi, thanks for raising the issue. This is clearly not the intended behaviour. I think there are two things happening here.
The solution is to increase the spring constant Graph(G, node_layout="spring", node_layout_kwargs=dict(k=0.1)) I am unsure why the default value for |
Border frames are quite useful in other cases but I do agree that there maybe should be an option to use the NetworkX variant instead of the original FR algorithm. I will add it to the list of planned features, but it will be a while until I get to it. In the meantime, if you prefer the NetworkX spring layout, you can simply pre-compute the positions with NetworkX and then pass the node position dictionary to Netgraph: import matplotlib.pyplot as plt
import networkx as nx
from netgraph import Graph
G = nx.karate_club_graph()
node_positions = nx.spring_layout(G)
Graph(G, node_layout=node_positions)
plt.show()
Glad you like it! |
Running into a pretty consistent "diamond" bound on my node layouts for some reason. I've tried playing with many layout settings, but so far it only changes the sizes within this odd diamond.
Here's a min. example:
Adjusting the scale doesn't seem to do anything to the boundary:
Replicating in networkx:
So I don't think my networkx layouts are reaching some kind of border.
Similarly, the diamond starts appearing for the karate graph:
vs:
The text was updated successfully, but these errors were encountered: