graphviz - Specified edge lengths on networkx/igraph (Python) -
I wanted to visualize a network with the data I had and want to graph them with the specific edge length. I use Python, and I've tried to plot the networks and igraph, but set all fixed edge lengths.
a.) I wonder if I have done the code wrong or the package is not actually capable of I network x or igraph?
How do you definitely apply the length of the fixed edge? For B?) If the network x and igraph can not do this, what package can you recommend? (Preferably one that can take 80 thousand nodes.)
Thanks!
This should work:
Import as NX import Make Networks PGG = PG Graph () nlist = "ABCDE" .split () a, b = "AAB", "BCD" Eastist = zip (a.split), BSTPT T. ()) g.ad_node_frame (analyst) g.ad_gease_frame (iList) gnode_tat.update (color = "red", style = "fill") g.ajj_trr.update (color = "blue", LAN = " 2.0 ", width =" 2.0 ") Print (G.gege_attr) # Return {'color': 'red', 'width': '', 'lane': '2.0'} # Custom Add new edge with Bai (all others have length = 2.0): G.add_edge ("C", "E", len = "3.0", color = "blue", width = "2.0") edge = G ( 'C', 'E') print (edge_ttr) # Return {'color': 'blue', 'width': '2.0', 'lane': '3.0'} # And you can confirm that introspection drawing & Amp; Print this Article: G.draw ('somefolderandfilename.png', format = 'png', prog = 'neato')
Most graph drawing algorithms use some versions of SMACOF, Which definitely changes the length of the edge; However, the graphite layout engine should preserve 'Neto' (provided as the second argument of the above 'Draw'), if possible, the length of the user set edge
The library I used here is definitely strong enough to handle 80,000 nodes
Comments
Post a Comment