It would be helpful to know what method you are using
to layout the nodes and which drawing method. If you
use the NetworkX defaults with matplotlib then you are using
the spring_layout routine. Take a look at the other
layout routines available.
NetworkX provides a few simple layout schemes, but it
isn't a drawing/layout package. pygraphviz gives an
interface to the GraphViz library, but you can also
output dot files from NetworkX that then can be processed
by GraphViz directly.
Dan
> --
> You received this message because you are subscribed to the Google
> Groups "networkx-discuss" group.
> To post to this group, send email to networkx-
> dis...@googlegroups.com.
> To unsubscribe from this group, send email to networkx-discuss
> +unsub...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/
> group/networkx-discuss?hl=en.
>
For some of the layout algorithms there is a "scale" parameter that might
help. e.g.
In [1]: import networkx as nx
In [2]: G=nx.path_graph(4)
In [3]: pos=nx.spring_layout(G) #default to scale=1
In [4]: nx.draw(G,pos)
In [5]: pos=nx.spring_layout(G,scale=2) # double distance between all nodes
In [6]: nx.draw(G,pos)
Aric
import networkx as nx
G = nx.generators.balanced_tree(3,3)
pos = nx.drawing.spring_layout(G)
scale = 1.25
#Written out long for clarity
for i in pos:
pos[i][0] = pos[i][0] * 2 # x coordinate
pos[i][1] = pos[i][1] * 2 # y coordinate
Nick
G=nx.Graph()
G.add_edge(20*'a',20*'b')
G.add_edge(20*'b',20*'c')
G.add_edge(20*'c',20*'d')
G.add_edge(20*'d',20*'a')
G.add_edge(20*'a',20*'c')
pos=nx.spring_layout(G)
#pylab.figure(1,figsize=(3,3))
pylab.figure(1,figsize=(12,12))
pylab.xlim(0,1)
pylab.ylim(0,1)
nx.draw(G,pos,font_size=8)
#nx.draw(G,pos,font_size=10)
pylab.show()
----------
Aric