Plotting digraphs

i like this post (click again to cancel)
2
i dont like this post (click again to cancel)

Hi.

edge_size=0.0001 and vertex_size=0.1 arguments are ignored by plot(): plot2DG = DG.plot( color_by_label=True, edge_labels=False, vertex_labels=False, edge_size=0.0001, vertex_size=0.1, layout="circular" )

plot2DG.show( figsize=(5, 2) )

gives the same picture for different edge_size and vertex_size. When passing the arguments to show() it complains with "matplotlib() got an unexpected keyword argument 'edge_size'". Works for plot3d() and show3d though. What is the right way to use edge_size and vertex_size in a 2d graph plot?

asked Apr 19 '11

jmakov gravatar image jmakov
21 3
i like this answer (click again to cancel)
2
i dont like this answer (click again to cancel)

The vertex_size parameter should work (it works fine for me in Sage 4.6.2):

G = digraphs.RandomDirectedGN(5)
G.plot(vertex_size=200, layout='circular')

According to the documentation for plot, however, edge_size is not a valid parameter. You can try looking through the documentation of NetworkX for parameters to control the edge style (arrows and such) and pass these to Sage's graph plot function via the edge_style parameter.

link

posted Apr 19 '11

benjaminfjones gravatar image benjaminfjones
2470 3 33 66
http://bfj7.com/

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Apr 19 '11

Seen: 130 times

Last updated: Apr 19 '11

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.