Ask Your Question
2

Plotting digraphs

asked 2011-04-19 14:47:18 -0500

jmakov gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2011-04-19 15:59:21 -0500

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

Stats

Asked: 2011-04-19 14:47:18 -0500

Seen: 368 times

Last updated: Apr 19 '11