Ask Your Question

Plotting digraphs

asked 2011-04-19 21:47:18 +0200

jmakov gravatar image


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" ) 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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-04-19 22:59:21 +0200

benjaminfjones gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-04-19 21:47:18 +0200

Seen: 650 times

Last updated: Apr 19 '11