First time here? Check out the FAQ!

Ask Your Question
2

Plotting digraphs

asked 13 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 13 years ago

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.

Preview: (hide)
link

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: 13 years ago

Seen: 768 times

Last updated: Apr 19 '11