Ask Your Question
0

Changing the vertex shape for combinatorial graphs

asked 2012-04-04 12:14:20 -0500

araichev gravatar image

updated 2015-10-18 07:17:51 -0500

FrédéricC gravatar image

Hi all:

Given a combinatorial graph (the nodes and edges type) $g$, what are the valid vertex_shape options for g.plot()? I can't find them in the Sage reference manual. I want to make square vertices.

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2012-04-04 16:28:33 -0500

fidbc gravatar image

Hi,

Sage uses matplotlib to plot graphs, and valid vertex shapes seem to be valid matplotlib markers, you chan check the matplotlib documentation for some other valid markers.

If you want squares, then you can try, say

sage: g=graphs.PetersenGraph();gp=g.graphplot()
sage: gp.set_vertices(vertex_shape='s');gp.plot()

Apparently changing vertex shapes is still not available for Multi-edged Digraphs though.

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: 2012-04-04 12:14:20 -0500

Seen: 439 times

Last updated: Apr 04 '12