Arrow heads

64 views
Skip to first unread message

Bruno Pace

unread,
Feb 9, 2012, 9:52:13 AM2/9/12
to networkx...@googlegroups.com
Hi all!

I am trying to make a nice DiGraph visualisation, but the command I am using only draws thicker lines instead of a proper arrow head. And besides that, if two nodes are too close, not even the thicker line appears!

What`s the easiest way to solve that?

I`m importing matplotlib.pyplot and using the following two commands to show the graph:

nx.draw(G)
plt.show()

So, any ideas?

Thanks a lot!
Bruno

Aric Hagberg

unread,
Feb 9, 2012, 10:04:46 AM2/9/12
to networkx...@googlegroups.com
On Thu, Feb 9, 2012 at 7:52 AM, Bruno Pace <bruno...@gmail.com> wrote:
> Hi all!
>
> I am trying to make a nice DiGraph visualisation, but the command I am using
> only draws thicker lines instead of a proper arrow head. And besides that,
> if two nodes are too close, not even the thicker line appears!
>
> What`s the easiest way to solve that?

Unfortunately there is no easy way to solve that problem with the
built-in NetworkX drawing capabilities.

I'd suggest trying one of the graph drawing tools like graphviz
(graphviz.org) or gephi (gephi.org). You can export your data from
NetworkX in formats that those tools can read using e.g. write_dot()
or write_graphml().

Aric

Reply all
Reply to author
Forward
0 new messages