Re: [networkx-discuss] Stopping overlap of nodes

528 views
Skip to first unread message

Brian Keegan

unread,
Apr 27, 2013, 9:40:40 AM4/27/13
to networkx...@googlegroups.com
You're going to be better off using a dedicated network visualization tool such as Gephi, Pajek, or Cytoscape if you want to large-scale network visualization. Write the file to a common format such as Pajek's .net or GraphML and import to those programs.


On Fri, Apr 26, 2013 at 11:31 PM, AYUSHMAN DUTTA <ayushm...@gmail.com> wrote:
Hi,
I have just started using networx recently. I wanted to generate large png images for graphs.(somethign similar to http://internet-map.net/)
I was currently using a dataset of only 5k nodes and using spring layout to arrange the nodes. However the nodes always end up overlapping.
I have  tried it multiple times and have also used the scale parameter. however the nodes always end up overlapping.

This is my code snippet to generate the graph.
node_file = "data/masterlist.txt";
edge_file = "data/output.txt";
G = nx.DiGraph()
node_list = pr.read_node_data_as_networkx_node_list(node_file);
edge_list = pr.read_edge_data_as_networkx_edge_list(node_file, edge_file);
G.add_weighted_edges_from(edge_list);

pos = nx.spring_layout(G, scale=10);
nx.draw_networkx_nodes(G, pos, node_color='#A0CBE2' ,width=2, with_labels=True)

plt.savefig("graph.png", dpi=1000, facecolor='w', bbox_inches=None, pad_inches=0.1)




Am I doing some thing wrong Thanks a lot for help?
Ayushman
                                         

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To post to this group, send email to networkx...@googlegroups.com.
Visit this group at http://groups.google.com/group/networkx-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

AYUSHMAN DUTTA

unread,
Apr 27, 2013, 4:08:11 PM4/27/13
to networkx...@googlegroups.com
Hi ,
Thanks for the help. Actually when I use a Gephi the tool is taking large time to export the image to a library.
I was planning to write the open ord layout for networkx. hopefullly it should work then.
Thanks for the help.

Brian Keegan

unread,
Apr 27, 2013, 4:34:55 PM4/27/13
to networkx...@googlegroups.com
OpenORD has already been implemented for Gephi as a plugin. https://marketplace.gephi.org/plugin/openord-layout/
Reply all
Reply to author
Forward
0 new messages